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.
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
12 # This program is free software; you can redistribute it and/or modify it
13 # under the terms of version 2 of the GNU General Public License as
14 # published by the Free Software Foundation.
16 # This program is distributed in the hope that it would be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 # Further, this software is distributed without any warranty that it is
21 # free of the rightful claim of any third person regarding infringement
22 # or the like. Any license provided herein, whether implied or
23 # otherwise, applies only to this software file. Patent licenses, if
24 # any, provided herein do not apply to combinations of this program with
25 # other software, or any other product whatsoever.
27 # You should have received a copy of the GNU General Public License along
28 # with this program; if not, write the Free Software Foundation, Inc., 59
29 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
31 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
32 # Mountain View, CA 94043, or:
36 # For further information regarding this notice, see:
38 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
39 #-----------------------------------------------------------------------
42 owner=tes@melbourne.sgi.com
45 echo "QA output created by $seq"
49 status=1 # failure is the default!
50 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
52 # get standard environment, filters and checks
56 # real QA test starts here
60 xfs_logprint -t $SCRATCH_DEV | tee -a $seq.full >$tmp.logprint
61 if grep -q "<DIRTY>" $tmp.logprint; then
64 if grep -q "<CLEAN>" $tmp.logprint; then
75 _scratch_mkfs_xfs >>$seq.full 2>&1 \
76 || _fail "mkfs scratch failed"
79 _scratch_mount >>$seq.full 2>&1 \
80 || _fail "mount failed: $MOUNT_OPTIONS"
83 touch $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
86 src/godown -v -f $SCRATCH_MNT >> $seq.full
91 echo "logprint after going down..."
94 # curious if FS consistent at start
96 if /usr/sbin/xfs_check $SCRATCH_DEV; then
97 echo "*** checked ok ***"
101 echo "mount with replay"
102 _scratch_mount $mnt >>$seq.full 2>&1 \
103 || _fail "mount failed: $mnt $MOUNT_OPTIONS"
105 echo "ls SCRATCH_MNT"
111 echo "logprint after mount and replay..."
114 if _check_scratch_fs; then
115 echo "filesystem is checked ok"
117 echo "filesystem is NOT ok"