2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
5 # FS QA Test No. 100. Modified from UDF QA test 030.
7 # Test whether a tarred directory structure can be untarred onto
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
19 # get standard environment, filters and checks
25 rm -f $tmp.* $TEMP_DIR/$TAR_FILE
28 # real QA test starts here
32 # Use _populate_fs() in common/rc to create a directory structure.
34 [ "$FSTYP" == "xfs" ] && TEMP_DIR=$TEST_DIR
39 POPULATED_DIR=$TEMP_DIR/populate_root
44 # Clean up if file exist from prevous run
46 rm -f $TEMP_DIR/$TAR_FILE
48 # Create the new directory structure
49 _populate_fs -n $NDIRS -f $NFILES -d $DEPTH -r $POPULATED_DIR -s $SIZE >>$seqres.full 2>&1
51 # Then tar up the directory structure
52 tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$seqres.full 2>&1
56 tar -xvf $TEMP_DIR/$TAR_FILE >>$seqres.full 2>&1
59 # use diff -qr to compare
60 ls -R -l ${TEST_DIR}${POPULATED_DIR} >>$seqres.full 2>&1
61 diff -qr $POPULATED_DIR ${TEST_DIR}${POPULATED_DIR}