Modified to use "_scratch_mount -onoatime" rather than hardcoded mount
[xfstests-dev.git] / 010
1 #! /bin/sh
2 # FS QA Test No. 010
3 #
4 # dbtest
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=nathans@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=0        # success is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     cd /
24     rm -f $tmp.*
25     rm -f $testdir/DBtest*.{pag,dir}
26     _cleanup_testdir
27 }
28
29 # filter random number output from dbtest
30 #
31 _filter_dbtest()
32 {
33     sed \
34         -e '/were [0-9][0-9]* duplicate/s//were BLEEP duplicate/' \
35         -e '/using [0-9][0-9]* as seed/s//using BLEEP as seed/'
36 }
37
38 # get standard environment, filters and checks
39 . ./common.rc
40 . ./common.filter
41
42 [ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform"
43
44 # real QA test starts here
45 _supported_fs xfs udf nfs
46 _supported_os IRIX Linux
47
48 _setup_testdir
49
50 rm -f $seq.full
51
52 cd $testdir
53
54 $here/src/dbtest -l 5 -n 1000 2>&1 | tee -a $here/$seq.full | _filter_dbtest
55
56 # success, all done
57 exit