]> Dogcows Code - chaz/tar/blob - tests/multiv01.at
Update copyright years.
[chaz/tar] / tests / multiv01.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright 2004, 2006-2007, 2009, 2013-2014 Free Software Foundation,
5 # Inc.
6
7 # This file is part of GNU tar.
8
9 # GNU tar is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
13
14 # GNU tar is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22 # Test multivolume dumps from pipes.
23
24 AT_SETUP([multivolume dumps from pipes])
25 AT_KEYWORDS([multivolume multiv multiv01])
26
27 # Fixme: should be configurable
28 # TRUSS=truss -o /tmp/tr
29 # TRUSS=strace
30
31 AT_TAR_CHECK([
32 exec <&-
33 genfile --length 7168 --file file1
34
35 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
36 " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
37 echo "file2 block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
38 for count in 2 3 4 5 6 7 8 ; do
39 echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
40 done
41 done >file2
42
43 if test $TEST_TAR_FORMAT = pax; then
44 TAPE_LENGTH=11
45 else
46 TAPE_LENGTH=10
47 fi
48
49 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
50 -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
51
52 mkdir extract-dir-pipe
53 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
54 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
55 -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
56 --tape-length=$TAPE_LENGTH --read-full-records || exit 1
57
58 cmp file1 extract-dir-pipe/file1
59 cmp file2 extract-dir-pipe/file2
60 ],
61 [0],
62 [],[],[],[],[gnu, oldgnu, pax])
63
64 AT_CLEANUP
This page took 0.031282 seconds and 4 git commands to generate.