Skip to contentSkip to conversation

xfs: test larger dump/restore to/from file

PATCH New Eric Sandeen 1 participant 1 message Oct 12, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: test larger dump/restore to/from file

This test creates a large-ish directory structure using fsstress, and does a dump/restore to make sure we dump all the files.

Without the fix for the regression caused by:
c7cb51d xfs: fix error handling at xfs_inumbers

we will see failures like:

-xfsrestore: 486 directories and 1590 entries processed +xfsrestore: 30 directories and 227 entries processed

as it fails to process all inodes.

I think that existing tests have a much smaller set of files, and so don't trip the bug.

I don't do a file-by-file comparison here, because for some reason the diff output gets garbled; this test only checks that we've dumped & restored the correct number of files.

---

common/dump +7 -2
index 7fe50f6..c42eb2c 100644
@@ -298,15 +298,16 @@ _stable_fs()
 # files,dirs,links,symlinks
 #
 # Pinched from test 013.
+# Takes one argument, the number of ops to perform
 #
-_create_dumpdir_stress()
+_create_dumpdir_stress_num()
 {
     echo "Creating directory system to dump using fsstress."
 
+    _count=$1
     _wipe_fs
 
     _param="-f link=10 -f creat=10 -f mkdir=10 -f truncate=5 -f symlink=10"
-    _count=240
     rm -rf $dump_dir
     if ! mkdir $dump_dir; then
         echo "    failed to mkdir $dump_dir"
@@ -331,6 +332,10 @@ _create_dumpdir_stress()
     _stable_fs
 }
 
+_create_dumpdir_stress() {
+	_create_dumpdir_stress_num 240
+}
+
 _mk_fillconfig1()
 {
     cat <<End-of-File >$tmp.config
tests/xfs/307 new file +50 -0

50 lines not on this page · raw message

tests/xfs/307.out new file +47 -0

47 lines not on this page · raw message

tests/xfs/group +1 -0
index 09bce15..c1eace0 100644
@@ -198,3 +198,4 @@
 304 auto quick quota
 305 auto quota
 306 auto stress log metadata repair
+307 auto stress dump