generic/391: add _require_odirect
authorJakob Unterwurzacher <jakobunt@gmail.com>
Tue, 12 Jun 2018 19:39:40 +0000 (21:39 +0200)
committerEryu Guan <guaneryu@gmail.com>
Wed, 13 Jun 2018 01:48:53 +0000 (09:48 +0800)
On filesystems that do not support O_DIRECT, the test should skip
itself with

 generic/391  [not run] O_DIRECT is not supported

instead of failing with

 generic/391  - output mismatch ...
     ...
     +open: Invalid argument
      Silence is golden
     ...

This patch make it do that by adding a call to _require_odirect.
Fixes https://github.com/rfjakob/gocryptfs/issues/244 .

Signed-off-by: Jakob Unterwurzacher <jakobunt@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/391

index a367dcaa766f1535f4f07b9470d18503d0a8f567..724424d68a0a551899747b9eb9b787ac513178e5 100755 (executable)
@@ -38,6 +38,7 @@ _supported_os Linux
 _require_test
 _require_xfs_io_command "falloc"
 _require_test_program "dio-interleaved"
+_require_odirect
 
 extent_size="$(($(_get_block_size "$TEST_DIR") * 2))"
 num_extents=1024