2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2009 Eric Sandeen. All Rights Reserved.
7 # Run the fiemap (file extent mapping) tester
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"
34 _scratch_mkfs > /dev/null 2>&1
35 _scratch_mount > /dev/null 2>&1
38 fiemapfile=$SCRATCH_MNT/$seq.fiemap
39 fiemaplog=$SCRATCH_MNT/$seq.log
41 _require_test_program "fiemap-tester"
45 echo "using seed $seed" >> $fiemaplog
47 echo "fiemap run without preallocation, with sync"
48 $here/src/fiemap-tester -q -S -s $seed -p 0 -r 200 $fiemapfile 2>&1 | tee -a $fiemaplog
51 if grep -q "Operation not supported" $fiemaplog; then
52 _notrun "FIEMAP not supported by this filesystem type: $FSTYP"
58 echo "fiemap run without preallocation or sync"
59 $here/src/fiemap-tester -q -s $seed -p 0 -r 200 $fiemapfile 2>&1 | tee -a $fiemaplog