tests: A SANITY test prereq for testing if we're root
[gitweb.git] / t / test-lib.sh
index 9ded0eee18e7479b0674a7bce217de46744b1dff..78c4874465c8713c5306c9d3ec708ebfc2c63be5 100644 (file)
@@ -897,3 +897,7 @@ test -z "$NO_PYTHON" && test_set_prereq PYTHON
 # test whether the filesystem supports symbolic links
 ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
 rm -f y
+
+# 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