]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: fix old fuzz test invocations of xfs_repair
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 May 2021 02:01:56 +0000 (19:01 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 16 May 2021 15:55:27 +0000 (23:55 +0800)
Some of the older blocktrash-based fuzz tests cause the fs to go down
due to the corrupted image and fail to remount.  Offline repair fails
because _repair_scratch_fs is the helper that is smart enough to call
xfs_repair -L, not _scratch_xfs_repair.  Fix these instances.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
24 files changed:
tests/xfs/083
tests/xfs/085
tests/xfs/086
tests/xfs/087
tests/xfs/088
tests/xfs/089
tests/xfs/091
tests/xfs/093
tests/xfs/097
tests/xfs/099
tests/xfs/100
tests/xfs/101
tests/xfs/102
tests/xfs/105
tests/xfs/112
tests/xfs/113
tests/xfs/117
tests/xfs/120
tests/xfs/123
tests/xfs/124
tests/xfs/125
tests/xfs/126
tests/xfs/130
tests/xfs/235

index a3f32cb7b743e0348411d682ffac54239f90246a..14a36416f47efb2a18edd781d0e87241471f027e 100755 (executable)
@@ -44,7 +44,7 @@ scratch_repair() {
 
        FSCK_LOG="${tmp}-fuzz-${fsck_pass}.log"
        echo "++ fsck pass ${fsck_pass}" > "${FSCK_LOG}"
-       _scratch_xfs_repair >> "${FSCK_LOG}" 2>&1
+       _repair_scratch_fs >> "${FSCK_LOG}" 2>&1
        res=$?
        if [ "${res}" -eq 0 ]; then
                echo "++ allegedly fixed, reverify" >> "${FSCK_LOG}"
@@ -105,7 +105,7 @@ echo "+ populate fs image" >> $seqres.full
 _scratch_populate >> $seqres.full
 
 echo "+ check fs" >> $seqres.full
-_scratch_xfs_repair >> $seqres.full 2>&1 || _fail "should pass initial fsck"
+_repair_scratch_fs >> $seqres.full 2>&1 || _fail "should pass initial fsck"
 
 echo "++ corrupt image" >> $seqres.full
 _scratch_xfs_db -x -c blockget -c "blocktrash ${FUZZ_ARGS}" >> $seqres.full 2>&1
@@ -129,7 +129,7 @@ done
 echo "+ fsck loop returns ${fsck_loop_ret}" >> $seqres.full
 
 echo "++ check fs for round 2" >> $seqres.full
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 ROUND2_LOG="${tmp}-round2-${fsck_pass}.log"
 echo "++ mount image (2)" >> $ROUND2_LOG
@@ -150,7 +150,7 @@ umount "${SCRATCH_MNT}" >> $ROUND2_LOG 2>&1
 cat "$ROUND2_LOG" >> $seqres.full
 
 echo "++ check fs (2)" >> $seqres.full
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 egrep -q '(did not fix|makes no progress)' $seqres.full && echo "xfs_repair failed" | tee -a $seqres.full
 if [ "$(wc -l < "$ROUND2_LOG")" -ne 8 ]; then
index 560b5a24ad2eddb0f3faa80bda857895aa01161c..5d8980881d61ab28f06dc51a45981334876211a7 100755 (executable)
@@ -75,7 +75,7 @@ echo "+ mount image"
 _try_scratch_mount 2>/dev/null && _fail "mount should not succeed"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index f94c26b48bd3f169f67622b72c445efdacac9ad6..f4cf950d7d56833a1cd18298966a4ee5b4c95b89 100755 (executable)
@@ -86,7 +86,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image"
 _scratch_mount
@@ -109,7 +109,7 @@ done
 umount "${SCRATCH_MNT}"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image"
 _scratch_mount
index 967791dd99d586e6b2d240829240b1efa862ee49..e7b06e09cfc774ec908e5750dc866bef6bb797f0 100755 (executable)
@@ -86,7 +86,7 @@ fi
 echo "broken: ${broken}"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index fe621d0a665a9e0901a13749f71bef46b84c41a5..6c5cbec83127859e066dad60f22d3f71ece4a503 100755 (executable)
@@ -85,7 +85,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image"
 _scratch_mount
@@ -108,7 +108,7 @@ done
 umount "${SCRATCH_MNT}"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image"
 _scratch_mount
index 3339ff639b6db8c719a020fcca557650dcfbc5af..2892ad9eea06e84e8ca5a5f460548cb42cf1d3e6 100755 (executable)
@@ -85,7 +85,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image"
 _scratch_mount
@@ -109,7 +109,7 @@ done
 umount "${SCRATCH_MNT}"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image"
 _scratch_mount
index 9304849d00fd36902d7a70ab80393a6bdad3fc01..04322cecc36fdef1cb966936d624244950b94dd2 100755 (executable)
@@ -85,7 +85,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image"
 _scratch_mount
@@ -109,7 +109,7 @@ done
 umount "${SCRATCH_MNT}"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image"
 _scratch_mount
index 3bdbff4df950df90c512a6fc90279d7fb9cdd703..9a61cc3eef542ff0b96b85fc53a25a92e15ad186 100755 (executable)
@@ -86,7 +86,7 @@ fi
 echo "broken: ${broken}"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index f8ea46767bfba6cc244aaaf311118c15ca0e462b..98648c9e1fcb481c3ea4c80bf0a118f80d0c8c3d 100755 (executable)
@@ -88,7 +88,7 @@ fi
 echo "broken: ${broken}"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 0cf1968202c64cc2bde1c6a4ae007f5225bc7f5c..9a1408b84de3fa051e41b9b81703f59cdaea24da 100755 (executable)
@@ -74,8 +74,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 44d175cc9f61c515ceb7084b3d326469e100d76f..277f26ec5949338d58d8686a406fba3001d491e9 100755 (executable)
@@ -79,8 +79,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 023cc349b99ee8d2a0f63556a42c3ac2971ee306..6eb303ad5451bcde4f0a7a99d7d47b4d6665a9b4 100755 (executable)
@@ -74,8 +74,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 907b859235cc976ef2871c0d0b26a5f35635478a..23326ecf98dda26497998e84613096d2e1a55e85 100755 (executable)
@@ -79,8 +79,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index bb7e93e1a4e872a4105c56d95c4a014e8adcb6bb..7aeee7f0b93f120f34295fb5aac2795d174d2166 100755 (executable)
@@ -79,8 +79,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index cf0a36d0d768746cb273b859fcf000e3b5e0877f..085f21ee38cae4481c3d2e046c6c823ee3713109 100755 (executable)
@@ -79,11 +79,11 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 if [ $? -eq 2 ]; then
        _scratch_mount
        umount "${SCRATCH_MNT}"
-       _scratch_xfs_repair >> $seqres.full 2>&1
+       _repair_scratch_fs >> $seqres.full 2>&1
 fi
 
 echo "+ mount image (2)"
index 3ab3cf5ee7daec2fec8e3023b4c9686f67094353..3dc51381a0a997ffafd09d122b639ea52280a7cd 100755 (executable)
@@ -79,8 +79,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 15765a56f22ca6c850e8f35d1570400035f0e269..d3f4675fcc16bc5525901d90f323e7b88286af68 100755 (executable)
@@ -88,7 +88,7 @@ fi
 echo "broken: ${broken}"
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 59ac0433ec188546cf78b865ed0e815a3f4e4d95..e66bc763c6049c79060d091647ea1d9dcb297129 100755 (executable)
@@ -73,7 +73,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index a7fae5f6de9a8e37813427453f65f244ca4f46fa..ced453bd5f1803083f5b1f630eab5e448d50be4e 100755 (executable)
@@ -69,7 +69,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index f4b24dd6a05856ca4cf1ed6aaeda9190969657d6..50faa66bee404a097c3c6afd19289971480c3e88 100755 (executable)
@@ -78,8 +78,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 3bdf73c4f3b42b09c85fb4a04405c2d237a78576..c9ee2cf3762ce9d4a5377357f92fc5e11bf81127 100755 (executable)
@@ -78,8 +78,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 3f069c164b1a68e965fa379e7e2e289a5b14ebb3..0ca0670ce64dda3c3d7ca43ea7fc5ff9b59eacee 100755 (executable)
@@ -83,8 +83,8 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
 fi
 
 echo "+ repair fs"
-_scratch_xfs_repair >> $seqres.full 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 9fec009fdae9dbfbc646da7608ec86de6e2f0573..3071eace83a73a12c54fe1596c75e1863f192c2b 100755 (executable)
@@ -70,7 +70,7 @@ _scratch_unmount >> $seqres.full 2>&1
 echo "+ repair fs"
 _disable_dmesg_check
 _repair_scratch_fs >> "$seqres.full" 2>&1
-_scratch_xfs_repair >> "$seqres.full" 2>&1
+_repair_scratch_fs >> "$seqres.full" 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount
index 1ed1942410e3425c33ab31f96cfeb1996a5c3a74..a2ab9e55e98c90e2c23ff7de1ee0a7beb1494a2d 100755 (executable)
@@ -71,7 +71,7 @@ fi
 echo "+ repair fs"
 _disable_dmesg_check
 _repair_scratch_fs >> "$seqres.full" 2>&1
-_scratch_xfs_repair >> $seqres.full 2>&1
+_repair_scratch_fs >> $seqres.full 2>&1
 
 echo "+ mount image (2)"
 _scratch_mount