summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/chroot-fail.sh1
-rwxr-xr-xtests/misc/truncate-owned-by-other.sh3
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/misc/chroot-fail.sh b/tests/misc/chroot-fail.sh
index b171ec40c..a84826fd7 100755
--- a/tests/misc/chroot-fail.sh
+++ b/tests/misc/chroot-fail.sh
@@ -20,6 +20,7 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ chroot
+require_built_ chroot
# These tests verify exact status of internal failure; since none of
# them actually run a command, we don't need root privileges
diff --git a/tests/misc/truncate-owned-by-other.sh b/tests/misc/truncate-owned-by-other.sh
index 9f269ed4e..e93b7f136 100755
--- a/tests/misc/truncate-owned-by-other.sh
+++ b/tests/misc/truncate-owned-by-other.sh
@@ -31,6 +31,7 @@ chmod g+w root-owned
# Ensure that the current directory is searchable by $NON_ROOT_USERNAME.
chmod g+x .
-setuidgid $NON_ROOT_USERNAME env PATH="$PATH" truncate -s0 root-owned || fail=1
+chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+ truncate -s0 root-owned || fail=1
Exit $fail