| 1 |
# Process this file with autom4te to create testsuite. -*- Autotest -*- |
| 2 |
|
| 3 |
# Test suite for GNU tar. |
| 4 |
# Copyright 2006-2023 Free Software Foundation, Inc. |
| 5 |
|
| 6 |
# This file is part of GNU tar. |
| 7 |
|
| 8 |
# GNU tar is free software; you can redistribute it and/or modify |
| 9 |
# it under the terms of the GNU General Public License as published by |
| 10 |
# the Free Software Foundation; either version 3 of the License, or |
| 11 |
# (at your option) any later version. |
| 12 |
|
| 13 |
# GNU tar is distributed in the hope that it will be useful, |
| 14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
# GNU General Public License for more details. |
| 17 |
|
| 18 |
# You should have received a copy of the GNU General Public License |
| 19 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 |
|
| 21 |
# Up to version 1.15.91 tar was unable to recognize all volumes |
| 22 |
# given after an out-of-sync volume. |
| 23 |
# Reported by: Joerg Weilbier <[email protected]> |
| 24 |
# References: <[email protected]> |
| 25 |
|
| 26 |
AT_SETUP([Restoring after an out of sync volume]) |
| 27 |
AT_KEYWORDS([multivolume multiv multiv05 sync]) |
| 28 |
m4_pushdef([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc]) |
| 29 |
|
| 30 |
AT_TAR_CHECK([ |
| 31 |
exec <&- |
| 32 |
|
| 33 |
m4_foreach([f], |
| 34 |
[FILELIST], |
| 35 |
[genfile --length 250k --file f |
| 36 |
]) |
| 37 |
|
| 38 |
echo Creating archive |
| 39 |
tar -c -M -L 502 -f a.tar -f b.tar -f c.tar m4_foreach([f],[FILELIST],f ) |
| 40 |
echo separator |
| 41 |
mkdir bak |
| 42 |
mv m4_foreach([f],[FILELIST],f )bak |
| 43 |
tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar |
| 44 |
m4_foreach([f], |
| 45 |
[FILELIST], |
| 46 |
[echo Diffing f |
| 47 |
cmp bak/f f || exit 1 |
| 48 |
])], |
| 49 |
[0], |
| 50 |
[Creating archive |
| 51 |
separator] |
| 52 |
m4_foreach([file], |
| 53 |
[FILELIST], |
| 54 |
[file |
| 55 |
])dnl |
| 56 |
m4_foreach([file], |
| 57 |
[FILELIST], |
| 58 |
[Diffing file |
| 59 |
])dnl |
| 60 |
, |
| 61 |
[tar: 'trzy' is not continued on this volume |
| 62 |
],[],[], [gnu]) |
| 63 |
|
| 64 |
m4_popdef([FILELIST]) |
| 65 |
AT_CLEANUP |