From c2c1a3f8c42331829c6e8c1fe06c547a961d5dda Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Fri, 30 Dec 2022 14:19:27 -0800 Subject: [PATCH] xfs: race fsstress with inode link count check and repair Race fsstress with inode link count checking and repair. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- tests/xfs/728 | 38 ++++++++++++++++++++++++++++++++++++++ tests/xfs/728.out | 2 ++ tests/xfs/729 | 37 +++++++++++++++++++++++++++++++++++++ tests/xfs/729.out | 2 ++ 4 files changed, 79 insertions(+) create mode 100755 tests/xfs/728 create mode 100644 tests/xfs/728.out create mode 100755 tests/xfs/729 create mode 100644 tests/xfs/729.out diff --git a/tests/xfs/728 b/tests/xfs/728 new file mode 100755 index 00000000..17ce9717 --- /dev/null +++ b/tests/xfs/728 @@ -0,0 +1,38 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2022 Oracle. All Rights Reserved. +# +# FS QA Test No. 728 +# +# Race fsstress and inode link count repair for a while to see if we crash or +# livelock. +# +. ./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 +_scratch_xfs_stress_online_repair -x "dir" -s "repair nlinks" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/728.out b/tests/xfs/728.out new file mode 100644 index 00000000..ab39f45f --- /dev/null +++ b/tests/xfs/728.out @@ -0,0 +1,2 @@ +QA output created by 728 +Silence is golden diff --git a/tests/xfs/729 b/tests/xfs/729 new file mode 100755 index 00000000..235cb175 --- /dev/null +++ b/tests/xfs/729 @@ -0,0 +1,37 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2022 Oracle. All Rights Reserved. +# +# FS QA Test No. 729 +# +# Race fsstress and nlinks scrub for a while to see if we crash or livelock. +# +. ./common/preamble +_begin_fstest scrub dangerous_fsstress_scrub + +_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_scrub + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_scratch_xfs_stress_scrub -x "dir" -s "scrub nlinks" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/729.out b/tests/xfs/729.out new file mode 100644 index 00000000..0f175ae2 --- /dev/null +++ b/tests/xfs/729.out @@ -0,0 +1,2 @@ +QA output created by 729 +Silence is golden -- 2.39.5