2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Facebook. All Rights Reserved.
7 # Run the fiemap (file extent mapping) tester with preallocation enabled
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
28 # real QA test starts here
32 _require_xfs_io_command "fiemap"
33 _require_xfs_io_command "falloc"
35 _scratch_mkfs > /dev/null 2>&1
36 _scratch_mount > /dev/null 2>&1
39 fiemapfile=$SCRATCH_MNT/$seq.fiemap
41 _require_test_program "fiemap-tester"
43 # FIEMAP test doesn't like finding unwritten blocks after it punches out
44 # a partial rt extent.
45 test "$FSTYP" = "xfs" && \
46 _require_file_block_size_equals_fs_block_size $fiemapfile
50 echo "using seed $seed" >> $seqres.full
52 echo "fiemap run with sync"
53 $here/src/fiemap-tester -q -S -s $seed -r 200 $fiemapfile 2>&1 | \
56 echo "fiemap run without sync"
57 $here/src/fiemap-tester -q -s $seed -r 200 $fiemapfile 2>&1 | \