From e926c8ffee93e85e19024adae26a8fb128efd2b1 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Fri, 30 Dec 2022 14:19:06 -0800 Subject: [PATCH] xfs: race fsstress with online scrubbers for AG and fs metadata For each XFS_SCRUB_TYPE_* that looks at AG or filesystem metadata, create a test that runs that scrubber in the foreground and fsstress in the background. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- common/quota | 64 +++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/570 | 37 +++++++++++++++++++++++++++ tests/xfs/570.out | 2 ++ tests/xfs/571 | 37 +++++++++++++++++++++++++++ tests/xfs/571.out | 2 ++ tests/xfs/572 | 37 +++++++++++++++++++++++++++ tests/xfs/572.out | 2 ++ tests/xfs/573 | 37 +++++++++++++++++++++++++++ tests/xfs/573.out | 2 ++ tests/xfs/574 | 38 ++++++++++++++++++++++++++++ tests/xfs/574.out | 2 ++ tests/xfs/575 | 38 ++++++++++++++++++++++++++++ tests/xfs/575.out | 2 ++ tests/xfs/576 | 38 ++++++++++++++++++++++++++++ tests/xfs/576.out | 2 ++ tests/xfs/577 | 39 +++++++++++++++++++++++++++++ tests/xfs/577.out | 2 ++ tests/xfs/578 | 39 +++++++++++++++++++++++++++++ tests/xfs/578.out | 2 ++ tests/xfs/579 | 40 +++++++++++++++++++++++++++++ tests/xfs/579.out | 2 ++ tests/xfs/580 | 44 ++++++++++++++++++++++++++++++++ tests/xfs/580.out | 2 ++ tests/xfs/581 | 40 +++++++++++++++++++++++++++++ tests/xfs/581.out | 2 ++ tests/xfs/582 | 47 ++++++++++++++++++++++++++++++++++ tests/xfs/582.out | 2 ++ tests/xfs/583 | 40 +++++++++++++++++++++++++++++ tests/xfs/583.out | 2 ++ tests/xfs/584 | 40 +++++++++++++++++++++++++++++ tests/xfs/584.out | 2 ++ tests/xfs/585 | 40 +++++++++++++++++++++++++++++ tests/xfs/585.out | 2 ++ tests/xfs/586 | 38 ++++++++++++++++++++++++++++ tests/xfs/586.out | 2 ++ 35 files changed, 767 insertions(+) create mode 100755 tests/xfs/570 create mode 100644 tests/xfs/570.out create mode 100755 tests/xfs/571 create mode 100644 tests/xfs/571.out create mode 100755 tests/xfs/572 create mode 100644 tests/xfs/572.out create mode 100755 tests/xfs/573 create mode 100644 tests/xfs/573.out create mode 100755 tests/xfs/574 create mode 100644 tests/xfs/574.out create mode 100755 tests/xfs/575 create mode 100644 tests/xfs/575.out create mode 100755 tests/xfs/576 create mode 100644 tests/xfs/576.out create mode 100755 tests/xfs/577 create mode 100644 tests/xfs/577.out create mode 100755 tests/xfs/578 create mode 100644 tests/xfs/578.out create mode 100755 tests/xfs/579 create mode 100644 tests/xfs/579.out create mode 100755 tests/xfs/580 create mode 100644 tests/xfs/580.out create mode 100755 tests/xfs/581 create mode 100644 tests/xfs/581.out create mode 100755 tests/xfs/582 create mode 100644 tests/xfs/582.out create mode 100755 tests/xfs/583 create mode 100644 tests/xfs/583.out create mode 100755 tests/xfs/584 create mode 100644 tests/xfs/584.out create mode 100755 tests/xfs/585 create mode 100644 tests/xfs/585.out create mode 100755 tests/xfs/586 create mode 100644 tests/xfs/586.out diff --git a/common/quota b/common/quota index 24251d09..96b8d044 100644 --- a/common/quota +++ b/common/quota @@ -53,6 +53,70 @@ _require_xfs_quota() [ -n "$XFS_QUOTA_PROG" ] || _notrun "XFS quota user tools not installed" } +# Check that a mounted fs has a particular type of quota accounting turned on. +# +# The first argument must be the data device of a mounted fs. It must not be +# the actual mountpath. +# +# The second argument is the quota type ('usrquota', 'grpquota', 'prjquota', +# 'any', or 'all'). +_xfs_quota_acct_enabled() +{ + local dev="$1" + local qtype="$2" + local f_args=() + local any= + + case "$qtype" in + "usrquota"|"uquota") f_args=("-U");; + "grpquota"|"gquota") f_args=("-G");; + "prjquota"|"pquota") f_args=("-P");; + "all") f_args=("-U" "-G" "-P");; + "any") f_args=("-U" "-G" "-P"); any=1;; + *) echo "$qtype: Unknown quota type."; return 1;; + esac + + if [ "$any" = "1" ]; then + for arg in "$f_args"; do + $here/src/feature "$arg" "$dev" && return 0 + done + return 1 + fi + + $here/src/feature "${f_args[@]}" "$dev" +} + +# Require that a mounted fs has a particular type of quota turned on. This +# takes the same arguments as _xfs_quota_acct_enabled. If the third argument is +# '-u' (or is empty and dev is $SCRATCH_DEV) the fs will be unmounted on +# failure. +_require_xfs_quota_acct_enabled() +{ + local dev="$1" + local qtype="$2" + local umount="$3" + local fsname="$dev" + + _xfs_quota_acct_enabled "$dev" "$qtype" "$qmode" && return 0 + + if [ -z "$umount" ] && [ "$dev" = "$SCRATCH_DEV" ]; then + umount="-u" + fi + test "$umount" = "-u" && umount "$dev" &>/dev/null + + case "$dev" in + "$TEST_DEV") fsname="test";; + "$SCRATCH_DEV") fsname="scratch";; + esac + + case "$qtype" in + "any") qtype="any quotas";; + "all") qtype="all quotas";; + esac + + _notrun "$qtype: accounting not enabled on $fsname filesystem." +} + # # checks that xfs_quota can operate on foreign (non-xfs) filesystems # Skips check on xfs filesystems, old xfs_quota is fine there. diff --git a/tests/xfs/570 b/tests/xfs/570 new file mode 100755 index 00000000..9f3ba873 --- /dev/null +++ b/tests/xfs/570 @@ -0,0 +1,37 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 570 +# +# Race fsstress and superblock 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 -s "scrub sb %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/570.out b/tests/xfs/570.out new file mode 100644 index 00000000..3a81a47e --- /dev/null +++ b/tests/xfs/570.out @@ -0,0 +1,2 @@ +QA output created by 570 +Silence is golden diff --git a/tests/xfs/571 b/tests/xfs/571 new file mode 100755 index 00000000..9d22de8f --- /dev/null +++ b/tests/xfs/571 @@ -0,0 +1,37 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 571 +# +# Race fsstress and AGF 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 -s "scrub agf %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/571.out b/tests/xfs/571.out new file mode 100644 index 00000000..71f15d64 --- /dev/null +++ b/tests/xfs/571.out @@ -0,0 +1,2 @@ +QA output created by 571 +Silence is golden diff --git a/tests/xfs/572 b/tests/xfs/572 new file mode 100755 index 00000000..b0e352af --- /dev/null +++ b/tests/xfs/572 @@ -0,0 +1,37 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 572 +# +# Race fsstress and AGFL 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 -s "scrub agfl %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/572.out b/tests/xfs/572.out new file mode 100644 index 00000000..5fa46a33 --- /dev/null +++ b/tests/xfs/572.out @@ -0,0 +1,2 @@ +QA output created by 572 +Silence is golden diff --git a/tests/xfs/573 b/tests/xfs/573 new file mode 100755 index 00000000..a2b6bef3 --- /dev/null +++ b/tests/xfs/573 @@ -0,0 +1,37 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 573 +# +# Race fsstress and AGI 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 -s "scrub agi %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/573.out b/tests/xfs/573.out new file mode 100644 index 00000000..e8779a43 --- /dev/null +++ b/tests/xfs/573.out @@ -0,0 +1,2 @@ +QA output created by 573 +Silence is golden diff --git a/tests/xfs/574 b/tests/xfs/574 new file mode 100755 index 00000000..5a4bad00 --- /dev/null +++ b/tests/xfs/574 @@ -0,0 +1,38 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 574 +# +# Race fsstress and freespace by block btree 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 -s "scrub bnobt %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/574.out b/tests/xfs/574.out new file mode 100644 index 00000000..ec973069 --- /dev/null +++ b/tests/xfs/574.out @@ -0,0 +1,2 @@ +QA output created by 574 +Silence is golden diff --git a/tests/xfs/575 b/tests/xfs/575 new file mode 100755 index 00000000..3d29620f --- /dev/null +++ b/tests/xfs/575 @@ -0,0 +1,38 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 575 +# +# Race fsstress and free space by length btree 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 -s "scrub cntbt %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/575.out b/tests/xfs/575.out new file mode 100644 index 00000000..8bbb2cac --- /dev/null +++ b/tests/xfs/575.out @@ -0,0 +1,2 @@ +QA output created by 575 +Silence is golden diff --git a/tests/xfs/576 b/tests/xfs/576 new file mode 100755 index 00000000..e11476d4 --- /dev/null +++ b/tests/xfs/576 @@ -0,0 +1,38 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 576 +# +# Race fsstress and inode btree 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 inobt %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/576.out b/tests/xfs/576.out new file mode 100644 index 00000000..e102aa20 --- /dev/null +++ b/tests/xfs/576.out @@ -0,0 +1,2 @@ +QA output created by 576 +Silence is golden diff --git a/tests/xfs/577 b/tests/xfs/577 new file mode 100755 index 00000000..d1abe6fa --- /dev/null +++ b/tests/xfs/577 @@ -0,0 +1,39 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 577 +# +# Race fsstress and free inode btree 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 +_require_xfs_has_feature "$SCRATCH_MNT" finobt +_scratch_xfs_stress_scrub -x 'dir' -s "scrub finobt %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/577.out b/tests/xfs/577.out new file mode 100644 index 00000000..5869eafa --- /dev/null +++ b/tests/xfs/577.out @@ -0,0 +1,2 @@ +QA output created by 577 +Silence is golden diff --git a/tests/xfs/578 b/tests/xfs/578 new file mode 100755 index 00000000..8160b7ef --- /dev/null +++ b/tests/xfs/578 @@ -0,0 +1,39 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 578 +# +# Race fsstress and reverse mapping btree 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 +_require_xfs_has_feature "$SCRATCH_MNT" rmapbt +_scratch_xfs_stress_scrub -s "scrub rmapbt %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/578.out b/tests/xfs/578.out new file mode 100644 index 00000000..7b853536 --- /dev/null +++ b/tests/xfs/578.out @@ -0,0 +1,2 @@ +QA output created by 578 +Silence is golden diff --git a/tests/xfs/579 b/tests/xfs/579 new file mode 100755 index 00000000..a00ae02a --- /dev/null +++ b/tests/xfs/579 @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 579 +# +# Race fsstress and reference count btree 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 +. ./common/reflink + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_xfs_stress_scrub + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_require_xfs_has_feature "$SCRATCH_MNT" reflink +_scratch_xfs_stress_scrub -s "scrub refcountbt %agno%" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/579.out b/tests/xfs/579.out new file mode 100644 index 00000000..06f4633b --- /dev/null +++ b/tests/xfs/579.out @@ -0,0 +1,2 @@ +QA output created by 579 +Silence is golden diff --git a/tests/xfs/580 b/tests/xfs/580 new file mode 100755 index 00000000..f49cba64 --- /dev/null +++ b/tests/xfs/580 @@ -0,0 +1,44 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2022 Oracle. All Rights Reserved. +# +# FS QA Test No. 580 +# +# Race fsstress and fscounter scrub on the realtime device 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_realtime +_require_scratch +_require_xfs_stress_scrub + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_require_xfs_has_feature "$SCRATCH_MNT" realtime + +# Force all files to be allocated on the realtime device +_xfs_force_bdev realtime $SCRATCH_MNT + +_scratch_xfs_stress_scrub -s 'scrub fscounters' + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/580.out b/tests/xfs/580.out new file mode 100644 index 00000000..b51684fd --- /dev/null +++ b/tests/xfs/580.out @@ -0,0 +1,2 @@ +QA output created by 580 +Silence is golden diff --git a/tests/xfs/581 b/tests/xfs/581 new file mode 100755 index 00000000..1d08bc7d --- /dev/null +++ b/tests/xfs/581 @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 581 +# +# Race fsstress and realtime bitmap 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_realtime +_require_scratch +_require_xfs_stress_scrub + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_require_xfs_has_feature "$SCRATCH_MNT" realtime +_scratch_xfs_stress_scrub -s "scrub rtbitmap" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/581.out b/tests/xfs/581.out new file mode 100644 index 00000000..12db4d1c --- /dev/null +++ b/tests/xfs/581.out @@ -0,0 +1,2 @@ +QA output created by 581 +Silence is golden diff --git a/tests/xfs/582 b/tests/xfs/582 new file mode 100755 index 00000000..7a8c330b --- /dev/null +++ b/tests/xfs/582 @@ -0,0 +1,47 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 582 +# +# Race fsstress and realtime summary 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_realtime +_require_scratch +_require_xfs_stress_scrub + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_require_xfs_has_feature "$SCRATCH_MNT" realtime + +# XXX the realtime summary scrubber isn't currently implemented upstream. +# Don't bother trying to test it on those kernels +$XFS_IO_PROG -c 'scrub rtsummary' -c 'scrub rtsummary' "$SCRATCH_MNT" 2>&1 | \ + grep -q 'Scan was not complete' && \ + _notrun "rtsummary scrub is incomplete" + +_scratch_xfs_stress_scrub -s "scrub rtsummary" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/582.out b/tests/xfs/582.out new file mode 100644 index 00000000..100f399e --- /dev/null +++ b/tests/xfs/582.out @@ -0,0 +1,2 @@ +QA output created by 582 +Silence is golden diff --git a/tests/xfs/583 b/tests/xfs/583 new file mode 100755 index 00000000..a6121a83 --- /dev/null +++ b/tests/xfs/583 @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 583 +# +# Race fsstress and user quota 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 +. ./common/quota + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_xfs_stress_scrub + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_require_xfs_quota_acct_enabled "$SCRATCH_DEV" usrquota +_scratch_xfs_stress_scrub -s "scrub usrquota" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/583.out b/tests/xfs/583.out new file mode 100644 index 00000000..a2e0382f --- /dev/null +++ b/tests/xfs/583.out @@ -0,0 +1,2 @@ +QA output created by 583 +Silence is golden diff --git a/tests/xfs/584 b/tests/xfs/584 new file mode 100755 index 00000000..c80ba575 --- /dev/null +++ b/tests/xfs/584 @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 584 +# +# Race fsstress and group quota 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 +. ./common/quota + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_xfs_stress_scrub + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_require_xfs_quota_acct_enabled "$SCRATCH_DEV" grpquota +_scratch_xfs_stress_scrub -s "scrub grpquota" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/584.out b/tests/xfs/584.out new file mode 100644 index 00000000..c642da83 --- /dev/null +++ b/tests/xfs/584.out @@ -0,0 +1,2 @@ +QA output created by 584 +Silence is golden diff --git a/tests/xfs/585 b/tests/xfs/585 new file mode 100755 index 00000000..ea47dada --- /dev/null +++ b/tests/xfs/585 @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 585 +# +# Race fsstress and project quota 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 +. ./common/quota + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_xfs_stress_scrub + +_scratch_mkfs > "$seqres.full" 2>&1 +_scratch_mount +_require_xfs_quota_acct_enabled "$SCRATCH_DEV" prjquota +_scratch_xfs_stress_scrub -s "scrub prjquota" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/585.out b/tests/xfs/585.out new file mode 100644 index 00000000..e4dd43b1 --- /dev/null +++ b/tests/xfs/585.out @@ -0,0 +1,2 @@ +QA output created by 585 +Silence is golden diff --git a/tests/xfs/586 b/tests/xfs/586 new file mode 100755 index 00000000..e802ee71 --- /dev/null +++ b/tests/xfs/586 @@ -0,0 +1,38 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. Inc. All Rights Reserved. +# +# FS QA Test No. 586 +# +# Race fsstress and summary counters 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 -s "scrub fscounters" + +# success, all done +echo Silence is golden +status=0 +exit diff --git a/tests/xfs/586.out b/tests/xfs/586.out new file mode 100644 index 00000000..3d36442d --- /dev/null +++ b/tests/xfs/586.out @@ -0,0 +1,2 @@ +QA output created by 586 +Silence is golden -- 2.39.5