diff mbox series

[4/7] xfs: race fsstress with realtime refcount btree scrub and repair

Message ID 173992591827.4081089.9026111603191501024.stgit@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series [1/7] common/populate: create realtime refcount btree | expand

Commit Message

Darrick J. Wong Feb. 19, 2025, 1:08 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Race checking and rebuilding realtime refcount btrees with fsstress.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/1818     |   40 ++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1818.out |    2 ++
 tests/xfs/1819     |   40 ++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1819.out |    2 ++
 tests/xfs/1893     |    2 +-
 5 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100755 tests/xfs/1818
 create mode 100644 tests/xfs/1818.out
 create mode 100755 tests/xfs/1819
 create mode 100644 tests/xfs/1819.out

Comments

Christoph Hellwig Feb. 19, 2025, 7:43 a.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/tests/xfs/1818 b/tests/xfs/1818
new file mode 100755
index 00000000000000..eb0b4a61722d81
--- /dev/null
+++ b/tests/xfs/1818
@@ -0,0 +1,40 @@ 
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1818
+#
+# Race fsstress and rt refcount btree scrub for a while to see if we crash or
+# livelock.
+#
+. ./common/preamble
+_begin_fstest scrub fsstress_scrub
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_scrub
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_require_xfs_has_feature "$SCRATCH_MNT" reflink
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+_scratch_xfs_stress_scrub -s "scrub rtrefcountbt %rgno%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1818.out b/tests/xfs/1818.out
new file mode 100644
index 00000000000000..700d301da1450c
--- /dev/null
+++ b/tests/xfs/1818.out
@@ -0,0 +1,2 @@ 
+QA output created by 1818
+Silence is golden
diff --git a/tests/xfs/1819 b/tests/xfs/1819
new file mode 100755
index 00000000000000..53cf18d5549ce9
--- /dev/null
+++ b/tests/xfs/1819
@@ -0,0 +1,40 @@ 
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1819
+#
+# Race fsstress and rt refcount btree scrub for a while to see if we crash or
+# livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair fsstress_online_repair
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_online_repair
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_require_xfs_has_feature "$SCRATCH_MNT" reflink
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+_scratch_xfs_stress_online_repair -s "repair rtrefcountbt %rgno%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1819.out b/tests/xfs/1819.out
new file mode 100644
index 00000000000000..041e17ab61eaef
--- /dev/null
+++ b/tests/xfs/1819.out
@@ -0,0 +1,2 @@ 
+QA output created by 1819
+Silence is golden
diff --git a/tests/xfs/1893 b/tests/xfs/1893
index 1f04da0028a12a..b0066b7e15e605 100755
--- a/tests/xfs/1893
+++ b/tests/xfs/1893
@@ -46,7 +46,7 @@  done
 
 # Metapath verbs that take a rt group number
 for ((rgno = 0; rgno < rgcount; rgno++)); do
-	for v in rtbitmap rtsummary rtrmapbt; do
+	for v in rtbitmap rtsummary rtrmapbt rtrefcbt; do
 		testio=$(try_verb "$v" "$rgno")
 		test -z "$testio" && verbs+=("$v $rgno")
 	done