]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/757: fix various bugs in this test
authorDarrick J. Wong <djwong@kernel.org>
Tue, 26 Nov 2024 01:20:47 +0000 (17:20 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 28 Nov 2024 13:39:48 +0000 (21:39 +0800)
Fix this test so the check doesn't fail on XFS, and restrict runtime to
100 loops because otherwise this test takes many hours.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/757

index 0ff5a8ac00182b8e5311a9d64bf9b4b8d442594a..37cf49e6bc7fd9784f34565c4efdb9d559d6f5fd 100755 (executable)
@@ -63,9 +63,14 @@ prev=$(_log_writes_mark_to_entry_number mkfs)
 cur=$(_log_writes_find_next_fua $prev)
 [ -z "$cur" ] && _fail "failed to locate next FUA write"
 
-while [ ! -z "$cur" ]; do
+while _soak_loop_running $((100 * TIME_FACTOR)); do
        _log_writes_replay_log_range $cur $SCRATCH_DEV >> $seqres.full
 
+       # xfs_repair won't run if the log is dirty
+       if [ $FSTYP = "xfs" ]; then
+               _scratch_mount
+               _scratch_unmount
+       fi
        _check_scratch_fs
 
        prev=$cur