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 _begin_fstest auto quick fiemap
12 # Import common functions.
15 # real QA test starts here
19 _require_xfs_io_command "fiemap"
21 _scratch_mkfs > /dev/null 2>&1
22 _scratch_mount > /dev/null 2>&1
24 fiemapfile=$SCRATCH_MNT/$seq.fiemap
25 fiemaplog=$SCRATCH_MNT/$seq.log
27 _require_test_program "fiemap-tester"
31 echo "using seed $seed" >> $fiemaplog
33 echo "fiemap run without preallocation, with sync"
34 $here/src/fiemap-tester -q -S -s $seed -p 0 -r 200 $fiemapfile 2>&1 | tee -a $fiemaplog
37 if grep -q "Operation not supported" $fiemaplog; then
38 _notrun "FIEMAP not supported by this filesystem type: $FSTYP"
44 echo "fiemap run without preallocation or sync"
45 $here/src/fiemap-tester -q -s $seed -p 0 -r 200 $fiemapfile 2>&1 | tee -a $fiemaplog