mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
test: add simple fstab credential test
This commit is contained in:
@@ -15,6 +15,7 @@ QEMU_CREDS=(
|
||||
"-smbios type=11,value=io.systemd.credential.binary:binarysmbioscredential=bWFnaWNiaW5hcnlkYXRh"
|
||||
"-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=="
|
||||
)
|
||||
QEMU_OPTIONS="${QEMU_OPTIONS:-} ${QEMU_CREDS[*]}"
|
||||
|
||||
|
||||
@@ -304,6 +304,10 @@ systemd-run -p DynamicUser=yes -p 'LoadCredential=os:/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"
|
||||
|
||||
# Check that the fstab credential logic worked
|
||||
test -d /injected
|
||||
grep -q /injected /proc/self/mountinfo
|
||||
fi
|
||||
|
||||
systemd-analyze log-level info
|
||||
|
||||
Reference in New Issue
Block a user