1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

Merge pull request #31657 from mrc0mmand/test-execute-shenanigans

A couple of tweaks for test-execute
This commit is contained in:
Luca Boccassi 2024-03-06 17:22:39 +00:00 committed by GitHub
commit 9a6acbdc03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,12 @@ set -ex
MESON_ARGS=(-Dcryptolib=${CRYPTOLIB:-auto})
# (Re)set the current oom-{score-}adj. For some reason root on GH actions is able to _decrease_
# its oom-score even after dropping all capabilities (including CAP_SYS_RESOURCE), until the
# score is explicitly changed after sudo. No idea what's going on, but it breaks
# exec-oomscoreadjust-negative.service from test-execute when running unprivileged.
choom -p $$ -n 0
for phase in "${PHASES[@]}"; do
case $phase in
SETUP)
@ -53,6 +59,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