diff options
author | Jim Meyering <jim@meyering.net> | 2003-07-18 09:05:49 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-07-18 09:05:49 +0000 |
commit | 10c48512f081b0be233ba6c17455e91333d4dcf5 (patch) | |
tree | c5054974994518cf4a0414ebf8358c1503010003 /tests | |
parent | 8dd15f024c2a28d32c34a89f8639adb4a1666d97 (diff) | |
download | coreutils-10c48512f081b0be233ba6c17455e91333d4dcf5.tar.xz |
Use $srcdir/../priv-check, rather than
hard-coding something not quite equivalent. Reported by Paul Jarc.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/cp/fail-perm | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm index 474a84b4d..9ba355a19 100755 --- a/tests/cp/fail-perm +++ b/tests/cp/fail-perm @@ -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 |