From 688edfc15b9d0ed4764f774aafecd1abc4ac9fa5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 31 Aug 2021 11:40:45 +0200 Subject: [PATCH] tests: check for dm-verity support Signed-off-by: Karel Zak --- tests/ts/mount/dm-verity | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ts/mount/dm-verity b/tests/ts/mount/dm-verity index 6f419656fa..c0c70fe5c7 100755 --- a/tests/ts/mount/dm-verity +++ b/tests/ts/mount/dm-verity @@ -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" -- 2.47.2