[PATCH 3/3] btrfs-progs: convert-tests/022: add reiserfs support check

Qu Wenruo
2022-10-05T02:25:54Z

[BUG]
Btrfs-progs test case convert/022 will fail if the system doesn't have
reiserfs support nor reiserfs user space tools:

# make TEST=022\* test-convert
[TEST] convert-tests.sh
WARNING: reiserfs filesystem not listed in /proc/filesystems, some tests might be skipped
[TEST/conv] 022-reiserfs-parent-ref
Failed system wide prerequisities: mkreiserfs
test failed for case 022-reiserfs-parent-ref
make: *** [Makefile:443: test-convert] Error 1

[CAUSE]
Unlike other test cases, convert/022 doesn't even check if we have
kernel support for it.

[FIX]
Add the proper check before doing system wide prerequisities checks.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
tests/convert-tests/022-reiserfs-parent-ref/test.sh | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/tests/convert-tests/022-reiserfs-parent-ref/test.sh b/tests/convert-tests/022-reiserfs-parent-ref/test.sh
index 66aaff7b6502..5d5ccdc5702f 100755
--- a/tests/convert-tests/022-reiserfs-parent-ref/test.sh
+++ b/tests/convert-tests/022-reiserfs-parent-ref/test.sh
@@ -2,6 +2,11 @@
# Test that only toplevel directory self-reference is created

source "$TEST_TOP/common"
+source "$TEST_TOP/common.convert"
+
+if ! check_kernel_support_reiserfs >/dev/null; then
+ _not_run "no reiserfs support"
+fi

setup_root_helper
prepare_test_dev
--
2.37.3