1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2015-2022 Free Software Foundation, Inc.
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.
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.
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/>.
18 # Description: When creating multivolume archives, the bufmap code in
19 # buffer.c implicitly assumed that the members are stored in the archive
20 # in a contiguous fashion, ignoring the member (and eventual extended) headers
21 # between them. This worked until the member header happened to be at
22 # the very beginning of the volume, in which case its length was included in
23 # the calculation of the stored size and size left to store. Due to this,
24 # the GNUFileParts extended header contained invalid GNU.volume.offset value,
25 # and the resulting archive failed to extract properly. The bug affected
26 # versions of tar up to 1.29.90 (commit da8d0659a6).
28 # This test case also checks that GNUFileParts headers are not displayed in
31 # Reported by: <russiangolem@gmail.com>
33 # <CAE7Kiz_0oMqGdzkoh0FbOd=hUoPhtHHYhjZveM_4hEku081QFQ@mail.gmail.com>,
34 # http://lists.gnu.org/archive/html/bug-tar/2017-05/msg00007.html
37 AT_SETUP([file start at the beginning of a posix volume])
38 AT_KEYWORDS([multivolume multiv multiv10])
42 genfile --length=15360 --file data1
43 genfile --length=15360 --file data2
44 tar -v -c -L 10 -M -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar data1 data2
45 tar -M -t -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar
47 tar -C out -M -x -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar