From: Darrick J. Wong Date: Tue, 10 Mar 2026 03:52:28 +0000 (-0700) Subject: xfs: test xfs_healer can report filesystem shutdowns X-Git-Tag: v2026.03.20~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e5ed6fcef9644fba010f1e9bc82fc88df9519f8;p=xfstests-dev.git 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 --- 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