Improve handling of --test-label.
[tar.git] / tests / filerem02.at
blob8d7005a35a1b822bf0fca451719e51f7c29dee53
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)
9 # any later version.
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: see filerem01.at
20 # This test case checks if the tar exit code is still 2 if a
21 # file or directory disappears that is explicitly mentioned
22 # in the command line.
24 AT_SETUP([toplevel file removed (ca. 24 seconds)])
25 AT_KEYWORDS([create incremental filechange filerem filerem02])
27 AT_TAR_CHECK([
28 mkdir dir
29 mkdir dir/sub
30 genfile --file dir/file1
31 genfile --file dir/sub/file2
32 mkdir dir2
33 genfile --file dir2/file1
35 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
36        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
37        --checkpoint-action='echo' -c -f archive.tar \
38        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
40 [2],
41 [ignore],
42 [tar: dir2: Cannot stat: No such file or directory
43 tar: dir2/file1: File removed before we read it
44 tar: Exiting with failure status due to previous errors
45 ],[],[],[gnu, posix])
47 # Timing information: see filerem01.at
49 AT_CLEANUP