diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-12-30 14:19:18 -0800 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-02-18 14:39:33 +0800 |
commit | ee1df86f65bed5206ad3d4d23c78179a7571f4da (patch) | |
tree | cacfbd02f4c64a7119b254857a91de45a6831725 /tests/xfs | |
parent | b3fc8bc8f7c00855fcb91e8d9349901552d9d1f7 (diff) |
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 <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'tests/xfs')
-rwxr-xr-x | tests/xfs/717 | 37 | ||||
-rw-r--r-- | tests/xfs/717.out | 2 | ||||
-rwxr-xr-x | tests/xfs/718 | 39 | ||||
-rw-r--r-- | tests/xfs/718.out | 2 | ||||
-rwxr-xr-x | tests/xfs/719 | 39 | ||||
-rw-r--r-- | tests/xfs/719.out | 2 |
6 files changed, 121 insertions, 0 deletions
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 |