]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: skip tests that require XFS_IOC_ALLOCSP
authorDarrick J. Wong <djwong@kernel.org>
Wed, 26 Jan 2022 02:11:54 +0000 (18:11 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 13 Feb 2022 17:02:36 +0000 (01:02 +0800)
Deprecating this, so turn off the tests that require it.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
ltp/fsstress.c
tests/xfs/107

index 73f484bd8be21b4f423004f32d8a9eaf41c3ddbb..bc4a4559a8ba59fda6320d237083cfad3162912c 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2507,8 +2507,8 @@ _require_xfs_io_command()
                rm -f $testcopy > /dev/null 2>&1
                param_checked="$param"
                ;;
-       "falloc" )
-               testio=`$XFS_IO_PROG -F -f -c "falloc $param 0 1m" $testfile 2>&1`
+       "falloc"|"allocsp")
+               testio=`$XFS_IO_PROG -F -f -c "$command $param 0 1m" $testfile 2>&1`
                param_checked="$param"
                ;;
        "fpunch" | "fcollapse" | "zero" | "fzero" | "finsert" | "funshare")
index 5f3126e6747114bc2581d2d8776a06a3f7313c71..23188467aeeade7066abc97919016f875e163e5f 100644 (file)
@@ -2045,6 +2045,7 @@ afsync_f(opnum_t opno, long r)
 void
 allocsp_f(opnum_t opno, long r)
 {
+#ifdef XFS_IOC_ALLOCSP64
        int             e;
        pathname_t      f;
        int             fd;
@@ -2094,6 +2095,7 @@ allocsp_f(opnum_t opno, long r)
        }
        free_pathname(&f);
        close(fd);
+#endif
 }
 
 #ifdef AIO
@@ -3733,6 +3735,7 @@ fiemap_f(opnum_t opno, long r)
 void
 freesp_f(opnum_t opno, long r)
 {
+#ifdef XFS_IOC_FREESP64
        int             e;
        pathname_t      f;
        int             fd;
@@ -3781,6 +3784,7 @@ freesp_f(opnum_t opno, long r)
                       procid, opno, f.path, st, (long long)off, e);
        free_pathname(&f);
        close(fd);
+#endif
 }
 
 void
index 577094b29234bacdcb8d03e410e3d4cc00532a9d..1ea9c492604ce5bf3a0ebfe831b93042f74f47dc 100755 (executable)
@@ -20,6 +20,7 @@ _begin_fstest auto quick prealloc
 _supported_fs xfs
 _require_test
 _require_scratch
+_require_xfs_io_command allocsp                # detect presence of ALLOCSP ioctl
 _require_test_program allocstale
 
 # Create a 256MB filesystem to avoid running into mkfs problems with too-small