]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: race fsstress with online repair of dirs and parent pointers
authorDarrick J. Wong <djwong@kernel.org>
Fri, 30 Dec 2022 22:19:58 +0000 (14:19 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 2 Mar 2023 09:54:22 +0000 (17:54 +0800)
Create tests to race fsstress with directories and directory parent
pointer repair while running fsstress in the background.

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/796 [new file with mode: 0755]
tests/xfs/796.out [new file with mode: 0644]
tests/xfs/797 [new file with mode: 0755]
tests/xfs/797.out [new file with mode: 0644]

diff --git a/tests/xfs/796 b/tests/xfs/796
new file mode 100755 (executable)
index 0000000..907e9b5
--- /dev/null
@@ -0,0 +1,37 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022 Oracle. Inc.  All Rights Reserved.
+#
+# FS QA Test No. 796
+#
+# Race fsstress and directory repair for a while to see if we crash or livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair dangerous_fsstress_repair
+
+_cleanup() {
+       _scratch_xfs_stress_scrub_cleanup &> /dev/null
+       cd /
+       rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+# 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 -x 'dir' -s "repair directory" -t "%dir%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/796.out b/tests/xfs/796.out
new file mode 100644 (file)
index 0000000..374e377
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 796
+Silence is golden
diff --git a/tests/xfs/797 b/tests/xfs/797
new file mode 100755 (executable)
index 0000000..0811780
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022 Oracle. Inc.  All Rights Reserved.
+#
+# FS QA Test No. 797
+#
+# Race fsstress and parent pointers repair for a while to see if we crash or
+# livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair dangerous_fsstress_repair
+
+_cleanup() {
+       _scratch_xfs_stress_scrub_cleanup &> /dev/null
+       cd /
+       rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+# 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 -s "repair parent" -t "%dir%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/797.out b/tests/xfs/797.out
new file mode 100644 (file)
index 0000000..6b64f4b
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 797
+Silence is golden