c833eaa3fa9bf1a76ad1a07500cf61468e00c83a
[xfstests-dev.git] / 146
1 #! /bin/sh
2 # FSQA Test No. 142
3 #
4 # Dmapi read/write_invis
5 #
6 #-----------------------------------------------------------------------
7 #  Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=allanr@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1    # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     _cleanup_testdir
24 }
25
26 _report_filter () {
27     perl -ne "s/Report: \"0x[0-f]+\" was written and \"0x[0-f]+\" was read at byte [0-9]+ million./Report: \"HEX\" was written and \"HEX\" was read at byte NUM million./g ; print"
28 }
29
30 # get standard environment, filters and checks
31 . ./common.rc
32 . ./common.filter
33 . ./common.dmapi
34
35 # real QA test starts here
36 _supported_fs xfs
37 _supported_os Linux
38
39 _require_scratch
40 _scratch_mkfs_xfs >/dev/null 2>&1
41 _dmapi_scratch_mount
42
43 mkdir -p $SCRATCH_MNT/dmapi
44
45 # run DMAPI test using verbose output
46 ${DMAPI_QASUITE2_DIR}src/test_invis -v $DMAPI_LS_TO_COPY_PATH $SCRATCH_MNT | _report_filter
47
48 status=0
49 exit