fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 100
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 100. Modified from UDF QA test 030.
6 #
7 # Test whether a tarred directory structure can be untarred onto
8 # a UDF file system.
9 #
10 . ./common/preamble
11 _begin_fstest udf auto
12
13 # Import common functions.
14 . ./common/filter
15
16 # Override the default cleanup function.
17 _cleanup()
18 {
19      rm -f $tmp.* $TEMP_DIR/$TAR_FILE
20 }
21  
22 # real QA test starts here
23 _supported_fs generic
24 _require_test
25
26 # Use _populate_fs() in common/rc to create a directory structure.
27 TEMP_DIR=/tmp
28 [ "$FSTYP" == "xfs" ] && TEMP_DIR=$TEST_DIR
29 TAR_FILE=temp.tar
30 NDIRS=3
31 NFILES=6
32 DEPTH=5
33 POPULATED_DIR=$TEMP_DIR/populate_root
34 SIZE=10
35
36 # Clean up if file exist from prevous run
37 rm -rf $POPULATED_DIR
38 rm -f $TEMP_DIR/$TAR_FILE
39
40 # Create the new directory structure
41 _populate_fs -n $NDIRS -f $NFILES -d $DEPTH -r $POPULATED_DIR -s $SIZE >>$seqres.full 2>&1
42
43 # Then tar up the directory structure
44 tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$seqres.full 2>&1
45
46 # untar on f/s
47 cd $TEST_DIR
48 tar -xvf $TEMP_DIR/$TAR_FILE >>$seqres.full 2>&1
49 cd $here
50
51 # use diff -qr to compare
52 ls -R -l ${TEST_DIR}${POPULATED_DIR} >>$seqres.full 2>&1
53 diff -qr $POPULATED_DIR ${TEST_DIR}${POPULATED_DIR}
54
55 cd /
56
57 status=0
58 exit