btrfs-progs: tests: check for kernel support for reiserfs

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-09-07 17:29:51 +02:00
parent 7299e0d294
commit 6fb88e2859
7 changed files with 35 additions and 0 deletions

View File

@ -275,3 +275,17 @@ convert_test() {
convert_test_post_rollback "$fstype"
}
load_module_reiserfs()
{
$SUDO_HELPER modprobe reiserfs
}
check_kernel_support_reiserfs()
{
if ! grep -iq 'reiserfs' /proc/filesystems; then
echo "WARNING: reiserfs filesystem not listed in /proc/filesystems, some tests might be skipped"
return 1
fi
return 0
}

View File

@ -22,6 +22,7 @@ export TEST_DEV
rm -f "$RESULTS"
check_kernel_support
check_kernel_support_reiserfs
# anything expected by common.convert
check_global_prereq getfacl
check_global_prereq setfacl

View File

@ -3,6 +3,10 @@
source "$TOP/tests/common"
source "$TOP/tests/common.convert"
if ! check_kernel_support_reiserfs >/dev/null; then
_not_run "no reiserfs support"
fi
setup_root_helper
prepare_test_dev 512M
check_prereq btrfs-convert

View File

@ -4,6 +4,10 @@
source "$TOP/tests/common"
source "$TOP/tests/common.convert"
if ! check_kernel_support_reiserfs >/dev/null; then
_not_run "no reiserfs support"
fi
setup_root_helper
prepare_test_dev 512M
check_prereq btrfs-convert

View File

@ -8,6 +8,10 @@
source "$TOP/tests/common"
source "$TOP/tests/common.convert"
if ! check_kernel_support_reiserfs >/dev/null; then
_not_run "no reiserfs support"
fi
setup_root_helper
prepare_test_dev 512M
check_prereq btrfs-convert

View File

@ -4,6 +4,10 @@
source "$TOP/tests/common"
source "$TOP/tests/common.convert"
if ! check_kernel_support_reiserfs >/dev/null; then
_not_run "no reiserfs support"
fi
setup_root_helper
prepare_test_dev 512M
check_prereq btrfs-convert

View File

@ -9,6 +9,10 @@
source "$TOP/tests/common"
source "$TOP/tests/common.convert"
if ! check_kernel_support_reiserfs >/dev/null; then
_not_run "no reiserfs support"
fi
setup_root_helper
prepare_test_dev 512M
check_prereq btrfs-convert