2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
7 # Dmapi Punch/Probe Alignment compared to xfsctl(FREESPACE);
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "exit \$status" 0 1 2 3 15
18 # get standard environment, filters and checks
23 # real QA test starts here
28 _scratch_mkfs_xfs -b size=512 >/dev/null 2>&1
31 cat > $tmp.dmapi-param <<EOF
34 1k 0 # not page aligned
41 mkdir -p $SCRATCH_MNT/dmapi
42 f=$SCRATCH_MNT/dmapi/holly_file
43 e=${DMAPI_QASUITE1_DIR}cmd/probe_punch_xfsctl_hole
45 cat $tmp.dmapi-param | sed s/'\#.*'//g| grep . |while read l o; do
46 echo "======================================================="
47 echo "Testing with length = $l, offset = $o"
50 dd if=/dev/zero bs=1024k count=3 of=$f >/dev/null 2>&1
51 $e -x -l$l -o$o $f | _filter_scratch
53 echo "Method: dmapi_probe"
54 dd if=/dev/zero bs=1024k count=3 of=$f >/dev/null 2>&1
55 $e -l$l -o$o $f | _filter_scratch
57 echo "Method: dmapi_punch"
58 $e -p -l$l -o$o $f | _filter_scratch
59 echo "======================================================="
62 rm -rf $tmp.dmapi-param