summaryrefslogtreecommitdiffstats
path: root/test/TEST-54-CREDS
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-03-31 22:18:19 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-04-04 16:17:38 +0200
commit8595f578fedb0fa7ee7ae06476aefa87aa094100 (patch)
tree705023a95c9a5e7fc9036e63a01f93cacdc7a53d /test/TEST-54-CREDS
parentdebug-generator: Drop unnecessary include (diff)
downloadsystemd-8595f578fedb0fa7ee7ae06476aefa87aa094100.tar.xz
systemd-8595f578fedb0fa7ee7ae06476aefa87aa094100.zip
debug-generator: Add unit and drop-in credentials
These allow adding extra units and drop-ins via credentials.
Diffstat (limited to 'test/TEST-54-CREDS')
-rwxr-xr-xtest/TEST-54-CREDS/test.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/TEST-54-CREDS/test.sh b/test/TEST-54-CREDS/test.sh
index c0a9d7a53d..afcb348166 100755
--- a/test/TEST-54-CREDS/test.sh
+++ b/test/TEST-54-CREDS/test.sh
@@ -9,6 +9,19 @@ NSPAWN_CREDS=(
)
NSPAWN_ARGUMENTS="${NSPAWN_ARGUMENTS:-} ${NSPAWN_CREDS[*]}"
+UNIT_CRED=$(base64 -w 0 <<EOF
+[Service]
+Type=oneshot
+ExecStart=touch /tmp/unit-cred
+EOF
+)
+DROPIN_CRED=$(base64 -w 0 <<EOF
+[Service]
+ExecStart=
+ExecStart=touch /tmp/unit-dropin
+EOF
+)
+
QEMU_CREDS=(
"-fw_cfg name=opt/io.systemd.credentials/myqemucredential,string=othervalue"
"-smbios type=11,value=io.systemd.credential:smbioscredential=magicdata"
@@ -17,6 +30,8 @@ QEMU_CREDS=(
"-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"
+ "-smbios type=11,value=io.systemd.credential.binary:systemd.extra-unit.my-service.service=$UNIT_CRED"
+ "-smbios type=11,value=io.systemd.credential.binary:systemd.unit-dropin.my-service.service=$DROPIN_CRED"
)
QEMU_OPTIONS="${QEMU_OPTIONS:-} ${QEMU_CREDS[*]}"