]> Dogcows Code - chaz/tar/blob - tests/multiv03.at
Rewritten testsuite in autotest
[chaz/tar] / tests / multiv03.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright (C) 2004 Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
20
21 # Problem: GNU multivolume archives are not able to continue on members
22 # with filenames longer than 100 characters. Versions of tar <= 1.14
23 # were not checking filename lengths and produced malformed multivolume
24 # headers.
25 # References: <20040809214854.GB32706@suse.de>
26 # http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html
27
28 AT_SETUP([MV archive & long filenames])
29 AT_KEYWORDS([multiv03])
30
31 AT_TAR_CHECK([
32 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
33 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
34
35 cat > ../experr <<EOF
36 tar: $BFILE: file name too long to be stored in a GNU multivolume header
37 tar: Error is not recoverable: exiting now
38 EOF
39
40 cat > ../expout <<EOF
41 $AFILE
42 separator
43 EOF
44
45 genfile --length 15360 > $AFILE
46
47 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
48 tar -tM -f arch.1 -f arch.2 || exit 1
49
50 echo separator
51
52 genfile --length 15360 > $BFILE
53 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE
54 ],
55 [2],
56 [expout],
57 [experr],
58 [],[],[gnu, oldgnu])
59
60 AT_CLEANUP
61
This page took 0.041568 seconds and 5 git commands to generate.