1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2017-2018 Free Software Foundation, Inc.
6 # This file is part of GNU tar.
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.
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.
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/>.
23 # When a directory in a deep directory disappeared during creation
24 # of incremental dump, tar <= 1.29 exits with TAREXIT_FAILURE (2).
26 # In case of files tar does not return TAREXIT_FAILURE, but instead
27 # it prints a warning and exits with TAREXIT_DIFFERS.
29 # This test checks whether this behaviour is mimicked for directories, too.
31 # Remark: This file is based on 'filerem01.at', which is the test-case for
34 AT_SETUP([directory removed before reading])
35 AT_KEYWORDS([create incremental listed dirchange dirrem dirrem01])
40 genfile --file dir/file1
41 genfile --file dir/sub/file2
43 case "$TEST_TAR_FORMAT" in
49 genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
50 tar --blocking-factor=1 -c -f archive.tar \
51 --listed-incremental db -v dir >/dev/null
55 [tar: dir: Directory is new
56 tar: dir/sub: Directory is new
57 tar: dir/sub: file changed as we read it
58 tar: dir/sub: File removed before we read it