1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright (C) 2009 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # Description: when a file in a deep directory disappeared during creation
20 # of incremental dump, tar v. <1.23 would exit with TAREXIT_FAILURE (2).
21 # However, such events are quite common and don't necessarily constitute
22 # an error. Exiting with code 2 in such cases makes it impossible to
23 # distinguish serious errors from benign ones.
25 # Starting from tar 1.22.90, tar exits with TAREXIT_DIFFERS (1)
28 # Reported by: Solar Designer <solar@openwall.com>
30 # References: <20090228235820.GA13362@openwall.com>
31 # http://lists.gnu.org/archive/html/bug-tar/2009-03/msg00000.html
34 AT_SETUP([file removed as we read it (ca. 22 seconds)])
35 AT_KEYWORDS([create incremental filechange filerem filerem01])
40 genfile --file dir/file1
41 genfile --file dir/sub/file2
43 genfile --run --checkpoint=3 --unlink dir/file1 -- \
44 tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
45 --checkpoint-action='echo' -c -f archive.tar \
46 --listed-incremental db -v dir >/dev/null
50 [tar: dir: Directory is new
51 tar: dir/sub: Directory is new
52 tar: dir/file1: File removed before we read it
57 # For -Hgnu the above command line takes about 8 seconds to execute and
60 # tar: dir: Directory is new
61 # tar: dir/sub: Directory is new
63 # tar: Write checkpoint 1
64 # tar: Write checkpoint 2
66 # tar: Write checkpoint 3
67 # tar: Write checkpoint 4
69 # tar: Write checkpoint 5
71 # tar: Write checkpoint 6
72 # tar: Write checkpoint 7
73 # tar: Write checkpoint 8
75 # For -Hposix the above command line takes about 14 seconds to execute and
78 # ./tar: dir: Directory is new
79 # ./tar: dir/sub: Directory is new
81 # ./tar: Write checkpoint 1
82 # ./tar: Write checkpoint 2
83 # ./tar: Write checkpoint 3
85 # ./tar: Write checkpoint 4
86 # ./tar: Write checkpoint 5
87 # ./tar: Write checkpoint 6
89 # ./tar: Write checkpoint 7
90 # ./tar: Write checkpoint 8
91 # ./tar: Write checkpoint 9
93 # ./tar: Write checkpoint 10
94 # ./tar: Write checkpoint 11
95 # ./tar: Write checkpoint 12
96 # ./tar: Write checkpoint 13
97 # ./tar: Write checkpoint 14