From ee1df86f65bed5206ad3d4d23c78179a7571f4da Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Fri, 30 Dec 2022 14:19:18 -0800 Subject: xfs: race fsstress with online repair for inode and fork metadata For each XFS_SCRUB_TYPE_* that looks at inode and data/attr/cow fork 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 --- tests/xfs/717 | 37 +++++++++++++++++++++++++++++++++++++ tests/xfs/717.out | 2 ++ tests/xfs/718 | 39 +++++++++++++++++++++++++++++++++++++++ tests/xfs/718.out | 2 ++ tests/xfs/719 | 39 +++++++++++++++++++++++++++++++++++++++ tests/xfs/719.out | 2 ++ 6 files changed, 121 insertions(+) create mode 100755 tests/xfs/717 create mode 100644 tests/xfs/717.out create mode 100755 tests/xfs/718 create mode 100644 tests/xfs/718.out create mode 100755 tests/xfs/719 create mode 100644 tests/xfs/719.out (limited to 'tests/xfs') diff --git a/tests/xfs/717 b/tests/xfs/717 new file mode 100755 index 00000000..ba00a710 --- /dev/null +++ b/tests/xfs/717 @@ -0,0 +1,37 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 717 +# +# Race fsstress and data fork 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 -s "repair bmapbtd" -t "%datafile%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/717.out b/tests/xfs/717.out new file mode 100644 index 00000000..383225a9 --- /dev/null +++ b/tests/xfs/717.out @@ -0,0 +1,2 @@ +QA output created by 717 +Silence is golden diff --git a/tests/xfs/718 b/tests/xfs/718 new file mode 100755 index 00000000..cc0efa7a --- /dev/null +++ b/tests/xfs/718 @@ -0,0 +1,39 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 718 +# +# Race fsstress and attr fork 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 +. ./common/attr + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_attrs +_require_xfs_stress_online_repair + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_scratch_xfs_stress_online_repair -x 'xattr' -s "repair bmapbta" -t "%attrfile%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/718.out b/tests/xfs/718.out new file mode 100644 index 00000000..1dad5ab3 --- /dev/null +++ b/tests/xfs/718.out @@ -0,0 +1,2 @@ +QA output created by 718 +Silence is golden diff --git a/tests/xfs/719 b/tests/xfs/719 new file mode 100755 index 00000000..9e28958e --- /dev/null +++ b/tests/xfs/719 @@ -0,0 +1,39 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 719 +# +# Race fsstress and CoW fork 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 +. ./common/reflink + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_xfs_stress_online_repair + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_require_xfs_has_feature "$SCRATCH_MNT" reflink +_scratch_xfs_stress_online_repair -s "repair bmapbtc" -t "%cowfile%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/719.out b/tests/xfs/719.out new file mode 100644 index 00000000..25585fa0 --- /dev/null +++ b/tests/xfs/719.out @@ -0,0 +1,2 @@ +QA output created by 719 +Silence is golden -- cgit v1.2.3