1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2006-2007, 2009, 2013-2014 Free Software Foundation, Inc.
6 # This file is part of GNU tar.
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.
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.
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/>.
21 # Description: Handling of cyclic renames in incremental archives.
23 AT_SETUP([cyclic renames])
24 AT_KEYWORDS([incremental rename rename03 cyclic-rename])
30 genfile --file foo/file1
31 genfile --file foo/file2
34 genfile --file foo/a/filea
37 genfile --file foo/b/fileb
40 genfile --file foo/c/filec
46 tar -g incr -cf arch.1 -v foo 2>tmperr
49 # Shuffle directories:
57 echo "Second dump" >&2
58 tar -g incr -cf arch.2 -v foo 2>tmperr
61 tar xfg arch.1 /dev/null --warning=no-timestamp
63 echo "Begin directory listing 1"
65 echo "End directory listing 1"
67 tar xfgv arch.2 /dev/null --warning=no-timestamp
68 echo Begin directory listing 2
70 echo End directory listing 2
88 Begin directory listing 1
98 End directory listing 1
103 Begin directory listing 2
113 End directory listing 2
116 tar: foo/a: Directory is new
117 tar: foo/b: Directory is new
118 tar: foo/c: Directory is new
119 tar: foo: Directory is new
121 tar: foo/a: Directory has been renamed from 'foo/c'
122 tar: foo/b: Directory has been renamed from 'foo/a'
123 tar: foo/c: Directory has been renamed from 'foo/b'
125 [],[],[gnu, oldgnu, posix])