From: Daan De Meyer Date: Tue, 21 Jan 2025 12:48:13 +0000 (+0100) Subject: TEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM X-Git-Tag: v258-rc1~1540^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F36059%2Fhead;p=thirdparty%2Fsystemd.git TEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM On CentOS Stream 9/10 booting mkosi qemu with --firmware=linux doesn't add the virtual TPM to the virtual machine which means TEST-74-AUX-UTILS.run.sh fails because it requires a TPM. Let's move the systemd-pcrlock logic that requires a TPM to TEST-70-TPM.pcrlock to avoid the problem. --- diff --git a/test/units/TEST-70-TPM2.pcrlock.sh b/test/units/TEST-70-TPM2.pcrlock.sh index 19af3a774da..38274991db7 100755 --- a/test/units/TEST-70-TPM2.pcrlock.sh +++ b/test/units/TEST-70-TPM2.pcrlock.sh @@ -205,3 +205,8 @@ varlinkctl call /run/systemd/io.systemd.PCRLock io.systemd.PCRLock.MakePolicy '{ varlinkctl call --collect --json=pretty /run/systemd/io.systemd.PCRLock io.systemd.PCRLock.ReadEventLog '{}' rm "$img" /tmp/pcrlockpwd + +# For issue #35746 +for _ in {0..10}; do + run0 /usr/lib/systemd/systemd-pcrlock +done diff --git a/test/units/TEST-74-AUX-UTILS.run.sh b/test/units/TEST-74-AUX-UTILS.run.sh index d47550c8016..83ae352943f 100755 --- a/test/units/TEST-74-AUX-UTILS.run.sh +++ b/test/units/TEST-74-AUX-UTILS.run.sh @@ -271,11 +271,6 @@ if [[ -e /usr/lib/pam.d/systemd-run0 ]] || [[ -e /etc/pam.d/systemd-run0 ]]; the # Validate when we invoke run0 without a tty, that depending on --pty it either allocates a tty or not assert_neq "$(run0 --pty tty < /dev/null)" "not a tty" assert_eq "$(run0 --pipe tty < /dev/null)" "not a tty" - - # For issue #35746 - for _ in {0..10}; do - run0 /usr/lib/systemd/systemd-pcrlock - done fi # Tests whether intermediate disconnects corrupt us (modified testcase from https://github.com/systemd/systemd/issues/27204)