From 82d24c3cdac714614463d01a1ae936efceba04fa Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Fri, 30 Dec 2022 14:19:21 -0800 Subject: [PATCH] xfs: race fsstress with online scrub and repair for quota metadata Create tests to race fsstress with dquot repair while running fsstress in the background. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- tests/xfs/723 | 40 ++++++++++++++++++++++++++++++++++++++++ tests/xfs/723.out | 2 ++ tests/xfs/724 | 40 ++++++++++++++++++++++++++++++++++++++++ tests/xfs/724.out | 2 ++ tests/xfs/725 | 40 ++++++++++++++++++++++++++++++++++++++++ tests/xfs/725.out | 2 ++ 6 files changed, 126 insertions(+) create mode 100755 tests/xfs/723 create mode 100644 tests/xfs/723.out create mode 100755 tests/xfs/724 create mode 100644 tests/xfs/724.out create mode 100755 tests/xfs/725 create mode 100644 tests/xfs/725.out diff --git a/tests/xfs/723 b/tests/xfs/723 new file mode 100755 index 00000000..b6af6ef1 --- /dev/null +++ b/tests/xfs/723 @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 723 +# +# Race fsstress and user quota 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/quota + +# 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_quota_acct_enabled "$SCRATCH_DEV" usrquota +_scratch_xfs_stress_online_repair -s "repair usrquota" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/723.out b/tests/xfs/723.out new file mode 100644 index 00000000..4036d5fd --- /dev/null +++ b/tests/xfs/723.out @@ -0,0 +1,2 @@ +QA output created by 723 +Silence is golden diff --git a/tests/xfs/724 b/tests/xfs/724 new file mode 100755 index 00000000..2061b51f --- /dev/null +++ b/tests/xfs/724 @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 724 +# +# Race fsstress and group quota 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/quota + +# 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_quota_acct_enabled "$SCRATCH_DEV" grpquota +_scratch_xfs_stress_online_repair -s "repair grpquota" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/724.out b/tests/xfs/724.out new file mode 100644 index 00000000..2d22107c --- /dev/null +++ b/tests/xfs/724.out @@ -0,0 +1,2 @@ +QA output created by 724 +Silence is golden diff --git a/tests/xfs/725 b/tests/xfs/725 new file mode 100755 index 00000000..7317d048 --- /dev/null +++ b/tests/xfs/725 @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 725 +# +# Race fsstress and project quota 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/quota + +# 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_quota_acct_enabled "$SCRATCH_DEV" prjquota +_scratch_xfs_stress_online_repair -s "repair prjquota" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/725.out b/tests/xfs/725.out new file mode 100644 index 00000000..128709eb --- /dev/null +++ b/tests/xfs/725.out @@ -0,0 +1,2 @@ +QA output created by 725 +Silence is golden -- 2.39.5