| 1 |
# Process this file with autom4te to create testsuite. -*- Autotest -*- |
| 2 |
|
| 3 |
# Test suite for GNU tar. |
| 4 |
# Copyright 2009-2023 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: see filerem01.at |
| 22 |
# This test case checks if the tar exit code is still 2 if a |
| 23 |
# file or directory disappears that is explicitly mentioned |
| 24 |
# in the command line. |
| 25 |
|
| 26 |
AT_SETUP([toplevel file removed]) |
| 27 |
AT_KEYWORDS([create incremental listed filechange filerem filerem02]) |
| 28 |
|
| 29 |
AT_TAR_CHECK([ |
| 30 |
mkdir dir |
| 31 |
mkdir dir/sub |
| 32 |
genfile --file dir/file1 |
| 33 |
genfile --file dir/sub/file2 |
| 34 |
mkdir dir2 |
| 35 |
genfile --file dir2/file1 |
| 36 |
|
| 37 |
genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ |
| 38 |
tar --blocking-factor=1 -c -f archive.tar \ |
| 39 |
--listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null |
| 40 |
], |
| 41 |
[2], |
| 42 |
[ignore], |
| 43 |
[ignore],[],[],[gnu, posix]) |
| 44 |
|
| 45 |
# Ignore stdout and stderr because their contents depend on |
| 46 |
# the file system implementation. |
| 47 |
|
| 48 |
# Timing information: see filerem01.at |
| 49 |
|
| 50 |
AT_CLEANUP |