X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=tests%2Fignfail.sh;h=17b4f9bb029b113388210cae38976515b50491cd;hb=81460a034950f1b72de86a8ee12e6ed7b65f9707;hp=32bb60277db12ab3e5017be7b400f7337a61c001;hpb=1e809b7276c40b20dbe8aaad13722ca8a8fcd2ce;p=chaz%2Ftar diff --git a/tests/ignfail.sh b/tests/ignfail.sh index 32bb602..17b4f9b 100755 --- a/tests/ignfail.sh +++ b/tests/ignfail.sh @@ -1,12 +1,34 @@ #! /bin/sh + # Unreadable directories yielded error despite --ignore-failed-read. +# This file is part of GNU tar testsuite. +# Copyright (C) 2004 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + . ./preset . $srcdir/before > check-uid set - x`ls -l check-uid` -if test $3 = root; then +uid_name="$3" +set - x`ls -ln check-uid` +uid_number="$3" +if test "$uid_name" = root || test "$uid_number" = 0; then # The test is meaningless for super-user. rm check-uid @@ -47,15 +69,15 @@ else err="\ ----- -tar: Cannot add file file: Permission denied +tar: file: Cannot open: Permission denied tar: Error exit delayed from previous errors ----- -tar: Cannot add file file: Permission denied +tar: file: Warning: Cannot open: Permission denied ----- -tar: Cannot add directory directory: Permission denied +tar: directory: Cannot savedir: Permission denied tar: Error exit delayed from previous errors ----- -tar: Cannot add directory directory: Permission denied +tar: directory: Warning: Cannot savedir: Permission denied " fi