]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Use $srcdir/../priv-check, rather than
authorJim Meyering <jim@meyering.net>
Fri, 18 Jul 2003 09:05:49 +0000 (09:05 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 18 Jul 2003 09:05:49 +0000 (09:05 +0000)
hard-coding something not quite equivalent.  Reported by Paul Jarc.

tests/cp/fail-perm

index 474a84b4d5a8702b5bc49479a4faa9abe3d6cea2..9ba355a19d50ec367a02758548f5d69b673ce55b 100755 (executable)
@@ -5,6 +5,8 @@ if test "$VERBOSE" = yes; then
   cp --version
 fi
 
+PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
+
 pwd=`pwd`
 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
@@ -19,15 +21,6 @@ touch D/a || framework_failure=1
 chmod 0 D/a || framework_failure=1
 chmod 500 D || framework_failure=1
 
-touch file || framework_failure=1
-chmod u-w file || framework_failure=1
-(echo foo >> file) >/dev/null 2>&1 && {
-  echo '********************************************'
-  echo "$0: NOTICE: This test case cannot be run as root."
-  echo '********************************************'
-  exit 77
-}
-
 if test $framework_failure = 1; then
   echo 'failure in testing framework'
   exit 1