From 6f3cec8a0dfc6d1d6f78375df4ecbf1954fa3250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 19 Oct 2022 09:56:56 +0200 Subject: [PATCH] TEST-15: add daemon-reload in one place Quoting https://github.com/systemd/systemd/pull/25050#discussion_r998721845: This part seems to be quite racy, at least in the C8S job: [ 1767.520856] H testsuite-15.sh[35]: *** test transient slice drop-ins [ 1767.520856] H testsuite-15.sh[35]: + mkdir -p /etc/systemd/system/slice.d [ 1767.522480] H testsuite-15.sh[35]: + mkdir -p /etc/systemd/system/a-.slice.d [ 1767.524992] H testsuite-15.sh[35]: + mkdir -p /etc/systemd/system/a-b-.slice.d [ 1767.526799] H testsuite-15.sh[35]: + mkdir -p /etc/systemd/system/a-b-c.slice.d [ 1767.528302] H testsuite-15.sh[35]: + echo -e '[Unit]\nDocumentation=man:drop1' [ 1767.528434] H testsuite-15.sh[35]: + echo -e '[Unit]\nDocumentation=man:drop2' [ 1767.528519] H testsuite-15.sh[35]: + echo -e '[Unit]\nDocumentation=man:drop3' [ 1767.528595] H testsuite-15.sh[35]: + echo -e '[Unit]\nDocumentation=man:drop4' [ 1767.528676] H testsuite-15.sh[35]: + systemctl cat a-b-c.slice [ 1767.541321] H systemctl[1042]: No files found for a-b-c.slice. [ 1767.542854] H systemd[1]: testsuite-15.service: Main process exited, code=exited, status=1/FAILURE [ 1767.542995] H systemd[1]: testsuite-15.service: Failed with result 'exit-code'. [ 1767.543360] H systemd[1]: Failed to start testsuite-15.service. [ 1767.543542] H systemd[1]: testsuite-15.service: Consumed 1.586s CPU time. [ 1767.543938] H systemd[1]: Reached target testsuite.target. [ 1767.545737] H systemd[1]: Starting end.service... --- test/units/testsuite-15.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/units/testsuite-15.sh b/test/units/testsuite-15.sh index 3c3dbefa685..2f80cf25648 100755 --- a/test/units/testsuite-15.sh +++ b/test/units/testsuite-15.sh @@ -337,6 +337,9 @@ test_transient_slice_dropins () { echo -e '[Unit]\nDocumentation=man:drop3' >/etc/systemd/system/a-b-.slice.d/drop3.conf echo -e '[Unit]\nDocumentation=man:drop4' >/etc/systemd/system/a-b-c.slice.d/drop4.conf + # Invoke daemon-reload to make sure that the call below doesn't fail + systemctl daemon-reload + # No fragment is required, so this works systemctl cat a-b-c.slice