]> Dogcows Code - chaz/tar/blob - tests/filerem01.at
1c2c519c8c82990d9b46fdd04a52adeb7831d5d7
[chaz/tar] / tests / filerem01.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright 2009, 2013 Free Software Foundation, Inc.
5
6 # This file is part of GNU tar.
7
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.
12
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.
17
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/>.
20
21 # Description: when a file in a deep directory disappeared during creation
22 # of incremental dump, tar v. <1.23 would exit with TAREXIT_FAILURE (2).
23 # However, such events are quite common and don't necessarily constitute
24 # an error. Exiting with code 2 in such cases makes it impossible to
25 # distinguish serious errors from benign ones.
26 #
27 # Starting from tar 1.22.90, tar exits with TAREXIT_DIFFERS (1)
28 # instead.
29 #
30 # Reported by: Solar Designer <solar@openwall.com>
31 #
32 # References: <20090228235820.GA13362@openwall.com>
33 # http://lists.gnu.org/archive/html/bug-tar/2009-03/msg00000.html
34 #
35
36 AT_SETUP([file removed as we read it (ca. 22 seconds)])
37 AT_KEYWORDS([create incremental listed filechange filerem filerem01])
38
39 AT_TAR_CHECK([
40 mkdir dir
41 mkdir dir/sub
42 genfile --file dir/file1
43 genfile --file dir/sub/file2
44
45 genfile --run --checkpoint=3 --unlink dir/file1 -- \
46 tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
47 --checkpoint-action='echo' -c -f archive.tar \
48 --listed-incremental db -v dir >/dev/null
49 ],
50 [1],
51 [ignore],
52 [tar: dir: Directory is new
53 tar: dir/sub: Directory is new
54 tar: dir/file1: File removed before we read it
55 ],[],[],[gnu, posix])
56
57 # Timing information:
58 #
59 # For -Hgnu the above command line takes about 8 seconds to execute and
60 # produces:
61 #
62 # tar: dir: Directory is new
63 # tar: dir/sub: Directory is new
64 # dir/
65 # tar: Write checkpoint 1
66 # tar: Write checkpoint 2
67 # dir/sub/
68 # tar: Write checkpoint 3
69 # tar: Write checkpoint 4
70 # dir/file1
71 # tar: Write checkpoint 5
72 # dir/sub/file2
73 # tar: Write checkpoint 6
74 # tar: Write checkpoint 7
75 # tar: Write checkpoint 8
76 #
77 # For -Hposix the above command line takes about 14 seconds to execute and
78 # produces:
79 #
80 # ./tar: dir: Directory is new
81 # ./tar: dir/sub: Directory is new
82 # dir/
83 # ./tar: Write checkpoint 1
84 # ./tar: Write checkpoint 2
85 # ./tar: Write checkpoint 3
86 # dir/sub/
87 # ./tar: Write checkpoint 4
88 # ./tar: Write checkpoint 5
89 # ./tar: Write checkpoint 6
90 # dir/file1
91 # ./tar: Write checkpoint 7
92 # ./tar: Write checkpoint 8
93 # ./tar: Write checkpoint 9
94 # dir/sub/file2
95 # ./tar: Write checkpoint 10
96 # ./tar: Write checkpoint 11
97 # ./tar: Write checkpoint 12
98 # ./tar: Write checkpoint 13
99 # ./tar: Write checkpoint 14
100
101
102 AT_CLEANUP
This page took 0.034539 seconds and 3 git commands to generate.