summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2023-02-27 12:40:05 +0000
committerSimon McVittie <smcv@collabora.com>2023-02-27 12:40:05 +0000
commit3500ad0443e59c3181725e7b78d3673048af703a (patch)
tree96c3d58d497cf14260793a38575fbaa388c1ad76 /tests
parenta43b14381142abbd2d0f899b402a7d5b763599e0 (diff)
downloadostree-3500ad0443e59c3181725e7b78d3673048af703a.tar.gz
tests: Ensure non-root users have access to libcap tools
On Debian systems, by default only root has /{usr/,}sbin in PATH. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/libtest.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/libtest.sh b/tests/libtest.sh
index 264094b1..963bc923 100755
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -32,6 +32,9 @@ else
fi
. ${test_srcdir}/libtest-core.sh
+# Make sure /sbin/capsh etc. are in our PATH even if non-root
+PATH="$PATH:/usr/sbin:/sbin"
+
# Array of expressions to execute when exiting. Each expression should
# be a single string (quoting if necessary) that will be eval'd. To add
# a command to run on exit, append to the libtest_exit_cmds array like