xfstests: fix TEST_MNT typos (should be TEST_DIR)
[xfstests-dev.git] / 022
1 #! /bin/bash
2 # FS QA Test No. 022
3 #
4 # Test out a level 0 dump/restore to a tape of a subdir
5 # i.e. it is testing out drive_scsitape.c
6 #
7 # Use fsstress to create a directory structure with a mix of files
8 #
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2000-2001 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 # creator
28 owner=tes@sgi.com
29
30 seq=`basename $0`
31 echo "QA output created by $seq"
32
33 here=`pwd`
34 tmp=/tmp/$$
35 status=0        # success is the default!
36 trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
37
38 . ./common.rc
39 . ./common.dump
40
41 # link correct .out file
42 _link_out_file $seq.out
43
44 # real QA test starts here
45 _supported_fs xfs
46 _supported_os IRIX Linux
47
48 _require_tape $TAPE_DEV
49
50 # note: fsstress uses an endian dependent random number generator, running this
51 # will produce different output for big/little endian machines. This issue was
52 # resolved by using different Linux/IRIX out files.
53 _create_dumpdir_stress
54 _erase_hard
55 _do_dump_sub
56 # filter out the file count, it changes as fsstress adds new operations
57 _do_restore | sed -e "/entries processed$/s/[0-9][0-9]*/NUM/g"
58 _ls_compare_sub
59
60 # success, all done
61 exit