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
33 # Use _populate_fs() in common/rc to create a directory structure.
35 [ "$FSTYP" == "xfs" ] && TEMP_DIR=$TEST_DIR
40 POPULATED_DIR=$TEMP_DIR/populate_root
45 # Clean up if file exist from prevous run
47 rm -f $TEMP_DIR/$TAR_FILE
49 # Create the new directory structure
50 _populate_fs -n $NDIRS -f $NFILES -d $DEPTH -r $POPULATED_DIR -s $SIZE >>$seqres.full 2>&1
52 # Then tar up the directory structure
53 tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$seqres.full 2>&1
60 tar -xvf $TEMP_DIR/$TAR_FILE >>$seqres.full 2>&1
63 # use diff -qr to compare
64 ls -R -l ${TEST_DIR}${POPULATED_DIR} >>$seqres.full 2>&1
65 diff -qr $POPULATED_DIR ${TEST_DIR}${POPULATED_DIR}