]> Dogcows Code - chaz/tar/blob - tests/multiv01.sh
Updated
[chaz/tar] / tests / multiv01.sh
1 #! /bin/sh
2 # This file is part of GNU tar testsuite.
3 # Copyright (C) 2004 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 # 02111-1307, USA.
19
20 # Test multivolume dumps from pipes.
21
22 . ./preset
23 TAR_ARCHIVE_FORMATS="gnu oldgnu"
24 . $srcdir/before
25
26 # Fixme: should be configurable
27 # TRUSS=truss -o /tmp/tr
28 # TRUSS=strace
29 set -e
30
31 genfile --length 7168 > file1
32
33 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
34 " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
35 echo "file2 block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
36 for count in 2 3 4 5 6 7 8 ; do
37 echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
38 done
39 done >file2
40
41 tar -c --multi-volume --tape-length=10 \
42 --listed-incremental=t.snar \
43 -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2
44
45 mkdir extract-dir-pipe
46 dd bs=4096 count=10 if=t2-pipe.tar 2>/dev/null |
47 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
48 -C extract-dir-pipe -x --multi-volume \
49 --tape-length=10 --read-full-records
50
51 cmp file1 extract-dir-pipe/file1
52 cmp file2 extract-dir-pipe/file2
53
54 out="\
55 "
56
57 . $srcdir/after
This page took 0.033133 seconds and 4 git commands to generate.