Add QA test 183
[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_PROG -ne "s/Report: \"0x[0-f]+\" was written and \"0x[0-f]+\" was read at/Report: \"HEX\" was written and \"HEX\" was read at/g ;
28     s/byte [0-9]+ million./byte NUM million./g;
29     print"
30 }
31
32 # get standard environment, filters and checks
33 . ./common.rc
34 . ./common.filter
35 . ./common.dmapi
36
37 # real QA test starts here
38 _supported_fs xfs
39 _supported_os Linux IRIX
40
41 # link correct .out file
42 _link_out_file $seq.out
43
44 _require_scratch
45 _scratch_mkfs_xfs >/dev/null 2>&1
46 _dmapi_scratch_mount
47
48 mkdir -p $SCRATCH_MNT/dmapi
49
50 # run DMAPI test using verbose output
51 ${DMAPI_QASUITE2_DIR}src/test_invis -v $DMAPI_LS_TO_COPY_PATH $SCRATCH_MNT | _report_filter
52
53 status=0
54 exit