summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2024-03-06 15:04:22 +0100
committerFrantisek Sumsal <frantisek@sumsal.cz>2024-03-06 16:10:47 +0100
commitc538fecc617d7a5fe0048b1df49f69dead92353f (patch)
tree9cc189d0518fb8d9f5f782489b7c41345c8d0dd8 /.github/workflows
parentPORTABLE_SERVICES.md: Improve grammar (diff)
downloadsystemd-c538fecc617d7a5fe0048b1df49f69dead92353f.tar.xz
systemd-c538fecc617d7a5fe0048b1df49f69dead92353f.zip
ci: make the build dir accessible when running w/o privileges
Otherwise the unprivileged part of test-execute gets silently skipped: /* test_run_tests_unprivileged */ Successfully forked off '(test-execute-unprivileged)' as PID 20998. ... pin_callout_binary: build dir binary: /home/runner/work/systemd/systemd/build/systemd-executor pin_callout_binary: open(/home/runner/work/systemd/systemd/build/systemd-executor)=-13 Failed to pin executor binary: No such file or directory (test-execute-unprivileged): manager_new, skipping tests: No such file or directory (test-execute-unprivileged) succeeded.
Diffstat (limited to '.github/workflows')
-rwxr-xr-x.github/workflows/unit_tests.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/.github/workflows/unit_tests.sh b/.github/workflows/unit_tests.sh
index c1a5ede383..a416396021 100755
--- a/.github/workflows/unit_tests.sh
+++ b/.github/workflows/unit_tests.sh
@@ -53,6 +53,11 @@ for phase in "${PHASES[@]}"; do
apt-get -y build-dep systemd
apt-get -y install "${ADDITIONAL_DEPS[@]}"
pip3 install -r .github/workflows/requirements.txt --require-hashes
+
+ # Make sure the build dir is accessible even when drop privileges, otherwise the unprivileged
+ # part of test-execute gets skipped, since it can't run systemd-executor
+ chmod o+x /home/runner
+ capsh --drop=all -- -c "stat $PWD/meson.build"
;;
RUN|RUN_GCC|RUN_CLANG|RUN_CLANG_RELEASE)
if [[ "$phase" =~ ^RUN_CLANG ]]; then