| 1 |
# Test suite for GNU tar. -*- Autotest -*- |
| 2 |
# Copyright 2010-2023 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
# This file is part of GNU tar. |
| 5 |
|
| 6 |
# GNU tar 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 of the License, or |
| 9 |
# (at your option) any later version. |
| 10 |
|
| 11 |
# GNU tar 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, see <http://www.gnu.org/licenses/>. |
| 18 |
|
| 19 |
# Description: When creating POSIX multivolume archives, tar may in |
| 20 |
# some cases write an extended header at the end of one volume, and |
| 21 |
# the corresponding ustar header at the beginning of the next volume. |
| 22 |
# Such archives do not fully comply with the POSIX specs, but tar must |
| 23 |
# be able to read them anyway. This is what this script tests. |
| 24 |
# |
| 25 |
# See function try_new_volume, in file src/buffer.c near line 1227 |
| 26 |
# for additional details. |
| 27 |
|
| 28 |
AT_SETUP([volumes split at an extended header]) |
| 29 |
AT_KEYWORDS([multivolume multiv multiv07 xsplit]) |
| 30 |
|
| 31 |
AT_CHECK([ |
| 32 |
AT_XFAIL_IF(test -f $[]XFAILFILE) |
| 33 |
AT_TARBALL_PREREQ([xsplit-1.tar],[0e008c84c517e48fbf23ca6a7033cde6]) |
| 34 |
AT_TARBALL_PREREQ([xsplit-2.tar],[03150b9852d285458f43734e9e0b9a45]) |
| 35 |
|
| 36 |
exec <&- |
| 37 |
|
| 38 |
cd $TEST_DATA_DIR |
| 39 |
tar -t -M -fxsplit-1.tar -fxsplit-2.tar |
| 40 |
], |
| 41 |
[0], |
| 42 |
[Archive volumes split at an extended header Volume 1 |
| 43 |
foo |
| 44 |
bar |
| 45 |
]) |
| 46 |
|
| 47 |
AT_CLEANUP |