test generators: unify mangle & kill header functions

This commit is contained in:
Milan Broz
2022-04-09 16:57:36 +02:00
parent e97238fb6d
commit d43b495f21
74 changed files with 155 additions and 689 deletions

View File

@@ -20,13 +20,7 @@ function generate()
write_luks2_json "$json_str" $TMPDIR/json0
merge_bin_hdr_with_json $TMPDIR/hdr0 $TMPDIR/json0 $TMPDIR/area0
erase_checksum $TMPDIR/area0
chks0=$(calc_sha256_checksum_file $TMPDIR/area0)
write_checksum $chks0 $TMPDIR/area0
write_luks2_hdr0 $TMPDIR/area0 $TGT_IMG
kill_bin_hdr $TMPDIR/hdr1
write_luks2_hdr1 $TMPDIR/hdr1 $TGT_IMG
lib_mangle_json_hdr0_kill_hdr1
}
function check()