diff mbox

[10/8] common/rc: test that the xfs_io scrub/repair commands actually work

Message ID 20170630041239.GE5871@birch.djwong.org (mailing list archive)
State New, archived
Headers show

Commit Message

Darrick J. Wong June 30, 2017, 4:12 a.m. UTC
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 <darrick.wong@oracle.com>
---
 common/rc |    5 +++++
 1 file changed, 5 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/common/rc b/common/rc
index 0062f6f..a3addad 100644
--- a/common/rc
+++ b/common/rc
@@ -2186,6 +2186,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`
 		;;