summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-06-02 21:04:56 +0200
committerGitHub <noreply@github.com>2024-06-02 21:04:56 +0200
commit9619fdc102f1eda8e0a9d5a3ddc8c9d34bf79d26 (patch)
tree8dd9c5b6312088d3c4fb29e4a20547b779c43170
parentMerge pull request #33154 from yuwata/test-async (diff)
parenttest: Run end.sh when running integration tests with mkosi (diff)
downloadsystemd-9619fdc102f1eda8e0a9d5a3ddc8c9d34bf79d26.tar.xz
systemd-9619fdc102f1eda8e0a9d5a3ddc8c9d34bf79d26.zip
Merge pull request #33157 from DaanDeMeyer/end
test: Run end.sh when running integration tests with mkosi
-rw-r--r--src/shared/varlink-io.systemd.Hostname.c3
-rw-r--r--src/shared/varlink-io.systemd.PCRLock.c3
-rw-r--r--src/shared/varlink-io.systemd.Resolve.c2
-rw-r--r--test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service6
-rwxr-xr-xtest/integration-test-wrapper.py1
-rw-r--r--test/units/end.service1
-rwxr-xr-xtest/units/end.sh1
7 files changed, 9 insertions, 8 deletions
diff --git a/src/shared/varlink-io.systemd.Hostname.c b/src/shared/varlink-io.systemd.Hostname.c
index 78058a1b2e..a6c6aec2a8 100644
--- a/src/shared/varlink-io.systemd.Hostname.c
+++ b/src/shared/varlink-io.systemd.Hostname.c
@@ -30,7 +30,8 @@ static VARLINK_DEFINE_METHOD(
VARLINK_DEFINE_OUTPUT(FirmwareDate, VARLINK_INT, VARLINK_NULLABLE),
VARLINK_DEFINE_OUTPUT(MachineID, VARLINK_STRING, 0),
VARLINK_DEFINE_OUTPUT(BootID, VARLINK_STRING, 0),
- VARLINK_DEFINE_OUTPUT(ProductUUID, VARLINK_STRING, VARLINK_NULLABLE));
+ VARLINK_DEFINE_OUTPUT(ProductUUID, VARLINK_STRING, VARLINK_NULLABLE),
+ VARLINK_DEFINE_OUTPUT(VSockCID, VARLINK_INT, VARLINK_NULLABLE));
VARLINK_DEFINE_INTERFACE(
io_systemd_Hostname,
diff --git a/src/shared/varlink-io.systemd.PCRLock.c b/src/shared/varlink-io.systemd.PCRLock.c
index 32270eaf9b..22c653228c 100644
--- a/src/shared/varlink-io.systemd.PCRLock.c
+++ b/src/shared/varlink-io.systemd.PCRLock.c
@@ -3,7 +3,8 @@
#include "varlink-io.systemd.PCRLock.h"
static VARLINK_DEFINE_METHOD(
- ReadEventLog);
+ ReadEventLog,
+ VARLINK_DEFINE_OUTPUT(record, VARLINK_OBJECT, 0));
static VARLINK_DEFINE_METHOD(
MakePolicy,
diff --git a/src/shared/varlink-io.systemd.Resolve.c b/src/shared/varlink-io.systemd.Resolve.c
index a6c501ab01..71f4dc84c0 100644
--- a/src/shared/varlink-io.systemd.Resolve.c
+++ b/src/shared/varlink-io.systemd.Resolve.c
@@ -129,7 +129,7 @@ static VARLINK_DEFINE_METHOD(
static VARLINK_DEFINE_STRUCT_TYPE(
ResolvedRecord,
- VARLINK_DEFINE_FIELD(ifindex, VARLINK_INT, 0),
+ VARLINK_DEFINE_FIELD(ifindex, VARLINK_INT, VARLINK_NULLABLE),
VARLINK_DEFINE_FIELD_BY_TYPE(rr, ResourceRecord, VARLINK_NULLABLE),
VARLINK_DEFINE_FIELD(raw, VARLINK_STRING, 0));
diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service b/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service
index 9e4675808d..3be8ef5059 100644
--- a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service
+++ b/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service
@@ -18,7 +18,5 @@ StopWhenUnneeded=yes
[Service]
ExecStartPre=rm -f /failed /testok
-Type=exec
-TimeoutStartSec=infinity
-ExecStartPre=/usr/lib/systemd/tests/testdata/units/%N.sh
-ExecStart=true
+Type=oneshot
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
diff --git a/test/integration-test-wrapper.py b/test/integration-test-wrapper.py
index 5b098a3e01..0c9649301c 100755
--- a/test/integration-test-wrapper.py
+++ b/test/integration-test-wrapper.py
@@ -71,6 +71,7 @@ def main():
[Service]
StandardOutput=journal+console
+ ExecStart=/usr/lib/systemd/tests/testdata/units/end.sh
"""
)
diff --git a/test/units/end.service b/test/units/end.service
index 50a68b9dd4..5455a8f33b 100644
--- a/test/units/end.service
+++ b/test/units/end.service
@@ -3,6 +3,7 @@
Description=End the test
After=testsuite.target
OnFailure=poweroff.target
+OnSuccess=poweroff.target
OnFailureJobMode=replace-irreversibly
[Service]
diff --git a/test/units/end.sh b/test/units/end.sh
index cc1d7ee11e..a18c9473ea 100755
--- a/test/units/end.sh
+++ b/test/units/end.sh
@@ -13,5 +13,4 @@ set -o pipefail
(! journalctl -q -o short-monotonic --grep "[F]ailed to parse serialized line" >>/failed)
(! journalctl -q -o short-monotonic --grep "[F]ailed to (de)?serialize \w+" >>/failed)
-systemctl poweroff --no-block
exit 0