1 # Test suite for GNU tar. -*- Autotest -*-
2 # Copyright 2017-2022 Free Software Foundation, Inc.
4 # This file is part of GNU tar.
6 # GNU tar 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 of the License, or
9 # (at your option) any later version.
11 # GNU tar 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 # When called with the --delay-directory-restore option, tar would
20 # in some cases restore the directory permissions too early, before
21 # attempting to replace softlink placeholders with the actual link.
22 # This caused failure if the permissions forbade writing.
24 # The bug was caused by incorrect assumption about delayed_set_stat
25 # ordering in create_placeholder_file.
27 # Reported by: Giuseppe Scrivano <gscrivano@gnu.org>
28 # References: <878tfa17ti.fsf@redhat.com>,
29 # <http://lists.gnu.org/archive/html/bug-tar/2017-11/msg00009.html>
31 AT_SETUP([delay-directory-restore])
32 AT_KEYWORDS([extract extract21 read-only symlink delay-directory-restore])
34 AT_UNPRIVILEGED_PREREQ
43 tar --no-recurs -c -f A.tar a a/b a/b/D a/c a/b/A a/c/A
45 tar -C out -v -x -f A.tar --delay-directory-restore
55 [],[],[],[ustar]) # Testing one format is enough