tests: workaround valgrind SIGPIPE

Parsing --debug output with quiet flag can produce SIGPIPE output
if running with valgrind wrapper, just workaround it with another
grep as used elsewhere.
This commit is contained in:
Milan Broz
2024-07-30 10:34:41 +02:00
parent 3a7794795f
commit e0852d21dd

View File

@@ -1622,7 +1622,7 @@ prepare "[46] Blkid disable check" wipe
if [ "$HAVE_BLKID" -gt 0 ]; then
xz -dkf $HEADER_LUKS2_PV.xz
# batch mode disables blkid print, use --debug to check it
echo $PWD1 | $CRYPTSETUP -q --debug luksFormat $FAST_PBKDF_OPT --type luks2 $HEADER_LUKS2_PV 2>&1 | grep -q "LVM2_member" || fail
echo $PWD1 | $CRYPTSETUP -q --debug luksFormat $FAST_PBKDF_OPT --type luks2 $HEADER_LUKS2_PV 2>&1 | grep "signature" | grep -q "LVM2_member" || fail
xz -dkf $HEADER_LUKS2_PV.xz
echo $PWD1 | $CRYPTSETUP -q --debug --disable-blkid luksFormat $FAST_PBKDF_OPT --type luks2 $HEADER_LUKS2_PV 2>&1 | grep -q "LVM2_member" && fail
fi