X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=tests%2Fignfail.sh;h=ec0fb104584982a95017d86bee10577c8d6857fc;hb=19335cdfb4bd2a246c26f8f36ebbec3f75e7846f;hp=32bb60277db12ab3e5017be7b400f7337a61c001;hpb=1e809b7276c40b20dbe8aaad13722ca8a8fcd2ce;p=chaz%2Ftar diff --git a/tests/ignfail.sh b/tests/ignfail.sh index 32bb602..ec0fb10 100755 --- a/tests/ignfail.sh +++ b/tests/ignfail.sh @@ -1,4 +1,22 @@ #! /bin/sh +# 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. + # Unreadable directories yielded error despite --ignore-failed-read. . ./preset @@ -6,7 +24,10 @@ > 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 +68,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