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