From: Mike Yuan Date: Tue, 6 Feb 2024 09:10:49 +0000 (+0800) Subject: TEST-54-CREDS: add test for ExecStartPost= (#31194) X-Git-Tag: v256-rc1~955^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54c3546188e4c9f2dd1b9ae2d752f145f3125710;p=thirdparty%2Fsystemd.git TEST-54-CREDS: add test for ExecStartPost= (#31194) --- diff --git a/test/units/testsuite-54.sh b/test/units/testsuite-54.sh index 3c92994b14d..914f9865454 100755 --- a/test/units/testsuite-54.sh +++ b/test/units/testsuite-54.sh @@ -297,11 +297,18 @@ fi systemd-run -p DynamicUser=yes -p 'LoadCredential=os:/etc/os-release' \ -p 'ExecStartPre=true' \ -p 'ExecStartPre=systemd-creds cat os' \ - --unit=test-54-exec-start.service \ + --unit=test-54-exec-start-pre.service \ --wait \ --pipe \ true | cmp /etc/os-release +# https://github.com/systemd/systemd/issues/31194 +systemd-run -p DynamicUser=yes -p 'LoadCredential=os:/etc/os-release' \ + -p 'ExecStartPost=systemd-creds cat os' \ + --unit=test-54-exec-start-post.service \ + --service-type=oneshot --wait --pipe \ + true | cmp /etc/os-release + if ! systemd-detect-virt -q -c ; then # Validate that the credential we inserted via the initrd logic arrived test "$(systemd-creds cat --system myinitrdcred)" = "guatemala"