1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2017-2024 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.
32 # 1. This file is based on 'filerem01.at', which is the test-case for
34 # 2. Depending on the stat.st_ctime resolution, the "file changed as we
35 # read it" warning might be issued for dir/sub. The test takes care to
38 AT_SETUP([directory removed before reading])
39 AT_KEYWORDS([create incremental listed dirchange dirrem dirrem01])
44 genfile --file dir/file1
45 genfile --file dir/sub/file2
47 case "$TEST_TAR_FORMAT" in
53 genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
54 tar --blocking-factor=1 -c -f archive.tar \
55 --listed-incremental db \
56 --warning=no-file-changed \
61 [tar: dir: Directory is new
62 tar: dir/sub: Directory is new
63 tar: dir/sub: File removed before we read it