diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:45 +0000 |
commit | efeb864cb547a2cbf96dc0053a8bdb4d9190b364 (patch) | |
tree | c0b83368f18be983fcc763200c4c24d633244588 /test/TEST-54-CREDS | |
parent | Releasing progress-linux version 255.5-1~progress7.99u1. (diff) | |
download | systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.tar.xz systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.zip |
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | test/TEST-54-CREDS/meson.build | 31 | ||||
-rw-r--r-- | test/TEST-54-CREDS/systemd.extra-unit.my-service.service (renamed from test/units/testsuite-69.service) | 4 | ||||
-rw-r--r-- | test/TEST-54-CREDS/systemd.unit-dropin.my-service.service | 4 | ||||
-rw-r--r-- | test/TEST-54-CREDS/systemd.unit-dropin.my-service.service~30-named.service | 4 | ||||
-rwxr-xr-x | test/TEST-54-CREDS/test.sh | 20 |
5 files changed, 60 insertions, 3 deletions
diff --git a/test/TEST-54-CREDS/meson.build b/test/TEST-54-CREDS/meson.build new file mode 100644 index 0000000..8edb043 --- /dev/null +++ b/test/TEST-54-CREDS/meson.build @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +integration_tests += [ + integration_test_template + { + 'name' : fs.name(meson.current_source_dir()), + 'cmdline' : integration_test_template['cmdline'] + [ + 'systemd.set_credential=kernelcmdlinecred:uff', + 'systemd.set_credential=sysctl.extra:kernel.domainname=sysctltest', + 'systemd.set_credential=login.motd:hello', + 'systemd.set_credential=login.issue:welcome', + 'systemd.set_credential_binary=waldi:d29vb29mZmZ3dWZmZnd1ZmYK', + 'rd.systemd.import_credentials=no', + 'rd.systemd.wants=initrdcred.service', + ], + 'credentials' : integration_test_template['credentials'] + [ + 'mynspawncredential=strangevalue', + files('systemd.extra-unit.my-service.service'), + files('systemd.unit-dropin.my-service.service'), + files('systemd.unit-dropin.my-service.service~30-named.service'), + ], + 'qemu-args' : integration_test_template['qemu-args'] + [ + '-fw_cfg', 'name=opt/io.systemd.credentials/myqemucredential,string=othervalue', + '-smbios', 'type=11,value=io.systemd.credential:smbioscredential=magicdata', + '-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==', + '-smbios', 'type=11,value=io.systemd.credential:getty.ttys.container=idontexist', + ], + }, +] diff --git a/test/units/testsuite-69.service b/test/TEST-54-CREDS/systemd.extra-unit.my-service.service index 7aa0664..e29d0ee 100644 --- a/test/units/testsuite-69.service +++ b/test/TEST-54-CREDS/systemd.extra-unit.my-service.service @@ -1,7 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -[Unit] -Description=TEST-69-SHUTDOWN [Service] Type=oneshot -ExecStart=/bin/true +ExecStart=touch /tmp/unit-cred diff --git a/test/TEST-54-CREDS/systemd.unit-dropin.my-service.service b/test/TEST-54-CREDS/systemd.unit-dropin.my-service.service new file mode 100644 index 0000000..279a941 --- /dev/null +++ b/test/TEST-54-CREDS/systemd.unit-dropin.my-service.service @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Service] +ExecStart=touch /tmp/unit-dropin diff --git a/test/TEST-54-CREDS/systemd.unit-dropin.my-service.service~30-named.service b/test/TEST-54-CREDS/systemd.unit-dropin.my-service.service~30-named.service new file mode 100644 index 0000000..67d87ca --- /dev/null +++ b/test/TEST-54-CREDS/systemd.unit-dropin.my-service.service~30-named.service @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Service] +ExecStart=touch /tmp/unit-named-dropin diff --git a/test/TEST-54-CREDS/test.sh b/test/TEST-54-CREDS/test.sh index c0a9d7a..99c44e3 100755 --- a/test/TEST-54-CREDS/test.sh +++ b/test/TEST-54-CREDS/test.sh @@ -9,6 +9,23 @@ 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=touch /tmp/unit-dropin +EOF +) +NAMED_DROPIN_CRED=$(base64 -w 0 <<EOF +[Service] +ExecStart=touch /tmp/unit-named-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 +34,9 @@ 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" + "-smbios type=11,value=io.systemd.credential.binary:systemd.unit-dropin.my-service.service~30-named=$NAMED_DROPIN_CRED" ) QEMU_OPTIONS="${QEMU_OPTIONS:-} ${QEMU_CREDS[*]}" |