xfs/{263,106}: erase max warnings printout
[xfstests-dev.git] / tests / generic / 456
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2017 CTERA Networks. All Rights Reserved.
4 #
5 # FS QA Test No. 456
6 #
7 # This test is motivated by a bug found in ext4 during random crash
8 # consistency tests.
9 #
10 # Fixed by commit 51e3ae81ec58 ("ext4: fix interaction between i_size,
11 # fallocate, and delalloc after a crash")
12 #
13 # This is also a regression test for ext4 bug that zero range can beyond
14 # i_disksize and fixed by commit 801674f34ecf ("ext4: do not zeroout extents
15 # beyond i_disksize").
16 #
17 seq=`basename $0`
18 seqres=$RESULT_DIR/$seq
19 echo "QA output created by $seq"
20
21 here=`pwd`
22 tmp=/tmp/$$
23 status=1        # failure is the default!
24
25 _cleanup()
26 {
27         _cleanup_flakey
28         cd /
29         rm -f $tmp.*
30 }
31 trap "_cleanup; exit \$status" 0 1 2 3 15
32
33 # get standard environment, filters and checks
34 . ./common/rc
35 . ./common/filter
36 . ./common/dmflakey
37
38 # real QA test starts here
39 _supported_fs generic
40 _supported_os Linux
41 _require_scratch
42 _require_dm_target flakey
43 _require_xfs_io_command "falloc" "-k"
44 _require_xfs_io_command "fzero"
45 _require_xfs_io_command "fcollapse"
46
47 rm -f $seqres.full
48
49 _scratch_mkfs >> $seqres.full 2>&1
50 _require_metadata_journaling $SCRATCH_DEV
51
52 _init_flakey
53 _mount_flakey
54
55 # See this post for reverse engineering of this auto generated test:
56 # https://marc.info/?l=linux-ext4&m=151137380830381&w=2
57 fsxops=$tmp.fsxops
58 cat <<EOF > $fsxops
59 write 0x137dd 0xdc69 0x0
60 fallocate 0xb531 0xb5ad 0x21446
61 collapse_range 0x1c000 0x4000 0x21446
62 write 0x3e5ec 0x1a14 0x21446
63 zero_range 0x20fac 0x6d9c 0x40000 keep_size
64 mapwrite 0x216ad 0x274f 0x40000
65 EOF
66 run_check $here/ltp/fsx -d --replay-ops $fsxops $SCRATCH_MNT/testfile
67
68 _flakey_drop_and_remount
69 _unmount_flakey
70 _cleanup_flakey
71 _check_scratch_fs
72
73 echo "Silence is golden"
74
75 status=0
76 exit