]> Dogcows Code - chaz/tar/blob - tests/chtype.at
e5b5876ee8dcdc99c96c6712a1416ccb7d707eb5
[chaz/tar] / tests / chtype.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright 2006-2007, 2013 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: Incremental restore malfunctions if an archive member
22 # changes type before restoration, e.g. from directory to file or vice
23 # versa.
24 # Reported by: Wolfram Kleff <bugreport@wkleff.intergenia.de>
25 # References: <200605101232.25031.bugreport@wkleff.intergenia.de>
26
27 AT_SETUP([changed file types in incrementals])
28 AT_KEYWORDS([incremental listed chtype])
29
30 AT_TAR_CHECK([
31 AT_SORT_PREREQ
32 AT_TAR_MKHIER([directory/b/c],[x])
33 mkdir directory/a
34 genfile --file directory/a/a
35
36 echo First backup
37 tar --create --file=archive.1 --listed-incremental=db.1 directory
38
39 sleep 2
40
41 # Remove directory b and create a file with this name.
42 # Previous versions were not able to restore over this file.
43 rm -r directory/b
44 genfile --file directory/b
45 genfile --file directory/a/b
46
47 echo Second backup
48 tar --create --file=archive.2 --listed-incremental=db.2 directory
49
50 # Delete a
51 rm -r directory
52
53 echo Restore archive.1
54 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
55 echo Restore archive.2
56 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
57 find directory | sort
58 ],
59 [0],
60 [First backup
61 Second backup
62 Restore archive.1
63 Restore archive.2
64 directory
65 directory/a
66 directory/a/a
67 directory/a/b
68 directory/b
69 ],[],[],[],[gnu, oldgnu, posix])
70
71 AT_CLEANUP
72
73 # End of chtype.at
This page took 0.034061 seconds and 3 git commands to generate.