1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2013-2024 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: For some intermediate versions of tar 1.26.90,
19 # tar would fail to correctly canonicalize archive member names
20 # in incremental mode if there was a -C options with an absolute path
21 # on the command line without any archive members specified within that
22 # directory. (In that case, the canonical name generated for
23 # members specified after later -C options wouldn't correctly reflect the
24 # previous absolute path.)
26 AT_SETUP([incremental with alternating -C])
27 AT_KEYWORDS([incremental create incr09 chdir])
33 echo foo/foo_file > foo/foo_file
34 echo bar/bar_file > bar/bar_file
35 echo middle/file > middle/middle_file
37 tar -cvf foo.tar --incremental -C foo . -C `pwd` middle -C bar .
42 tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file -C bar .
60 tar: .: Directory is new
61 tar: middle: Directory is new
62 tar: .: Directory is new
64 tar: .: Directory is new
65 tar: .: Directory is new