]> Dogcows Code - chaz/tar/blob - tests/multiv01.sh
Initial revision
[chaz/tar] / tests / multiv01.sh
1 #! /bin/sh
2 # Test multivolume dumps from pipes.
3
4 . ./preset
5 . $srcdir/before
6
7 set -e
8
9 dd if=/dev/zero bs=1024 count=7 >file1
10
11 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
12 " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
13 echo "file2 block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
14 for count in 2 3 4 5 6 7 8 ; do
15 echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
16 done
17 done >file2
18
19 tar -c --multi-volume --tape-length=10 \
20 --listed-incremental=t.snar \
21 -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2
22
23 mkdir extract-dir-pipe
24 dd bs=4096 count=10 <t2-pipe.tar |
25 PATH=$PATH truss -o /tmp/tr tar -f t1-pipe.tar -f - -C extract-dir-pipe -x --multi-volume \
26 --tape-length=10 --read-full-records
27
28 cmp file1 extract-dir-pipe/file1
29 cmp file2 extract-dir-pipe/file2
30
31 out="\
32 "
33 err="\
34 7+0 records in
35 7+0 records out
36 "
37
38 . $srcdir/after
This page took 0.038238 seconds and 5 git commands to generate.