common.dump: filter out latest xfsdump version messages
[xfstests-dev.git] / 181
1 #! /bin/bash
2 # FS QA Test No. 181
3 #
4 # Like 121 only creating large EAs
5 # As part of the iunlink processing in recovery it will call VN_RELE
6 # which will inactivate the inodes and if they have EAs (which they
7 # will here) also call xfs_inactive_attrs.
8 # We want to test out this xfs_inactive_attrs code being called in recovery.
9 #
10 #-----------------------------------------------------------------------
11 # Copyright (c) 2007 Silicon Graphics, Inc.  All Rights Reserved.
12 #
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation.
16 #
17 # This program is distributed in the hope that it would be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write the Free Software Foundation,
24 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
25 #
26 #-----------------------------------------------------------------------
27 #
28 # creator
29 owner=tes@sgi.com
30
31 seq=`basename $0`
32 echo "QA output created by $seq"
33
34 _cleanup()
35 {
36     rm -f $tmp.*
37     [ -n "$pid" ] && kill $pid
38 }
39
40 pid=""
41 here=`pwd`
42 tmp=/tmp/$$
43 status=1        # failure is the default!
44 trap "_cleanup; exit \$status" 0 1 2 3 15
45
46 # get standard environment, filters and checks
47 . ./common.rc
48 . ./common.filter
49 . ./common.log
50
51 # real QA test starts here
52 _supported_fs xfs
53 _supported_os IRIX Linux
54
55 rm -f $seq.full
56 rm -f $tmp.log
57
58 _require_scratch
59
60 echo "mkfs"
61 _scratch_mkfs_xfs >>$seq.full 2>&1 \
62     || _fail "mkfs scratch failed"
63
64 echo "mount"
65 _scratch_mount >>$seq.full 2>&1 \
66     || _fail "mount failed: $MOUNT_OPTIONS"
67
68 # num_files must be greater than 64 (XFS_AGI_UNLINKED_BUCKETS)
69 # so that there will be at least one linked list from one of
70 # the 64 buckets, so that we can decode a di_next_unlinked field
71 num_files=200
72 num_eas=1
73 ea_val_size=`expr 32 \* 1024`
74
75 # sleep for ages and we will kill this pid when we are ready
76 delay=100
77
78 echo "open and unlink $num_files files with EAs"
79 src/multi_open_unlink -f $SCRATCH_MNT/test_file -n $num_files -s $delay -e $num_eas -v $ea_val_size &
80 pid=$!
81
82 # time to create and unlink all the files
83 sleep 10
84
85 echo "godown"
86 src/godown -v -f $SCRATCH_MNT >> $seq.full
87
88 # kill the multi_open_unlink
89 kill $pid 2>/dev/null
90 wait $pid 2>/dev/null
91 pid=""
92
93 echo "unmount"
94 umount $SCRATCH_MNT
95
96 echo "logprint after going down..."
97 _print_logstate
98
99 echo "mount with replay"
100 _scratch_mount $mnt >>$seq.full 2>&1 \
101     || _fail "mount failed: $mnt $MOUNT_OPTIONS"
102
103 echo "godown"
104 src/godown -v -f $SCRATCH_MNT >> $seq.full
105
106 echo "unmount"
107 umount $SCRATCH_MNT
108
109 echo "logprint after going down..."
110 _print_logstate
111
112 echo "logprint to check for CLEAR_AGI_BUCKET..."
113 if _scratch_xfs_logprint -t | tee -a $seq.full | grep CLEAR; then
114         echo 'CLEAR_AGI_BUCKET transactions found!!'
115         echo 'Are you running with an old xfs kernel - where the bug still exists?'
116 else
117         echo 'No CLEAR_AGI_BUCKET found in transactions - great - test passed :)'
118 fi
119
120 # clean up dirty log with log recovery on mount
121 _scratch_mount >> $seq.full 2>&1 \
122     || _fail "mount failed"
123
124 # should now be peaches
125 _check_scratch_fs
126
127 # success, all done
128 status=0
129 exit