generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / xfs / 755
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2022 Oracle.  All Rights Reserved.
4 #
5 # FS QA Test No. 755
6 #
7 # Populate a XFS filesystem and fuzz every finobt field.
8 # Try online repair and, if necessary, offline repair,
9 # to test the most likely usage pattern.
10
11 . ./common/preamble
12 _begin_fstest dangerous_fuzzers dangerous_bothrepair
13
14 _register_cleanup "_cleanup" BUS
15
16 # Import common functions.
17 . ./common/filter
18 . ./common/populate
19 . ./common/fuzzy
20
21 # real QA test starts here
22 _supported_fs xfs
23 _require_scratch_xfs_fuzz_fields
24 _disable_dmesg_check
25 _require_xfs_finobt
26
27 echo "Format and populate"
28 _scratch_populate_cached nofill > $seqres.full 2>&1
29
30 path="$(_scratch_xfs_find_agbtree_height 'fino' 2)" || \
31         _fail "could not find two-level finobt"
32
33 echo "Fuzz finobt"
34 _scratch_xfs_fuzz_metadata '' 'both'  "$path" 'addr free_root' 'addr ptrs[1]' >> $seqres.full
35 echo "Done fuzzing finobt"
36
37 # success, all done
38 status=0
39 exit