xfs/087: give quota mount option per filesystem
[xfstests-dev.git] / tests / xfs / 085
1 #! /bin/bash
2 # FS QA Test No. 085
3 #
4 # To test log replay by shutdown of file system
5 # This is the first simple initial test to ensure that
6 # the goingdown ioctl is working and recovery of
7 # create transactions is working.
8 #
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
11 #
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License as
14 # published by the Free Software Foundation.
15 #
16 # This program is distributed in the hope that it would be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write the Free Software Foundation,
23 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24 #
25 #-----------------------------------------------------------------------
26 #
27
28 seq=`basename $0`
29 seqres=$RESULT_DIR/$seq
30 echo "QA output created by $seq"
31
32 here=`pwd`
33 tmp=/tmp/$$
34 status=1        # failure is the default!
35 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
36
37 # get standard environment, filters and checks
38 . ./common/rc
39 . ./common/filter
40 . ./common/log
41
42 # real QA test starts here
43 _supported_fs xfs
44 _supported_os IRIX Linux
45
46 rm -f $seqres.full
47 rm -f $tmp.log
48
49 _require_scratch
50 _require_scratch_shutdown
51 _require_logstate
52
53 echo "mkfs"
54 _scratch_mkfs_xfs >>$seqres.full 2>&1 \
55     || _fail "mkfs scratch failed"
56
57 echo "mount"
58 _scratch_mount >>$seqres.full 2>&1 \
59     || _fail "mount failed: $MOUNT_OPTIONS"
60
61 echo "touch files"
62 touch $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
63
64 echo "godown"
65 src/godown -v -f $SCRATCH_MNT >> $seqres.full
66
67 echo "unmount"
68 umount $SCRATCH_MNT
69
70 echo "logprint after going down..."
71 _print_logstate
72
73 # curious if FS consistent at start
74 if false; then
75     if _xfs_check $SCRATCH_DEV; then
76        echo "*** checked ok ***"
77     fi
78 fi
79
80 echo "mount with replay"
81 _scratch_mount $mnt >>$seqres.full 2>&1 \
82     || _fail "mount failed: $mnt $MOUNT_OPTIONS"
83
84 echo "ls SCRATCH_MNT"
85 ls $SCRATCH_MNT
86
87 echo "unmount"
88 umount $SCRATCH_MNT
89
90 echo "logprint after mount and replay..."
91 _print_logstate
92
93 # success, all done
94 status=0
95 exit