From 53888c3393c8189c383a776284d80d002c30a507 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Jun 2023 22:53:26 +0200 Subject: [PATCH] test: verify that the getty generator with creds works --- test/TEST-54-CREDS/test.sh | 1 + test/units/testsuite-54.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/test/TEST-54-CREDS/test.sh b/test/TEST-54-CREDS/test.sh index 1d14e0a8c97..55882422305 100755 --- a/test/TEST-54-CREDS/test.sh +++ b/test/TEST-54-CREDS/test.sh @@ -16,6 +16,7 @@ QEMU_CREDS=( "-smbios type=11,value=io.systemd.credential.binary:sysusers.extra=dSBjcmVkdGVzdHVzZXIK" "-smbios type=11,value=io.systemd.credential.binary:tmpfiles.extra=ZiAvdG1wL3NvdXJjZWRmcm9tY3JlZGVudGlhbCAtIC0gLSAtIHRtcGZpbGVzc2VjcmV0Cg==" "-smbios type=11,value=io.systemd.credential.binary:fstab.extra=aW5qZWN0ZWQgL2luamVjdGVkIHRtcGZzIFgtbW91bnQubWtkaXIgMCAwCg==" + "-smbios type=11,value=io.systemd.credential:getty.ttys.container=idontexist" ) QEMU_OPTIONS="${QEMU_OPTIONS:-} ${QEMU_CREDS[*]}" diff --git a/test/units/testsuite-54.sh b/test/units/testsuite-54.sh index bcc7313d6fd..8ba327a3b11 100755 --- a/test/units/testsuite-54.sh +++ b/test/units/testsuite-54.sh @@ -308,6 +308,9 @@ if ! systemd-detect-virt -q -c ; then # Check that the fstab credential logic worked test -d /injected grep -q /injected /proc/self/mountinfo + + # Make sure the getty generator processed the credentials properly + systemctl -P Wants show getty.target | grep -q container-getty@idontexist.service fi systemd-analyze log-level info -- 2.47.3