Skip to contentSkip to conversation

XFS TESTS: Expand 252 punch hole test

PATCH In review Allison Henderson 3 participants 4 messages Jun 6, 2011 – Jun 20, 2011 VFS

lore
Share & tools
lore
#0 lore raw

PATCH v5 2/3 XFS TESTS: Expand 252 punch hole test

This patch adds additional punch hole tests to 252 that were used to test ext4 punch hole. The _test_generic_punch routine has been modified to accept two new flags:

-k To keep the test file between tests.
This will test the handling of existing holes

-d To not sync the file between tests.
This will test the handling of delayed extents

Four new corner cases have also been added to the routine:
14. data -> hole @ EOF
15. data -> hole @ 0
16. data -> cache cold ->hole
17. data -> hole in single block file

---
:100755 100755 dfdf3f8... 5efa243... M 252
:100644 100644 cd8e4b4... 930c924... M 252.out
:100644 100644 e2da5d8... ddf63b0... M common.punch

 252          |   10 +++
 252.out      |  192 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 common.punch |  150 ++++++++++++++++++++++++++++++++++++++-------
 3 files changed, 330 insertions(+), 22 deletions(-)
252 +10 -0
index dfdf3f8..5efa243 100755
@@ -52,6 +52,16 @@ _require_xfs_io_fiemap
 
 testfile=$TEST_DIR/252.$$
 
+# Standard punch hole tests
 _test_generic_punch falloc fpunch fpunch fiemap _filter_fiemap $testfile -F
 
+# Delayed allocation punch hole tests
+_test_generic_punch -d falloc fpunch fpunch fiemap _filter_fiemap $testfile -F
+
+# Multi hole punch tests
+_test_generic_punch -k falloc fpunch fpunch fiemap _filter_fiemap $testfile -F
+
+# Delayed allocation multi punch hole tests
+_test_generic_punch -d -k falloc fpunch fpunch fiemap _filter_fiemap $testfile -F
+
 status=0 ; exit
252.out +192 -0

195 lines not on this page · raw message

common.punch +128 -22

246 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw
Quoted 10 lines · Allison Henderson

This patch adds additional punch hole tests to 252 that were used to test ext4 punch hole. The _test_generic_punch routine has been modified to accept two new flags:

(quoted diff) +0 -2
-k To keep the test file between tests.
   This will test the handling of existing holes
 
-d To not sync the file between tests.
   This will test the handling of delayed extents
Quoted 5 lines

Four new corner cases have also been added to the routine:
14. data -> hole @ EOF
15. data -> hole @ 0
16. data -> cache cold ->hole
17. data -> hole in single block file

Looks good, I'll put it in.

#3 lore raw
Quoted 4 lines · Christoph Hellwig

This actually broke 242 due to the new output from the new tests for me.

Next time please do a full xfsqa run before submitting patches.

Ah, sorry about that, I will remember to run the whole xfsqa from now on. I think I have another set I submitted last night that I need to do that with too. I will get it fixed up and resent.

Allison Henderson