xfs/007: fix regressions on V4 filesystems
[xfstests-dev.git] / tests / xfs / 425
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Oracle, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 425
6 #
7 # Populate a XFS filesystem and fuzz every user dquot field.
8 # Use xfs_repair to fix the corruption.
9 #
10 . ./common/preamble
11 _begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
12
13 _register_cleanup "_cleanup" BUS
14
15 # Import common functions.
16 . ./common/filter
17 . ./common/populate
18 . ./common/fuzzy
19 . ./common/quota
20
21 # real QA test starts here
22 _supported_fs xfs
23 _require_scratch_xfs_fuzz_fields
24 _require_quota
25
26 echo "Format and populate"
27 _scratch_populate_cached nofill > $seqres.full 2>&1
28 echo "${MOUNT_OPTIONS}" | grep -q 'usrquota' || _notrun "user quota disabled"
29
30 echo "Fuzz user 0 dquot"
31 _scratch_xfs_fuzz_metadata '' 'offline'  "dquot -u 0" >> $seqres.full
32 echo "Done fuzzing dquot"
33
34 # success, all done
35 status=0
36 exit