diff mbox series

[1/2] generic/{436,445}: check falloc support

Message ID 20190226140902.32219-1-amir73il@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] generic/{436,445}: check falloc support | expand

Commit Message

Amir Goldstein Feb. 26, 2019, 2:09 p.m. UTC
The sanity test case in those tests (i.e. 13..17)
are all skipped in fs with no falloc support, but the tests
are reported to pass.

For example, from 445.full:

 File system supports the default behavior.
 File system does not support fallocate.
 Allocation size: 4096
 17. Test file with unwritten extents, data-hole-data inside page
 Test skipped as fs doesn't support unwritten extents.

Explicitly check for falloc support before running those tests
so they would be properly reported as skipped.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 tests/generic/436   | 2 ++
 tests/generic/445   | 2 ++
 tests/generic/group | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

Comments

Eryu Guan March 2, 2019, 3:26 p.m. UTC | #1
On Tue, Feb 26, 2019 at 04:09:01PM +0200, Amir Goldstein wrote:
> The sanity test case in those tests (i.e. 13..17)
> are all skipped in fs with no falloc support, but the tests
> are reported to pass.
> 
> For example, from 445.full:
> 
>  File system supports the default behavior.
>  File system does not support fallocate.
>  Allocation size: 4096
>  17. Test file with unwritten extents, data-hole-data inside page
>  Test skipped as fs doesn't support unwritten extents.
> 
> Explicitly check for falloc support before running those tests
> so they would be properly reported as skipped.
> 
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>

This patch looks fine, I'm taking it for this week's update.

Thanks,
Eryu
diff mbox series

Patch

diff --git a/tests/generic/436 b/tests/generic/436
index 3ed22c96..a3ef70e5 100755
--- a/tests/generic/436
+++ b/tests/generic/436
@@ -24,6 +24,8 @@  _supported_os Linux
 
 _require_test
 _require_seek_data_hole
+# All the seek sanity test cases here do falloc
+_require_xfs_io_command "falloc"
 
 BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
 
diff --git a/tests/generic/445 b/tests/generic/445
index e697cca0..694913ae 100755
--- a/tests/generic/445
+++ b/tests/generic/445
@@ -24,6 +24,8 @@  _supported_os Linux
 
 _require_test
 _require_seek_data_hole
+# All the seek sanity test cases here do falloc
+_require_xfs_io_command "falloc"
 
 BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
 
diff --git a/tests/generic/group b/tests/generic/group
index 31011ac8..15227b67 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -438,7 +438,7 @@ 
 433 auto quick copy
 434 auto quick copy
 435 auto encrypt
-436 auto quick rw seek
+436 auto quick rw seek prealloc
 437 auto quick dax
 438 auto
 439 auto quick punch
@@ -447,7 +447,7 @@ 
 442 blockdev
 443 auto quick rw
 444 auto quick acl
-445 auto quick rw seek
+445 auto quick rw seek prealloc
 446 auto quick rw punch
 447 auto clone
 448 auto quick rw seek