From: Darrick J. Wong Date: Fri, 30 Dec 2022 22:19:18 +0000 (-0800) Subject: xfs: race fsstress with online repair for special file metadata X-Git-Tag: v2023.02.19~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=74a089e8bcb49d793804c0317239267a8c030ac2;p=xfstests-dev.git xfs: race fsstress with online repair for special file metadata For each XFS_SCRUB_TYPE_* that looks at symbolic link and special file metadata, create a test that runs that repairer in the foreground and fsstress in the background. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- diff --git a/tests/xfs/721 b/tests/xfs/721 new file mode 100755 index 00000000..e6ccc8ba --- /dev/null +++ b/tests/xfs/721 @@ -0,0 +1,38 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 721 +# +# Race fsstress and symlink repair for a while to see if we crash or livelock. +# We can't open special files directly for scrubbing, so we use xfs_scrub(8). +# +. ./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 +XFS_SCRUB_PHASE=3 _scratch_xfs_stress_online_repair -x 'symlink' -S '-k' + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/721.out b/tests/xfs/721.out new file mode 100644 index 00000000..093a84e7 --- /dev/null +++ b/tests/xfs/721.out @@ -0,0 +1,2 @@ +QA output created by 721 +Silence is golden diff --git a/tests/xfs/722 b/tests/xfs/722 new file mode 100755 index 00000000..f53d03b4 --- /dev/null +++ b/tests/xfs/722 @@ -0,0 +1,39 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 722 +# +# Race fsstress and special file repair for a while to see if we crash or +# livelock. We can't open special files directly for scrubbing, so we use +# xfs_scrub(8). +# +. ./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 +XFS_SCRUB_PHASE=3 _scratch_xfs_stress_online_repair -x 'mknod' -S '-k' + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/722.out b/tests/xfs/722.out new file mode 100644 index 00000000..869bd20d --- /dev/null +++ b/tests/xfs/722.out @@ -0,0 +1,2 @@ +QA output created by 722 +Silence is golden