]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: stress test xfs_scrub(8) with freeze and ro-remount loops v2023.01.15
authorDarrick J. Wong <djwong@kernel.org>
Fri, 30 Dec 2022 22:13:00 +0000 (14:13 -0800)
committerZorro Lang <zlang@kernel.org>
Sat, 14 Jan 2023 13:56:34 +0000 (21:56 +0800)
Make sure we don't trip over any asserts or livelock when scrub races
with filesystem freezing and readonly remounts.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/561 [new file with mode: 0755]
tests/xfs/561.out [new file with mode: 0644]
tests/xfs/562 [new file with mode: 0755]
tests/xfs/562.out [new file with mode: 0644]
tests/xfs/563 [new file with mode: 0755]
tests/xfs/563.out [new file with mode: 0644]
tests/xfs/564 [new file with mode: 0755]
tests/xfs/564.out [new file with mode: 0644]

diff --git a/tests/xfs/561 b/tests/xfs/561
new file mode 100755 (executable)
index 0000000..c1d68c6
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 561
+#
+# Race xfs_scrub in check-only mode and ro remount for a while to see if we
+# crash or livelock.
+#
+. ./common/preamble
+_begin_fstest scrub dangerous_fsstress_scrub
+
+# Override the default cleanup function.
+_cleanup()
+{
+       cd /
+       _scratch_xfs_stress_scrub_cleanup &> /dev/null
+       _scratch_remount rw
+       rm -rf $tmp.*
+}
+
+# Import common functions.
+. ./common/filter
+. ./common/fuzzy
+. ./common/xfs
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_xfs_stress_scrub
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_scratch_xfs_stress_scrub -r 5 -S '-n'
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/xfs/561.out b/tests/xfs/561.out
new file mode 100644 (file)
index 0000000..5e46f61
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 561
+Silence is golden
diff --git a/tests/xfs/562 b/tests/xfs/562
new file mode 100755 (executable)
index 0000000..a5c6e88
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 562
+#
+# Race xfs_scrub in check-only mode and freeze for a while to see if we crash
+# or livelock.
+#
+. ./common/preamble
+_begin_fstest scrub dangerous_fsstress_scrub
+
+# Override the default cleanup function.
+_cleanup()
+{
+       cd /
+       _scratch_xfs_stress_scrub_cleanup &> /dev/null
+       _scratch_remount rw
+       rm -rf $tmp.*
+}
+
+# Import common functions.
+. ./common/filter
+. ./common/fuzzy
+. ./common/xfs
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_xfs_stress_scrub
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_scratch_xfs_stress_scrub -f -S '-n'
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/xfs/562.out b/tests/xfs/562.out
new file mode 100644 (file)
index 0000000..6203d9a
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 562
+Silence is golden
diff --git a/tests/xfs/563 b/tests/xfs/563
new file mode 100755 (executable)
index 0000000..409a42b
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 563
+#
+# Race xfs_scrub in force-repair mdoe and freeze for a while to see if we crash
+# or livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair dangerous_fsstress_repair
+
+# Override the default cleanup function.
+_cleanup()
+{
+       cd /
+       _scratch_xfs_stress_scrub_cleanup &> /dev/null
+       _scratch_remount rw
+       rm -rf $tmp.*
+}
+
+# Import common functions.
+. ./common/filter
+. ./common/fuzzy
+. ./common/xfs
+. ./common/inject
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_xfs_stress_online_repair
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_scratch_xfs_stress_online_repair -f -S '-k'
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/xfs/563.out b/tests/xfs/563.out
new file mode 100644 (file)
index 0000000..76aea88
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 563
+Silence is golden
diff --git a/tests/xfs/564 b/tests/xfs/564
new file mode 100755 (executable)
index 0000000..11b3fec
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 564
+#
+# Race xfs_scrub in force-repair mode and ro remount for a while to see if we
+# crash or livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair dangerous_fsstress_repair
+
+# Override the default cleanup function.
+_cleanup()
+{
+       cd /
+       _scratch_xfs_stress_scrub_cleanup &> /dev/null
+       _scratch_remount rw
+       rm -rf $tmp.*
+}
+
+# Import common functions.
+. ./common/filter
+. ./common/fuzzy
+. ./common/xfs
+. ./common/inject
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_xfs_stress_online_repair
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_scratch_xfs_stress_online_repair -r 5 -S '-k'
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/xfs/564.out b/tests/xfs/564.out
new file mode 100644 (file)
index 0000000..4012aca
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 564
+Silence is golden