From 8e5ed6fcef9644fba010f1e9bc82fc88df9519f8 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 9 Mar 2026 20:52:28 -0700 Subject: [PATCH] xfs: test xfs_healer can report filesystem shutdowns Make sure that xfs_healer can actually report abnormal filesystem shutdowns. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- tests/xfs/661 | 36 ++++++++++++++++++++++++++++++++++++ tests/xfs/661.out | 4 ++++ 2 files changed, 40 insertions(+) create mode 100755 tests/xfs/661 create mode 100755 tests/xfs/661.out diff --git a/tests/xfs/661 b/tests/xfs/661 new file mode 100755 index 00000000..f3f74cfe --- /dev/null +++ b/tests/xfs/661 @@ -0,0 +1,36 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2024-2026 Oracle. All Rights Reserved. +# +# FS QA Test No. 661 +# +# Check that xfs_healer can report filesystem shutdowns. + +. ./common/preamble +_begin_fstest auto quick scrub eio selfhealing shutdown + +. ./common/fuzzy +. ./common/filter +. ./common/systemd + +_require_scratch_nocheck +_require_scrub +_require_command "$XFS_HEALER_PROG" "xfs_healer" + +_scratch_mkfs >> $seqres.full +_scratch_mount +_require_xfs_healer $SCRATCH_MNT +$XFS_IO_PROG -f -c "pwrite -S 0x58 0 500k" -c "fsync" $victim >> $seqres.full + +echo "Start healer and shut down" +_scratch_invoke_xfs_healer "$tmp.healer" +_scratch_shutdown -f + +# Unmount filesystem to start fresh +echo "Kill healer" +_scratch_kill_xfs_healer +cat $tmp.healer >> $seqres.full +cat $tmp.healer | _filter_scratch | grep 'shut down' + +# success, all done +_exit 0 diff --git a/tests/xfs/661.out b/tests/xfs/661.out new file mode 100755 index 00000000..5ec782d9 --- /dev/null +++ b/tests/xfs/661.out @@ -0,0 +1,4 @@ +QA output created by 661 +Start healer and shut down +Kill healer +SCRATCH_MNT: filesystem shut down due to forced unmount -- 2.47.3