Use larger files in test - makes it easier to expose problem.
[xfstests-dev.git] / 047
1 #! /bin/sh
2 # FS QA Test No. 047
3 #
4 # invutil with interactive responses
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=tes@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1        # failure is the default!
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
20
21 # get standard environment, filters and checks
22 . ./common.rc
23 . ./common.dump
24
25 # real QA test starts here
26 _supported_fs xfs
27 _supported_os IRIX Linux
28
29 # wipe test dir clean first
30 # so dump can be real quick
31 _wipe_fs
32
33 #
34 # Create 5 dumps
35 # and on the 3rd dump note the date
36 # which we'll use to prune against using xfsinvutil
37 #
38 i=0
39 while [ $i -lt 5 ]; do
40     _do_dump_file -L "session.$i"
41     if [ $i -eq 2 ]; then
42        sleep 1
43        middate=`date '+%m/%d/%Y %T'`
44     fi
45     rm $dump_file
46     sleep 2
47     i=`expr $i + 1`
48 done
49
50 echo "middate = $middate" >>$seq.full
51
52 # Only say No to 1st question to prune
53 cat >$tmp.input <<EOF
54 N
55 Y
56 Y
57 Y
58 Y
59 EOF
60
61 #
62 # Now do the xfsinvutil and
63 # look and the inventory before and after
64 # to see if it did the job
65 #
66 _dump_inventory
67 _do_invutil <$tmp.input
68 _dump_inventory
69
70 status=0
71 exit