From: Eric Whitney Date: Mon, 14 Apr 2014 00:37:33 +0000 (+1000) Subject: generic/311: add fallocate() check X-Git-Tag: v2022.05.01~3175 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f72961645f85a006591f45ec87a1a69401d27661;p=xfstests-dev.git generic/311: add fallocate() check Generic/311 fails when run on a test filesystem that does not support fallocate(). Its I/O load is produced by fsync-tester, which uses fallocate() system calls to allocate blocks for some of its test cases. This causes EOPNOTSUPP failures when the test is run on indirect block-mapped ext4 filesystems. Verify that the test filesystem supports fallocate() before proceeding with the test, checking for block allocation capabilities. Also, fix a minor error message typo. Signed-off-by: Eric Whitney Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/tests/generic/311 b/tests/generic/311 old mode 100644 new mode 100755 index 6802a964..284b59d5 --- a/tests/generic/311 +++ b/tests/generic/311 @@ -57,7 +57,11 @@ _need_to_be_root _require_scratch _require_dm_flakey -[ -x $here/src/fsync-tester ] || _notrun "fsync-tester not build" +# xfs_io is not required for this test, but it's the best way to verify +# the test system supports fallocate() for allocation +_require_xfs_io_falloc + +[ -x $here/src/fsync-tester ] || _notrun "fsync-tester not built" rm -f $seqres.full SEED=1