Combine these two helpers into a single generic function so that we can
use it in the next patch to test a regression when running overlayfs
atop xfs.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-# this test requires ext2 filesystem support
+# this test requires kernel support for a secondary filesystem
- modprobe ext2 >/dev/null 2>&1
- if grep ext2 /proc/filesystems >/dev/null 2>&1
- then
- :
- else
- _notrun "This test requires ext2 filesystem support"
- fi
-}
-
-# this test requires tmpfs filesystem support
-#
-_require_tmpfs()
-{
- modprobe tmpfs >/dev/null 2>&1
- grep -q tmpfs /proc/filesystems ||
- _notrun "this test requires tmpfs support"
+ modprobe "$1" >/dev/null 2>&1
+ grep -q -w "$1" /proc/filesystems ||
+ _notrun "this test requires $1 support"
}
# this test requires that (large) loopback device files are not in use
}
# this test requires that (large) loopback device files are not in use
# Modify as appropriate.
_supported_fs overlay
_require_user
# Modify as appropriate.
_supported_fs overlay
_require_user
# create a tmpfs in $TEST_DIR
tmpfsdir=$TEST_DIR/tmpfs
# create a tmpfs in $TEST_DIR
tmpfsdir=$TEST_DIR/tmpfs
# real QA test starts here
_supported_fs overlay
# real QA test starts here
_supported_fs overlay
_require_test
_require_scratch
_require_unionmount_testsuite
_require_test
_require_scratch
_require_unionmount_testsuite
# real QA test starts here
_supported_fs overlay
# real QA test starts here
_supported_fs overlay
_require_test
_require_scratch
_require_unionmount_testsuite
_require_test
_require_scratch
_require_unionmount_testsuite
# real QA test starts here
_supported_fs overlay
# real QA test starts here
_supported_fs overlay
_require_test
_require_scratch
_require_unionmount_testsuite
_require_test
_require_scratch
_require_unionmount_testsuite
# real QA test starts here
_supported_fs overlay
# real QA test starts here
_supported_fs overlay
_require_test
_require_scratch
_require_unionmount_testsuite
_require_test
_require_scratch
_require_unionmount_testsuite
_require_scratch_nocheck
_require_no_large_scratch_dev
_require_loop
_require_scratch_nocheck
_require_no_large_scratch_dev
_require_loop