Improve filtering to handle different realtime extent sizes too.
[xfstests-dev.git] / 066
1 #! /bin/sh
2 # FS QA Test No. 066
3 #
4 # Test dumping of large files
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000, 2002 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 "_cleanup; exit \$status" 0 1 2 3 15
20
21 # get standard environment, filters and checks
22 . ./common.rc
23 . ./common.filter
24 . ./common.dump
25
26 _cleanup()
27 {
28     cd /
29     rm -f $tmp.*
30     _cleanup_testdir
31 }
32
33 # real QA test starts here
34 _supported_fs xfs
35 _supported_os IRIX Linux
36
37 _setup_testdir
38
39 _my_stat_filter()
40 {
41     grep "[sS]ize" | sed "s/.*[sS]ize[: ]*\([[:digit:]]*\).*/\1 largefile/g"
42 }
43
44 rm -f $testdir/testfile
45 if src/feature -t $testdir/testfile; then
46         :
47 else
48         _notrun "Installed libc doesn't correctly handle setrlimit/ftruncate64"
49 fi
50
51 _create_dumpdir_largefile
52 echo "ls dumpdir/largefile"
53 stat $dump_dir | _my_stat_filter
54 _do_dump_file
55 _do_restore_file
56 echo "ls restoredir/largefile"
57 stat $restore_dir/$dump_sdir | _my_stat_filter
58
59 # success, all done
60 status=0
61 exit