tests: remove IRIX support from tests also supported on Linux
[xfstests-dev.git] / tests / generic / 052
1 #! /bin/bash
2 # FS QA Test No. 052
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 generic
44 _supported_os 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 >>$seqres.full 2>&1 \
55     || _fail "mkfs scratch failed"
56 _require_metadata_journaling $SCRATCH_DEV
57
58 echo "mount"
59 _scratch_mount >>$seqres.full 2>&1 \
60     || _fail "mount failed: $MOUNT_OPTIONS"
61
62 echo "touch files"
63 touch $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
64
65 echo "godown"
66 src/godown -v -f $SCRATCH_MNT >> $seqres.full
67
68 echo "unmount"
69 _scratch_unmount
70
71 echo "logprint after going down..."
72 _print_logstate
73
74 # curious if FS consistent at start
75 if false; then
76     if _check_scratch_fs; then
77        echo "*** checked ok ***"
78     fi
79 fi
80
81 echo "mount with replay"
82 _scratch_mount $mnt >>$seqres.full 2>&1 \
83     || _fail "mount failed: $mnt $MOUNT_OPTIONS"
84
85 echo "ls SCRATCH_MNT"
86 ls $SCRATCH_MNT | _filter_lostfound
87
88 echo "unmount"
89 _scratch_unmount
90
91 echo "logprint after mount and replay..."
92 _print_logstate
93
94 # success, all done
95 status=0
96 exit