2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2017 CTERA Networks. All Rights Reserved.
7 # This test is motivated by a bug found in ext4 during random crash
10 # Fixed by commit 51e3ae81ec58 ("ext4: fix interaction between i_size,
11 # fallocate, and delalloc after a crash")
14 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
19 status=1 # failure is the default!
27 trap "_cleanup; exit \$status" 0 1 2 3 15
29 # get standard environment, filters and checks
34 # real QA test starts here
38 _require_dm_target flakey
42 _scratch_mkfs >> $seqres.full 2>&1
43 _require_metadata_journaling $SCRATCH_DEV
48 # See this post for reverse engineering of this auto generated test:
49 # https://marc.info/?l=linux-ext4&m=151137380830381&w=2
52 write 0x137dd 0xdc69 0x0
53 fallocate 0xb531 0xb5ad 0x21446
54 collapse_range 0x1c000 0x4000 0x21446
55 write 0x3e5ec 0x1a14 0x21446
56 zero_range 0x20fac 0x6d9c 0x40000 keep_size
57 mapwrite 0x216ad 0x274f 0x40000
59 run_check $here/ltp/fsx -d --replay-ops $fsxops $SCRATCH_MNT/testfile
61 _flakey_drop_and_remount
66 echo "Silence is golden"