1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
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 3, or (at your option)
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA
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
25 # References: <20040809214854.GB32706@suse.de>
26 # http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html
27 # <200604270859.47241.Juergen.Vollmer@informatik-vollmer.de>
30 AT_SETUP([MV archive & long filenames])
31 AT_KEYWORDS([multivolume multiv multiv03])
34 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
35 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
38 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
39 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
48 genfile --length 15360 --file $AFILE
52 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
53 tar -tM -f arch.1 -f arch.2 || exit 1
57 genfile --length 15360 --file $BFILE
58 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
62 tar -M -x -f arch.1 -f arch.2 || exit 1