]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: verify that the getty generator with creds works
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Jun 2023 20:53:26 +0000 (22:53 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 4 Jul 2023 21:14:21 +0000 (23:14 +0200)
test/TEST-54-CREDS/test.sh
test/units/testsuite-54.sh

index 1d14e0a8c9798b3c155b49a29f0ecfb9e77b9d81..55882422305e5a59256dfa25f36fb0a3931e3b94 100755 (executable)
@@ -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[*]}"
 
index bcc7313d6fd4aafacfe7cb9cf3aac6d10eeefc1a..8ba327a3b11773f9e28db607716f0d877affcdbb 100755 (executable)
@@ -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