1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright (C) 2010 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)
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 # Tar up to 1.26 was unable to cope with directories that had once
20 # been part of the dumped system and became separate mount points
21 # afterwards. The bug has been reported by Nathan Stratton Treadway,
22 # who also proposed a fix and a testcase, on which the present one is
24 # Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
25 # Last-Affected-Version: 1.26
26 # References: <20120527212417.GR2654@shire.ontko.com>
27 # http://lists.gnu.org/archive/html/bug-tar/2012-05/msg00022.html
29 # This testcase is Linux-specific and requires root privileges.
31 AT_SETUP([--listed-incremental and remounted directories])
32 AT_KEYWORDS([listed incremental listed05])
36 options="-C tartest --create --one-file-system --verbose"
37 rm -rf archive-[01].snar archive-[01].tar tartest subdir
39 # Create initial structure
41 echo "hi" > tartest/top-level-file
43 echo "hi" > tartest/subdir/subdir-file
46 tar $options --file archive-0.tar --listed-incremental=archive-0.snar .
51 mount -t ramfs none tartest/subdir || AT_SKIP_TEST
52 tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
55 cp archive-0.snar archive-1.snar
56 tar $options --file archive-1.tar --listed-incremental=archive-1.snar .
71 [tar: .: Directory is new
72 tar: ./subdir: Directory is new
73 tar: ./subdir: directory is on a different filesystem; not dumped