]> Dogcows Code - chaz/tar/blob - tests/filerem01.at
tar: add comment to link04.at test
[chaz/tar] / tests / filerem01.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright (C) 2009 Free Software Foundation, Inc.
5
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)
9 # any later version.
10
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.
15
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/>.
18
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.
24 #
25 # Starting from tar 1.22.90, tar exits with TAREXIT_DIFFERS (1)
26 # instead.
27 #
28 # Reported by: Solar Designer <solar@openwall.com>
29 #
30 # References: <20090228235820.GA13362@openwall.com>
31 # http://lists.gnu.org/archive/html/bug-tar/2009-03/msg00000.html
32 #
33
34 AT_SETUP([file removed as we read it (ca. 22 seconds)])
35 AT_KEYWORDS([create incremental filechange filerem filerem01])
36
37 AT_TAR_CHECK([
38 mkdir dir
39 mkdir dir/sub
40 genfile --file dir/file1
41 genfile --file dir/sub/file2
42
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
47 ],
48 [1],
49 [ignore],
50 [tar: dir: Directory is new
51 tar: dir/sub: Directory is new
52 tar: dir/file1: File removed before we read it
53 ],[],[],[gnu, posix])
54
55 # Timing information:
56 #
57 # For -Hgnu the above command line takes about 8 seconds to execute and
58 # produces:
59 #
60 # tar: dir: Directory is new
61 # tar: dir/sub: Directory is new
62 # dir/
63 # tar: Write checkpoint 1
64 # tar: Write checkpoint 2
65 # dir/sub/
66 # tar: Write checkpoint 3
67 # tar: Write checkpoint 4
68 # dir/file1
69 # tar: Write checkpoint 5
70 # dir/sub/file2
71 # tar: Write checkpoint 6
72 # tar: Write checkpoint 7
73 # tar: Write checkpoint 8
74 #
75 # For -Hposix the above command line takes about 14 seconds to execute and
76 # produces:
77 #
78 # ./tar: dir: Directory is new
79 # ./tar: dir/sub: Directory is new
80 # dir/
81 # ./tar: Write checkpoint 1
82 # ./tar: Write checkpoint 2
83 # ./tar: Write checkpoint 3
84 # dir/sub/
85 # ./tar: Write checkpoint 4
86 # ./tar: Write checkpoint 5
87 # ./tar: Write checkpoint 6
88 # dir/file1
89 # ./tar: Write checkpoint 7
90 # ./tar: Write checkpoint 8
91 # ./tar: Write checkpoint 9
92 # dir/sub/file2
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
98
99
100 AT_CLEANUP
This page took 0.036687 seconds and 4 git commands to generate.