Sergey Poznyakoff 19 years ago
parent
commit
7e51be5fe2
3 changed files with 16 additions and 10 deletions
  1. 9 3
      tests/multiv01.at
  2. 6 6
      tests/sparsemvp.at
  3. 1 1
      tests/star/multi-fail.at

+ 9 - 3
tests/multiv01.at

@@ -38,15 +38,21 @@ for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
   done
 done >file2
 
-tar -c --multi-volume --tape-length=10 \
+if test $TEST_TAR_FORMAT = pax; then
+  TAPE_LENGTH=11
+else
+  TAPE_LENGTH=10
+fi
+
+tar -c --multi-volume --tape-length=$TAPE_LENGTH \
   --listed-incremental=t.snar \
   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
 
 mkdir extract-dir-pipe
-dd bs=4096 count=10 if=t2-pipe.tar 2>/dev/null |
+dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
       -C extract-dir-pipe -x --multi-volume \
-      --tape-length=10 --read-full-records || exit 1
+      --tape-length=$TAPE_LENGTH --read-full-records || exit 1
 
 cmp file1 extract-dir-pipe/file1
 cmp file2 extract-dir-pipe/file2

+ 6 - 6
tests/sparsemvp.at

@@ -29,20 +29,20 @@ AT_TAR_CHECK([
 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || AT_SKIP_TEST
 echo "Pass 1: Split between data blocks"
 echo "Create archive"
-tar --sparse -c --record-size=512 -M -L7 -f arc.1 -f arc.2  sparsefile
+tar --sparse -c --record-size=512 -M -L7 -f arc.1 -f arc.2 -f arc.3 sparsefile 
 echo "Test archive"
-tar -t -M -f arc.1 -f arc.2 
+tar -t -M -f arc.1 -f arc.2 -f arc.3
 echo "Compare archive"
-tar -d -M -f arc.1 -f arc.2
+tar -d -M -f arc.1 -f arc.2 -f arc.3
 
 echo "Pass 2: Split within a data block"
 genfile --sparse --file sparsefile 0 ABCDEFGHIJKL 1M ABCDEFG || AT_SKIP_TEST
 echo "Create archive"
-tar --sparse -c --record-size=512 -M -L7 -f arc.1 -f arc.2  sparsefile
+tar --sparse -c --record-size=512 -M -L7 -f arc.1 -f arc.2 -f arc.3 sparsefile 
 echo "Test archive"
-tar -t -M -f arc.1 -f arc.2 
+tar -t -M -f arc.1 -f arc.2 -f arc.3
 echo "Compare archive"
-tar -d -M -f arc.1 -f arc.2
+tar -d -M -f arc.1 -f arc.2 -f arc.3
 ],
 [0],
 [Pass 1: Split between data blocks

+ 1 - 1
tests/star/multi-fail.at

@@ -28,7 +28,7 @@ AT_STAR_PREREQ([gnu-multi-fail-volume1.gtar])
 AT_STAR_PREREQ([gnu-multi-fail-volume2.gtar])
 
 tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
-               -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar
+               -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar </dev/null
 ],
 [0],
 [drwxrwsr-x joerg/bs          0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/