fix group listing regexp
[xfstests-dev.git] / 100
1 #! /bin/sh
2 # FS QA Test No. 093. Modified from UDF QA test 030.
3 #
4 # Test whether a tarred directory structure can be untarred onto
5 # a UDF file system.
6 #
7 #-----------------------------------------------------------------------
8 #  Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
9 #-----------------------------------------------------------------------
10 #
11 # creator
12 owner=ajones@sgi.com
13
14 seq=`basename $0`
15 echo "QA output created by $seq"
16
17 here=`pwd`
18 tmp=/tmp/$$
19 status=1        # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
21
22 # get standard environment, filters and checks
23 . ./common.rc
24 . ./common.filter
25
26 _cleanup()
27 {
28      rm -f $tmp.* $testfile
29 }
30  
31 # real QA test starts here
32 _supported_fs xfs udf nfs
33 _supported_os IRIX Linux
34
35 # Use _populate_fs() in common.rc to create a directory structure.
36 TEMP_DIR=/tmp
37 [ "$FSTYP" == "xfs" ] && TEMP_DIR=$TEST_DIR
38 TAR_FILE=temp.tar
39 NDIRS=3
40 NFILES=6
41 DEPTH=5
42 POPULATED_DIR=$TEMP_DIR/populate_root
43 SIZE=10
44
45 rm -f $seq.full
46
47 # Clean up if file exist from prevous run
48 rm -rf $POPULATED_DIR
49 rm -f $TEMP_DIR/$TAR_FILE
50
51 # Create the new directory structure
52 _populate_fs -n $NDIRS -f $NFILES -d $DEPTH -r $POPULATED_DIR -s $SIZE >>$here/$seq.full 2>&1
53
54 # Then tar up the directory structure
55 tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$here/$seq.full 2>&1
56
57 # create f/s
58 _require_scratch
59 _setup_testdir
60
61 # untar on f/s
62 cd $testdir
63 tar -xRvf $TEMP_DIR/$TAR_FILE >>$here/$seq.full 2>&1
64 cd $here
65
66
67 # use diff -qr to compare
68 ls -R -l ${testdir}${POPULATED_DIR} >>$here/$seq.full 2>&1
69 diff -qr $POPULATED_DIR ${testdir}${POPULATED_DIR}
70
71 cd /
72 _cleanup_testdir
73 _check_scratch_fs
74
75 status=0
76 exit