fstests: add _require_hardlinks for all necessary tests

Add a new _require function for hardlinks, to test hardlink support
in all tests which need it.

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-04-15 15:20:33 -05:00
committed by Eryu Guan
parent 2b0162607d
commit 3e4ccc86bb
22 changed files with 33 additions and 1 deletions
+12
View File
@@ -3493,6 +3493,18 @@ _require_symlinks()
rm -f $target $link
}
_require_hardlinks()
{
local target=`mktemp -p $TEST_DIR`
local link=`mktemp -p $TEST_DIR -u`
ln $target $link
if [ "$?" -ne 0 ]; then
rm -f $target
_notrun "No hardlink support"
fi
rm -f $target $link
}
_require_test_fcntl_advisory_locks()
{
[ "$FSTYP" != "cifs" ] && return 0
+1
View File
@@ -28,6 +28,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_test
_require_hardlinks
rm -f $seqres.full
+1
View File
@@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -44,6 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -48,6 +48,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -37,6 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -37,6 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -38,6 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -36,6 +36,7 @@ addentries()
_supported_fs generic
_supported_os Linux
_require_test
_require_hardlinks
rm -f $seqres.full
[ "X$TEST_DIR" = "X" ] && exit 1
+1
View File
@@ -36,6 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -31,6 +31,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -30,6 +30,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -33,6 +33,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1 -1
View File
@@ -25,8 +25,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs generic
# only Linux supports fallocate
_supported_os Linux
_require_hardlinks
_require_test
rm -f $TEST_DIR/ouch*
+1
View File
@@ -32,6 +32,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -32,6 +32,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -39,6 +39,7 @@ _supported_fs generic
_supported_os Linux
_require_test
_require_user
_require_hardlinks
# Setup testfile and its hardlink
testfile=$TEST_DIR/testfile.$seq
+1
View File
@@ -32,6 +32,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -31,6 +31,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full
+1
View File
@@ -34,6 +34,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
_require_hardlinks
_require_dm_target flakey
rm -f $seqres.full

Some files were not shown because too many files have changed in this diff Show More