xfs/530: skip test if user MKFS_OPTIONS screw up formatting
[xfstests-dev.git] / tests / xfs / 407
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. 407
6 #
7 # Populate a XFS filesystem and fuzz every rtrmapbt record field.
8 # Use xfs_scrub to fix the corruption.
9 #
10 . ./common/preamble
11 _begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime
12
13 _register_cleanup "_cleanup" BUS
14
15 # Import common functions.
16 . ./common/filter
17 . ./common/populate
18 . ./common/fuzzy
19
20 # real QA test starts here
21 _supported_fs xfs
22 _require_realtime
23 _require_xfs_scratch_rmapbt
24 _require_scratch_xfs_fuzz_fields
25
26 echo "Format and populate"
27 _scratch_populate_cached nofill > $seqres.full 2>&1
28
29 inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'sb 0' 'addr rrmapino')
30
31 echo "Fuzz rtrmapbt recs"
32 _scratch_xfs_fuzz_metadata '' 'online' 'sb 0' 'addr rrmapino' "addr u${inode_ver}.rtrmapbt.ptrs[1]" >> $seqres.full
33 echo "Done fuzzing rtrmapbt recs"
34
35 # success, all done
36 status=0
37 exit