aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-01-25 18:11:54 -0800
committerEryu Guan <guaneryu@gmail.com>2022-02-14 01:02:36 +0800
commit290e6c83e8d8232a98c0bf154ea3c6d7e7a09b0d (patch)
tree578230743422126871a9456f3da681fa405c5169
parent705d9aff1d287ba3b65f6deee8ff9e1e1ff9617a (diff)
downloadxfstests-dev-290e6c83e8d8232a98c0bf154ea3c6d7e7a09b0d.tar.gz
fstests: skip tests that require XFS_IOC_ALLOCSP
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>
-rw-r--r--common/rc4
-rw-r--r--ltp/fsstress.c4
-rwxr-xr-xtests/xfs/1071
3 files changed, 7 insertions, 2 deletions
diff --git a/common/rc b/common/rc
index 73f484bd8b..bc4a4559a8 100644
--- 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")
diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index 5f3126e674..23188467ae 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -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
diff --git a/tests/xfs/107 b/tests/xfs/107
index 577094b292..1ea9c49260 100755
--- a/tests/xfs/107
+++ b/tests/xfs/107
@@ -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