From: Darrick J. Wong Date: Fri, 30 Jun 2017 04:12:39 +0000 (-0700) Subject: common/rc: test that the xfs_io scrub/repair commands actually work X-Git-Tag: v2022.05.01~1985 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7c0af043221a7baddfb6cf9893d4454d734dc36d;p=xfstests-dev.git common/rc: test that the xfs_io scrub/repair commands actually work When we call _require_xfs_io_command for the scrub ioctl, we have to actually try calling the ioctl to make sure that the ioctl is present on the running kernel. Signed-off-by: Darrick J. Wong Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/rc b/common/rc index 57d596cd..b5053659 100644 --- a/common/rc +++ b/common/rc @@ -2179,6 +2179,11 @@ _require_xfs_io_command() echo $testio | egrep -q "invalid option" && \ _notrun "xfs_io $command support is missing" ;; + "scrub"|"repair") + testio=`$XFS_IO_PROG -x -c "$command dummy 0" $TEST_DIR 2>&1` + echo $testio | egrep -q "Inappropriate ioctl" && \ + _notrun "xfs_io $command support is missing" + ;; "utimes" ) testio=`$XFS_IO_PROG -f -c "utimes" 0 0 0 0 $testfile 2>&1` ;;