fstests: add _require_mknod

Add a _require_mknod test so that filesystems with no ->mknod
operation will _notrun instead of fail, and add the helper to
all necessary tests.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Eric Sandeen
2020-05-18 11:16:47 -05:00
committed by Eryu Guan
parent 6c5ab75901
commit 04f13c4ee3
8 changed files with 16 additions and 0 deletions
+7
View File
@@ -4215,6 +4215,13 @@ _require_sysctl_variable()
sysctl $name &>/dev/null || _notrun "$name sysctl unavailable"
}
_require_mknod()
{
mknod $TEST_DIR/$seq.null c 1 3 \
|| _notrun "$FSTYP does not support mknod/mkfifo"
rm -f $TEST_DIR/$seq.null
}
init_rc
################################################################################
+1
View File
@@ -60,6 +60,7 @@ _supported_os Linux
_require_scratch
_require_attrs
_require_symlinks
_require_mknod
rm -f $tmp.backup1 $tmp.backup2 $seqres.full
+1
View File
@@ -29,6 +29,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_test
_require_mknod
rm -f $TEST_DIR/null
mknod $TEST_DIR/null c 1 3
+1
View File
@@ -34,6 +34,7 @@ _supported_os Linux
_require_scratch
_require_test
_require_symlinks
_require_mknod
DEVNULL=$SCRATCH_MNT/devnull
DEVZERO=$SCRATCH_MNT/devzero
+1
View File
@@ -38,6 +38,7 @@ _supported_fs generic
_supported_os Linux
_require_scratch
_require_symlinks
_require_mknod
_require_test_program "t_dir_type"
rm -f $seqres.full
+1
View File
@@ -30,6 +30,7 @@ _supported_os Linux
_require_xfs_io_command "copy_range"
_require_test
_require_mknod
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
+1
View File
@@ -33,6 +33,7 @@ _supported_fs generic
_supported_os Linux
_require_scratch
_require_symlinks
_require_mknod
_require_dm_target flakey
rm -f $seqres.full
+3
View File
@@ -37,6 +37,9 @@ rm -f $seqres.full
_require_test
_require_loop
# for mkfifo
_require_mknod
#
# This test effectively requires xfs_io with these commits
# 2a42470b xfs_io: copy_file_range length is a size_t