From: Darrick J. Wong <djwong@xxxxxxxxxx> Fuzz the fs summary counters in the primary super and see if online repair can fix them. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- tests/xfs/713 | 36 ++++++++++++++++++++++++++++++++++++ tests/xfs/713.out | 4 ++++ 2 files changed, 40 insertions(+) create mode 100755 tests/xfs/713 create mode 100644 tests/xfs/713.out diff --git a/tests/xfs/713 b/tests/xfs/713 new file mode 100755 index 0000000000..7ac6d1458f --- /dev/null +++ b/tests/xfs/713 @@ -0,0 +1,36 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2022 Oracle. All Rights Reserved. +# +# FS QA Test No. 713 +# +# Populate a XFS filesystem and fuzz every fscounter field. +# Use xfs_scrub to fix the corruption. +# +. ./common/preamble +_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair + +_register_cleanup "_cleanup" BUS + +# Import common functions. +. ./common/filter +. ./common/populate +. ./common/fuzzy + +# real QA test starts here +_supported_fs xfs +_require_scratch_xfs_fuzz_fields + +echo "Format and populate" +_scratch_populate_cached nofill > $seqres.full 2>&1 + +echo "Fuzz fscounters" +test -z "$SCRATCH_XFS_LIST_METADATA_FIELDS" && + SCRATCH_XFS_LIST_METADATA_FIELDS='icount,ifree,fdblocks' +export SCRATCH_XFS_LIST_METADATA_FIELDS +_scratch_xfs_fuzz_metadata '' 'online' 'sb 0' >> $seqres.full +echo "Done fuzzing fscounters" + +# success, all done +status=0 +exit diff --git a/tests/xfs/713.out b/tests/xfs/713.out new file mode 100644 index 0000000000..6dd322f4ca --- /dev/null +++ b/tests/xfs/713.out @@ -0,0 +1,4 @@ +QA output created by 713 +Format and populate +Fuzz fscounters +Done fuzzing fscounters