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 _begin_fstest udf auto
13 # Import common functions.
16 # Override the default cleanup function.
19 rm -f $tmp.* $TEMP_DIR/$TAR_FILE
22 # real QA test starts here
26 # Use _populate_fs() in common/rc to create a directory structure.
28 [ "$FSTYP" == "xfs" ] && TEMP_DIR=$TEST_DIR
33 POPULATED_DIR=$TEMP_DIR/populate_root
36 # Clean up if file exist from prevous run
38 rm -f $TEMP_DIR/$TAR_FILE
40 # Create the new directory structure
41 _populate_fs -n $NDIRS -f $NFILES -d $DEPTH -r $POPULATED_DIR -s $SIZE >>$seqres.full 2>&1
43 # Then tar up the directory structure
44 tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$seqres.full 2>&1
48 tar -xvf $TEMP_DIR/$TAR_FILE >>$seqres.full 2>&1
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}