change galah QA devs & scratch mount point
[xfstests-dev.git] / 017
1 #! /bin/sh
2 # FS QA Test No. 017
3 #
4 # test remount ro - pv 795642
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=dxm@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1
19 trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     echo "*** unmount"
24     umount $SCRATCH_MNT 2>/dev/null
25 }
26
27 # get standard environment, filters and checks
28 . ./common.rc
29 . ./common.filter
30
31 # real QA test starts here
32 _supported_fs xfs
33 _supported_os Linux
34
35 _require_scratch
36
37 checkopts=""
38 [ "$USE_BIG_LOOPFS" = yes ] && checkopts=-t
39
40 echo "*** init FS"
41
42 rm -f $seq.full
43 umount $SCRATCH_DEV >/dev/null 2>&1
44 echo "*** MKFS ***"                         >>$seq.full
45 echo ""                                     >>$seq.full
46 _scratch_mkfs_xfs                           >>$seq.full 2>&1 \
47     || _fail "mkfs failed"
48 _scratch_mount                              >>$seq.full 2>&1 \
49     || _fail "mount failed"
50
51 echo "*** test"
52
53 for l in 0 1 2 3 4
54 do
55         echo "    *** test $l"
56         $FSSTRESS_PROG -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID >>$seq.full
57
58         _scratch_mount -o remount,ro \
59             || _fail "remount ro failed"
60
61         echo ""                                 >>$seq.full
62         echo "*** xfs_logprint ***"             >>$seq.full
63         echo ""                                 >>$seq.full
64         _scratch_xfs_logprint -tb               | tee -a $seq.full \
65             | head | grep -q "<CLEAN>" || _fail "DIRTY LOG"
66
67         echo ""                             >>$seq.full
68         echo "*** XFS_CHECK ***"            >>$seq.full
69         echo ""                             >>$seq.full
70         xfs_check $checkopts $SCRATCH_DEV   >>$seq.full 2>&1 \
71             || _fail "xfs_check $checkopts failed"
72         _scratch_mount -o remount,rw \
73             || _fail "remount rw failed"
74 done
75
76 echo "*** done"
77 # happy exit
78 rm -f $seq.full
79 status=0
80 exit 0