1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
7 # This file is part of GNU tar.
9 # GNU tar is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # GNU tar is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 # Description: Handling of cyclic renames in incremental archives.
24 AT_SETUP([cyclic renames])
25 AT_KEYWORDS([incremental rename rename03 cyclic-rename])
31 genfile --file foo/file1
32 genfile --file foo/file2
35 genfile --file foo/a/filea
38 genfile --file foo/b/fileb
41 genfile --file foo/c/filec
47 tar -g incr -cf arch.1 -v foo 2>tmperr
50 # Shuffle directories:
58 echo "Second dump" >&2
59 tar -g incr -cf arch.2 -v foo 2>tmperr
62 tar xfg arch.1 /dev/null --warning=no-timestamp
64 echo "Begin directory listing 1"
66 echo "End directory listing 1"
68 tar xfgv arch.2 /dev/null --warning=no-timestamp
69 echo Begin directory listing 2
71 echo End directory listing 2
89 Begin directory listing 1
99 End directory listing 1
104 Begin directory listing 2
114 End directory listing 2
117 tar: foo/a: Directory is new
118 tar: foo/b: Directory is new
119 tar: foo/c: Directory is new
120 tar: foo: Directory is new
122 tar: foo/a: Directory has been renamed from 'foo/c'
123 tar: foo/b: Directory has been renamed from 'foo/a'
124 tar: foo/c: Directory has been renamed from 'foo/b'
126 [],[],[gnu, oldgnu, posix])