re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / incr04.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
5 # Inc.
6
7 # This file is part of GNU tar.
8
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.
13
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.
18
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/>.
21
22 # Description: Rewritten incremental backup support (2006-05-08)
23 # missed initialization of all struct directory members in make_directory,
24 # which lead to random core dumps.
25 # Reported by Sergey Myasnikov <tigra@sw.ru>.  This testcase uses original
26 # script provided by him.
27 # References: <1148669592.5127.81.camel@tigra.sw.ru>
28 #             http://lists.gnu.org/archive/html/bug-tar/2006-05/msg00038.html
29
30 AT_SETUP([proper icontents initialization])
31 AT_KEYWORDS([incremental incr04 icontents])
32
33 m4_pushdef([NAME_PREFIX],[a/b/one_31_chars_long_file_name_])
34
35 AT_TAR_CHECK([
36 AT_CHECK_TIMESTAMP
37 AT_TAR_MKHIER(a/b)
38 awk 'BEGIN {
39   for (i=1;i<=142;i++)
40     printf("NAME_PREFIX[%03d]\n", i);
41   }' < /dev/null | genfile --files-from -
42
43 sleep 1
44
45 echo "Initial dump"
46 tar cvf a0.tar -g a.sna a
47 mv a/b a/c
48 echo "Incremental dump"
49 tar cvf a1.tar -g a.sna a
50 ],
51 [0],
52 [Initial dump
53 a/
54 a/b/
55 m4_for(I,1,142,1,[NAME_PREFIX[]m4_if(m4_len(I),1,00,m4_len(I),2,0)I
56 ])dnl
57 Incremental dump
58 a/
59 a/c/
60 ],
61 [tar: a: Directory is new
62 tar: a/b: Directory is new
63 tar: a/c: Directory has been renamed from 'a/b'
64 ],[],[],[gnu, oldgnu, posix])
65
66 m4_popdef([NAME_PREFIX])
67 AT_CLEANUP
68
69 # End of incr04.at