summaryrefslogtreecommitdiff
path: root/tests/rm/fail-2eperm.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rm/fail-2eperm.sh')
-rwxr-xr-xtests/rm/fail-2eperm.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/rm/fail-2eperm.sh b/tests/rm/fail-2eperm.sh
index 6e8ce9ba..0bbd028d 100755
--- a/tests/rm/fail-2eperm.sh
+++ b/tests/rm/fail-2eperm.sh
@@ -2,7 +2,7 @@
# Like fail-eperm, but the failure must be for a file encountered
# while trying to remove the containing directory with the sticky bit set.
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2015 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
@@ -32,14 +32,16 @@ touch a/b || framework_failure_
# Try to ensure that $NON_ROOT_USERNAME can access
# the required version of rm.
rm_version=$(
- chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" rm --version |
+ chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+ rm --version |
sed -n '1s/.* //p'
)
case $rm_version in
$PACKAGE_VERSION) ;;
*) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
esac
-chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" rm -rf a 2> out-t && fail=1
+chroot --skip-chdir --user=$NON_ROOT_USERNAME / \
+ env PATH="$PATH" rm -rf a 2> out-t && fail=1
# On some systems, we get 'Not owner'. Convert it.
# On other systems (HPUX), we get 'Permission denied'. Convert it, too.