]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: check for dm-verity support
authorKarel Zak <kzak@redhat.com>
Tue, 31 Aug 2021 09:40:45 +0000 (11:40 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 31 Aug 2021 09:40:45 +0000 (11:40 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/mount/dm-verity

index 6f419656faa183f979c598266a74daff7d28ef10..c0c70fe5c7e64185b3e1ee88b512a5c2a2832116 100755 (executable)
@@ -35,7 +35,9 @@ ts_skip_nonroot
 ts_check_prog "mksquashfs"
 ts_check_prog "veritysetup"
 
-# Make a squashfs out of /etc and prepare verity device out of it
+grep -q '#define HAVE_CRYPTSETUP' ${top_builddir}/config.h || ts_skip "no dm-verity support"
+
+# Make a squashfs and prepare verity device out of it
 mksquashfs $TS_SELF $SQUASHFS &>/dev/null || ts_skip "error: mksquashfs on $TS_SELF"
 veritysetup format $SQUASHFS $HASH_DEVICE > $VERITY_OUTPUT || ts_skip "cannot format $SQUASHFS"