]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: test xfs_healer's event handling
authorDarrick J. Wong <djwong@kernel.org>
Tue, 10 Mar 2026 03:51:26 +0000 (20:51 -0700)
committerZorro Lang <zlang@kernel.org>
Tue, 17 Mar 2026 03:31:43 +0000 (11:31 +0800)
Make sure that xfs_healer can handle every type of event that the kernel
can throw at it by initiating a full scrub of a test filesystem.

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

diff --git a/tests/xfs/657 b/tests/xfs/657
new file mode 100755 (executable)
index 0000000..0cc9221
--- /dev/null
@@ -0,0 +1,43 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024-2026 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 657
+#
+# Make sure that xfs_healer correctly handles all the reports that it gets
+# from the kernel.  We simulate this by using the --everything mode so we get
+# all the events, not just the sickness reports.
+#
+. ./common/preamble
+_begin_fstest auto selfhealing
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/systemd
+. ./common/populate
+
+_require_scrub
+_require_xfs_io_command "scrub"                # online check support
+_require_command "$XFS_HEALER_PROG" "xfs_healer"
+_require_scratch
+
+# Does this fs support health monitoring?
+_scratch_mkfs >> $seqres.full
+_scratch_mount
+_require_xfs_healer $SCRATCH_MNT
+_scratch_unmount
+
+# Create a sample fs with all the goodies
+_scratch_populate_cached nofill &>> $seqres.full
+_scratch_mount
+
+_scratch_invoke_xfs_healer "$tmp.healer" --everything
+
+# Run scrub to make some noise
+_scratch_scrub -b -n >> $seqres.full
+
+_scratch_kill_xfs_healer
+cat $tmp.healer >> $seqres.full
+
+echo Silence is golden
+_exit 0
diff --git a/tests/xfs/657.out b/tests/xfs/657.out
new file mode 100644 (file)
index 0000000..8d9c7cf
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 657
+Silence is golden