test generators: unify kill header check functions

This commit is contained in:
Milan Broz
2022-04-09 16:57:36 +02:00
parent d43b495f21
commit 6d8587c137
71 changed files with 110 additions and 210 deletions

View File

@@ -25,9 +25,7 @@ function generate()
function check()
{
read_luks2_bin_hdr1 $TGT_IMG $TMPDIR/hdr_res1
local str_res1=$(head -c 6 $TMPDIR/hdr_res1)
test "$str_res1" = "VACUUM" || exit 2
lib_hdr1_killed || exit 2
read_luks2_json0 $TGT_IMG $TMPDIR/json_res0
jq -c 'if .segments."0".size != "18446744073709551616"