test: verify that the getty generator with creds works

This commit is contained in:
Lennart Poettering 2023-06-29 22:53:26 +02:00
parent fd2de366e1
commit 53888c3393
2 changed files with 4 additions and 0 deletions

View file

@ -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[*]}"

View file

@ -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