summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2022-10-17 21:52:00 +0200
committerGitHub <noreply@github.com>2022-10-17 21:52:00 +0200
commit61938b3c8dca8a37c62cf306359ec8dd0f62ea60 (patch)
tree68e39b2aee6aa5a66684cb968f187b6896a6b9aa
parent725a28fe77e92bf1827e91ea24043e0fc926b62e (diff)
parentc0c03d9ce13a5b706a33ffdd8e69fa6cad63358e (diff)
downloadsystemd-61938b3c8dca8a37c62cf306359ec8dd0f62ea60.tar.gz
Merge pull request #25039 from mrc0mmand/test-tewaks
A couple of minor tweaks for recent CI fails
-rwxr-xr-xtest/TEST-34-DYNAMICUSERMIGRATE/test.sh5
-rwxr-xr-xtest/test-shutdown.py2
-rwxr-xr-xtest/units/testsuite-34.sh24
3 files changed, 18 insertions, 13 deletions
diff --git a/test/TEST-34-DYNAMICUSERMIGRATE/test.sh b/test/TEST-34-DYNAMICUSERMIGRATE/test.sh
index 5acc57363e..4e8836648a 100755
--- a/test/TEST-34-DYNAMICUSERMIGRATE/test.sh
+++ b/test/TEST-34-DYNAMICUSERMIGRATE/test.sh
@@ -3,6 +3,11 @@
set -e
TEST_DESCRIPTION="test migrating state directory from DynamicUser=1 to DynamicUser=0 and back"
+# Certain subtests run with DynamicUser=true which makes writing the gcov
+# artifacts impossible. As $GCOV_PREFIX and friends seem to be ineffective
+# in this situation, let's simply ignore all gcov complaints for the whole
+# test to make it happy.
+IGNORE_MISSING_COVERAGE=yes
# shellcheck source=test/test-functions
. "${TEST_BASE_DIR:?}/test-functions"
diff --git a/test/test-shutdown.py b/test/test-shutdown.py
index 52207a4656..e181f976be 100755
--- a/test/test-shutdown.py
+++ b/test/test-shutdown.py
@@ -90,7 +90,7 @@ def run(args):
except Exception as e:
logger.error(e)
logger.info("killing child pid %d", console.pid)
- console.terminate()
+ console.terminate(force=True)
return ret
diff --git a/test/units/testsuite-34.sh b/test/units/testsuite-34.sh
index beaf3ba31e..2172f7434b 100755
--- a/test/units/testsuite-34.sh
+++ b/test/units/testsuite-34.sh
@@ -116,7 +116,7 @@ test_check_writable() {
rm -rf "/var/lib/$i" "/var/lib/private/$i"
done
- cat >/run/systemd/system/testservice-34-check-writable.service <<EOF
+ cat >/run/systemd/system/testservice-34-check-writable.service <<\EOF
[Unit]
Description=Check writable directories when DynamicUser= with StateDirectory=
@@ -133,18 +133,18 @@ ExecStart=bash -c ' \
set -eux; \
set -o pipefail; \
declare -a writable_dirs; \
- readarray -t writable_dirs < <(find / \\( -path /var/tmp -o -path /tmp -o -path /proc -o -path /dev/mqueue -o -path /dev/shm -o \
- -path /sys/fs/bpf -o -path /dev/.lxc -o -path /sys/devices/system/cpu \\) \
+ readarray -t writable_dirs < <(find / \( -path /var/tmp -o -path /tmp -o -path /proc -o -path /dev/mqueue -o -path /dev/shm -o \
+ -path /sys/fs/bpf -o -path /dev/.lxc -o -path /sys/devices/system/cpu \) \
-prune -o -type d -writable -print 2>/dev/null | sort -u); \
- [[ "\$\${#writable_dirs[@]}" == "8" ]]; \
- [[ "\$\${writable_dirs[0]}" == "/var/lib/private/aaa" ]]; \
- [[ "\$\${writable_dirs[1]}" == "/var/lib/private/aaa/bbb" ]]; \
- [[ "\$\${writable_dirs[2]}" == "/var/lib/private/aaa/ccc" ]]; \
- [[ "\$\${writable_dirs[3]}" == "/var/lib/private/quux/pief" ]]; \
- [[ "\$\${writable_dirs[4]}" == "/var/lib/private/waldo" ]]; \
- [[ "\$\${writable_dirs[5]}" == "/var/lib/private/xxx" ]]; \
- [[ "\$\${writable_dirs[6]}" == "/var/lib/private/xxx/yyy" ]]; \
- [[ "\$\${writable_dirs[7]}" == "/var/lib/private/xxx/zzz" ]]; \
+ [[ "$${#writable_dirs[@]}" == "8" ]]; \
+ [[ "$${writable_dirs[0]}" == "/var/lib/private/aaa" ]]; \
+ [[ "$${writable_dirs[1]}" == "/var/lib/private/aaa/bbb" ]]; \
+ [[ "$${writable_dirs[2]}" == "/var/lib/private/aaa/ccc" ]]; \
+ [[ "$${writable_dirs[3]}" == "/var/lib/private/quux/pief" ]]; \
+ [[ "$${writable_dirs[4]}" == "/var/lib/private/waldo" ]]; \
+ [[ "$${writable_dirs[5]}" == "/var/lib/private/xxx" ]]; \
+ [[ "$${writable_dirs[6]}" == "/var/lib/private/xxx/yyy" ]]; \
+ [[ "$${writable_dirs[7]}" == "/var/lib/private/xxx/zzz" ]]; \
'
EOF
systemctl daemon-reload