1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00
Commit Graph

18 Commits

Author SHA1 Message Date
Ivan Kruglov
1e2cd07394 machine: tests for io.systemd.Machine.Open 2024-11-06 11:58:51 +01:00
Ivan Kruglov
b50fe8a0d9 machine: remove redundant --more in TEST-13-NSPAWN.machined 2024-11-01 15:30:39 +01:00
Ivan Kruglov
0c16936acc machine: tests for io.systemd.MachineImage.{Clone, Remove} methods 2024-11-01 15:30:39 +01:00
Yu Watanabe
b1e11a252d TEST-13-NSPAWN: add test cases for listing multiple machines 2024-10-31 11:02:23 +09:00
Yu Watanabe
f0fdefc045 TEST-13-NSPAWN: trivially kill all processes in the container on termination
Follow-up for 841988f80d.

No functional change, as $PID is 0 when the trap is inserted.
2024-10-31 10:59:14 +09:00
Yu Watanabe
1856ab4503 TEST-13-NSPAWN: check returned machine list 2024-10-31 10:59:14 +09:00
Yu Watanabe
e79b58c825 TEST-13-NSPAWN: fix race between container exit and varlink call
Follow-up for 3cb72c7862.

The test container exits shortly, hence when varlinkctl is called, the
container may be already terminated. Let's make the container live
infinitely.
Also, this makes the os-release files removed after the container is started.
2024-10-31 10:59:14 +09:00
Ivan Kruglov
3cb72c7862 machine: add tests for Addresses/OSRelease/UIDShift fields in io.systemd.Machine.List output 2024-10-21 17:42:37 +02:00
Ivan Kruglov
9de215219c machine: use AcquireMetadata in io.systemd.MachineImage.List method 2024-10-21 17:42:37 +02:00
Yu Watanabe
7a3ee9217e machine: add MachineImage interface
Follow-up for fb0ea6a6a3.
Fixes #34772.
2024-10-15 20:44:13 +09:00
Lennart Poettering
6f9826b6d8
Merge pull request #34723 from poettering/machined-pidref-more
machined: switch remaining Varlink overs over to use json_dispatch_pidref() and friends
2024-10-15 11:37:39 +02:00
Yu Watanabe
1f021ce3d1 TEST-13-NSPAWN: several cleanups
- suppress unnecessary error messages, especially in loop and at_exit(),
- ensure the container service is stopped before restarting,
- do not send KILL signal, as garbages will remain, and disturb the next
  invocation,
- drop unnecessary workaround of trying machine twice.
2024-10-15 16:16:25 +09:00
Yu Watanabe
d2c1451b73 machine: lookup_machine_by_name_or_pid() may return 1 on error and it is already replied
Follow-ups for 1bd979dddb and later
commits.

Fixes #34764.
2024-10-15 14:24:58 +09:00
Yu Watanabe
841988f80d TEST-13-NSPAWN: add test for 'machinectl terminate'
This also fixes the test for io.systemd.Machine.Terminate.

When systemd-nspawn@.service receives stop signal, then systemd-nspawn
sends SIGRTMIN+3 to the container, which was previously ignored by the
custom init script used by the container.
Let's introduce another trap for the signal, and correctly handle it.

Follow-up for 164af66f9a.
2024-10-15 05:58:25 +09:00
Lennart Poettering
6bca1a7c6c machined: port all varlink APIs over to new PidRef serialization 2024-10-14 12:47:17 +02:00
Ivan Kruglov
62593c6abb machine: tests for varlink interfaces
- io.systemd.MachineImage.List
- io.systemd.MachineImage.Update
2024-10-14 11:09:18 +02:00
Lennart Poettering
0fc530d157 machined: make List() varlink method return a full pidref JSON object for leader
This new call has not been released yet, hence we can still change the
encoding of the "leader" field.
2024-10-11 10:48:07 +02:00
Ivan Kruglov
164af66f9a machine: tests for varlink interfaces
- io.systemd.Machine.List
- io.systemd.Machine.Kill
- io.systemd.Machine.Terminate
- io.systemd.Machine.Register
- io.systemd.Machine.Unregister
2024-10-07 14:50:17 +02:00