|
Packit |
1ef1a9 |
# Process this file with autom4te to create testsuite. -*- Autotest -*-
|
|
Packit |
1ef1a9 |
# Copyright (C) 2009-2010, 2014-2015 Free Software Foundation, Inc.
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
# This program is free software; you can redistribute it and/or modify
|
|
Packit |
1ef1a9 |
# it under the terms of the GNU General Public License as published by
|
|
Packit |
1ef1a9 |
# the Free Software Foundation; either version 3, or (at your option)
|
|
Packit |
1ef1a9 |
# any later version.
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
# This program is distributed in the hope that it will be useful,
|
|
Packit |
1ef1a9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
1ef1a9 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
1ef1a9 |
# GNU General Public License for more details.
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
# You should have received a copy of the GNU General Public License
|
|
Packit |
1ef1a9 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
AT_SETUP([delayed setstat (with -depth)])
|
|
Packit |
1ef1a9 |
AT_KEYWORDS([setstat debian=458079 setstat02])
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
# Description: Cpio versions up to 2.10 failed to restore directory
|
|
Packit |
1ef1a9 |
# permissions, if the directory was already present on dist (e.g. when
|
|
Packit |
1ef1a9 |
# using find . -depth).
|
|
Packit |
1ef1a9 |
#
|
|
Packit |
1ef1a9 |
# References:
|
|
Packit |
1ef1a9 |
# <20090620185721.GA18708@scru.org>
|
|
Packit |
1ef1a9 |
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=458079
|
|
Packit |
1ef1a9 |
#
|
|
Packit |
1ef1a9 |
# See also: setstat03, setstat04, setstat05
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
AT_CHECK([
|
|
Packit |
1ef1a9 |
mkdir dir
|
|
Packit |
1ef1a9 |
echo "test file" > dir/file
|
|
Packit |
1ef1a9 |
chmod 500 dir
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
find dir -depth | cpio -o --quiet > archive
|
|
Packit |
1ef1a9 |
# Darwin cannot rename a directory whose permissions disallow writing.
|
|
Packit |
1ef1a9 |
chmod 700 dir
|
|
Packit |
1ef1a9 |
mv dir old
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
cpio -id --quiet < archive
|
|
Packit |
1ef1a9 |
genfile --stat=mode.777 dir
|
|
Packit |
1ef1a9 |
],
|
|
Packit |
1ef1a9 |
[0],
|
|
Packit |
1ef1a9 |
[500
|
|
Packit |
1ef1a9 |
])
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
AT_CLEANUP
|
|
Packit |
1ef1a9 |
|
|
Packit |
1ef1a9 |
|