summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index a7a4639d7c..b2b2ec7f1c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -992,6 +992,11 @@ test_lazy_prereq USR_BIN_TIME '
test -x /usr/bin/time
'
+test_lazy_prereq NOT_ROOT '
+ uid=$(id -u) &&
+ test "$uid" != 0
+'
+
# When the tests are run as root, permission tests will report that
# things are writable when they shouldn't be.
test -w / || test_set_prereq SANITY