re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / multiv09.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2015-2016 Free Software Foundation, Inc.
4 #
5 # GNU tar 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 3 of the License, or
8 # (at your option) any later version.
9 #
10 # GNU tar 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, see <http://www.gnu.org/licenses/>.
17
18 # Description: Tar <=1.28 would segfault extracting from a multi-volume
19 # archive containging filenames >= 100 characters if the subsequent volume
20 # was not set properly.
21 # Reported by: Pavel Raiskup <praiskup@redhat.com>
22 # References: https://bugzilla.redhat.com/show_bug.cgi?id=866071,
23 #    <1351863945-31192-3-git-send-email-praiskup@redhat.com>,
24 #    http://lists.gnu.org/archive/html/bug-tar/2012-11/msg00009.html
25
26 AT_SETUP([bad next volume])
27 AT_KEYWORDS([multivolume multiv multiv09])
28
29 # filename of length 100 characters
30 m4_pushdef([FILENAME],[dnl
31 m4_for([N],1,100,,[a])])
32
33 AT_TAR_CHECK([
34 genfile --length 2000000 --file FILENAME
35 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar FILENAME || exit $?
36 echo "created"
37 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
38 y
39 q
40 EOF
41 ],
42 [2],
43 [created
44 ])
45
46 AT_CLEANUP
47
48 m4_popdef([FILENAME])