2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # DMAPI function punch hole. Create 3Mb file and punch a hole from
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "exit \$status" 0 1 2 3 15
19 _filter_get_allocinfo()
21 $SED_PROG -e "s#$qa_file#QA_FILE#g" \
22 -e "s#18014398509481983\|34359738367#MAX_FILE_BLOCKS#g"
25 # get standard environment, filters and checks
30 # real QA test starts here
35 _scratch_mkfs_xfs >/dev/null 2>&1
38 qa_file=$SCRATCH_MNT/dmapi_hole_file
40 dd if=/dev/zero bs=1024k count=3 of=$qa_file
42 ${DMAPI_QASUITE1_DIR}cmd/get_allocinfo $qa_file | _filter_get_allocinfo
43 ${DMAPI_QASUITE1_DIR}cmd/probe_hole -o 1048576 -l 0 $qa_file
44 ${DMAPI_QASUITE1_DIR}cmd/punch_hole -o 1048576 -l 0 $qa_file
45 ${DMAPI_QASUITE1_DIR}cmd/get_allocinfo $qa_file | _filter_get_allocinfo