1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2009, 2013 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 AT_SETUP([incremental restores with -C])
19 AT_KEYWORDS([incremental extract incr07])
21 # Tar 1.26 had problems extracting from incremental restores when given
22 # the -C option. The code in incremen.c:try_purge_directory and
23 # misc.c:remove_any_file was using savedir(), which ignored eventual changes
24 # in the current working directory and caused the malfunctioning.
26 # The problem was reported by Piotr Rotter on 2013-03-22.
28 # This testcase is based on scripts provided by Piotr Rotter and Nathan
31 # References: <514C8F56.90900@active24.pl>,
32 # http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00036.html,
33 # <20130326181922.GZ3732@shire.ontko.com>,
34 # http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00042.html,
35 # <20130327051828.GA3732@shire.ontko.com>,
36 # http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00043.html,
37 # <20130327054957.GB3732@shire.ontko.com>,
38 # http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00044.html
46 tar -g test.snar -vcf test.0.tar A
50 tar -g test.snar -vcf test.1.tar A
54 tar -g test.snar -vcf test.2.tar A
60 tar -g test.snar -vxf test.0.tar -C ext/
62 tar -g test.snar -vxf test.1.tar -C ext/
68 tar -g test.snar -vxf test.2.tar -C ext/
71 test -d A && echo >&2 "toplevel A exists"
98 tar: A: Directory is new
104 ],[],[],[gnu, oldgnu, posix])