tests: Skip tests if required tools are not available

There is no reason to fail a test if the required testing tool is not
present on the system, so skip the test instead of failing it.

Signed-off-by: Leo Sandoval <lsandova@redhat.com>
Reviewed-by: Andrew Hamilton <adhamilt@gmail.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Leo Sandoval authored and Daniel Kiper committed 2025-11-06 19:27:06 +01:00
1 parent d9b7b23d2d
commit bf13fed5fe
29 files changed
+36 -36

No files matched your search

+2 -2
View File
@@ -12,12 +12,12 @@ fi
if ! which mkfs.ext2 >/dev/null 2>&1; then
echo "mkfs.ext2 not installed; cannot test luks2."
exit 99
exit 77
fi
if ! which cryptsetup >/dev/null 2>&1; then
echo "cryptsetup not installed; cannot test luks2."
exit 99
exit 77
fi
"@builddir@/grub-fs-tester" luks2