1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-31 21:18:09 +03:00
Commit Graph

4088 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
e071384dc5 Merge pull request #29296 from yuwata/sd-journal-several-cleanups-for-boot-id 2023-09-27 14:56:48 +02:00
Frantisek Sumsal
c1b129f4ad test: introduce TEST-09-REBOOT
To test stuff involving state preserved across (multiple) reboots, like
journal boot IDs.
2023-09-27 14:50:19 +02:00
Luca Boccassi
578840bdf9
Merge pull request #29296 from keszybz/make-cryptsetup-offical-and-add-docs
Make cryptsetup offical and add docs
2023-09-27 13:31:11 +01:00
Zbigniew Jędrzejewski-Szmek
ab68c6fb08 TEST-70: use new cryptsetup path 2023-09-26 17:03:26 +02:00
Lennart Poettering
0869e1326a oomd: correct listening sockets
So, unfortunately oomd uses "io.system." rather than "io.systemd." as
prefix for its sockets. This is a mistake, and doesn't match the
Varlink interface naming or anything else in oomd.

hence, let's fix that.

Given that this is an internal protocol between PID1 and oomd let's
simply change this without retaining compat.
2023-09-25 23:27:18 +02:00
Lennart Poettering
32295fa08f pcrphase: rename binary to pcrextend
The tool initially just measured the boot phase, but was subsequently
extended to measure file system and machine IDs, too. At AllSystemsGo
there were request to add more, and make the tool generically
accessible.

Hence, let's rename the binary (but not the pcrphase services), to make
clear the tool is not just measureing the boot phase, but a lot of other
things too.

The tool is located in /usr/lib/ and still relatively new, hence let's
just rename the binary and be done with it, while keeping the unit names
stable.

While we are at it, also move the tool out of src/boot/ and into its own
src/pcrextend/ dir, since it's not really doing boot related stuff
anymore.
2023-09-25 17:17:20 +02:00
Frantisek Sumsal
7f048f0ed0 test: enable debug logs for the user instances as well
To make debugging [0], hopefully, easier.

[0] https://github.com/systemd/systemd/issues/28504
2023-09-25 15:24:11 +01:00
Frantisek Sumsal
18c3ffbfcc test: wait for the swtpm socket to appear
On slower/overloaded systems it may take a bit for the swtpm socket
to show up:

I: Started swtpm as PID 189419 with state dir /tmp/tmp.pWqUutuGUj
I: Configured emulated TPM2 device tpm-spapr
+ tee /var/tmp/systemd-test-TEST-70-TPM2_1/console.log
+ timeout --foreground 1200 /bin/qemu-system-ppc64le -smp 4 ...
qemu-system-ppc64le: -chardev socket,id=chrtpm,path=/tmp/tmp.pWqUutuGUj/sock: Failed to connect to '/tmp/tmp.pWqUutuGUj/sock': No such file or directory
E: qemu failed with exit code 1

Spotted regularly in the ppc64le cron job and in some Ubuntu CI/CentOS CI
pr runs [0].

[0] https://github.com/systemd/systemd/pull/29183#issuecomment-1721727927
2023-09-23 11:32:12 +01:00
Frantisek Sumsal
3a89904e45 test: don't panic on soft lockups
We can't do anything about them anyway, and most importantly this seems
to alleviate systemd/systemd-centos-ci#660, which should make the CIs
a bit less angry (at least until the issue is addressed properly).
2023-09-23 14:19:55 +08:00
Mike Yuan
357d352cb6
Merge pull request #29179 from YHNdnzj/resume-offset-btrfs
btrfs-util: introduce btrfs_get_file_physical_offset_fd
2023-09-20 17:40:54 +08:00
Zbigniew Jędrzejewski-Szmek
c71404fdd2
Merge pull request #29122 from yuwata/network-allow-multiple-ipv6-null-addresses
network: allow multiple IPv6 null addresses
2023-09-19 16:13:42 +02:00
Mike Yuan
2b344ea808
test: introduce TEST-83-BTRFS
The Ubuntu CIs are deny-listed because the shipped
btrfs-progs is too old, i.e. doesn't support the
recently-added 'filesystem mkswapfile' command.
2023-09-19 21:45:27 +08:00
Lennart Poettering
60936158d1
Merge pull request #29159 from poettering/socket-pause
core: add new "PollLimit" settings to .socket units
2023-09-19 09:40:27 +02:00
Dan Streetman
948d460ea6 test: only load tpm_ibmvtpm kernel module on PowerPC hw
This module is only available on PPC hw, so avoid trying to load it elsewhere, as it generates a misleading error message in the logs:

modprobe: FATAL: Module tpm_ibmvtpm not found in directory /lib/modules/5.15.0-83-generic
2023-09-19 00:38:10 +01:00
Lennart Poettering
065e478a4a ci: add test for poll limit 2023-09-18 18:56:59 +02:00
Luca Boccassi
ba4d7e8029 meson: fix TODO regarding next meson version 2023-09-18 12:34:14 +01:00
Yu Watanabe
d5adff70c0 test-network: add test for multiple IPv6 null addresses
This also merges test_address_null() into test_address_static().
2023-09-18 10:22:08 +09:00
Luca Boccassi
413ef50af3 meson: add TODO to switch to new 'follow_symlinks' option in the future
Newly added and will be in the next release of Meson
2023-09-17 22:20:52 +02:00
Luca Boccassi
23bef849d9
Merge pull request #29119 from yuwata/network-dhcp-server-allow-null-server-address
network/dhcp-server: allow null server address
2023-09-17 12:36:33 +01:00
Luca Boccassi
e4aab5cf1a logind: add PrepareForShutdownWithMetadata signal
The existing signal doesn't say which type of shutdown is going to happen.
With the introduction of soft-reboot, it is useful to have this information
broadcasted, so that clients can choose to do different things based on the
reboot type.
Add a{sv} as the payload so that more metadata can be added later if
needed, without needing to add yet another signal.
Send both old and new signal for backward compatibility, and send the new
one first so that clients can just wait for the first one on both old and
new systems.
2023-09-11 12:56:00 +01:00
Yu Watanabe
47f1ce1677 test-network: add testcase for [DHCPServer] ServerAddress= with null address 2023-09-08 20:03:40 +09:00
Lennart Poettering
82b7bf8c1c
Merge pull request #28957 from yuwata/core-mount-set-dirty-on-umount
core/credential,mount: re-read /proc/self/mountinfo before invoking umount command
2023-09-07 11:54:52 +02:00
Zbigniew Jędrzejewski-Szmek
1c5d54b2df test: use 'until' instead of 'while !'
In general, it's better to avoid a negation. And "!" is special, because it is
used for history expansion, i.e. the same command would behave differently if
pasted on the command line.

Inspired by 4a899c5a23.
2023-09-06 19:54:29 +01:00
Yu Watanabe
25033cca08 test-execute: check credentials can be read on ExecStartPost= and friends
Prompted by
https://github.com/systemd/systemd/pull/28787#issuecomment-1690614202.
2023-09-07 00:53:28 +09:00
Yu Watanabe
73ff4d48de Revert "core: do not leak mount for credentials directory if mount namespace is enabled"
This reverts commits
- 9ae3624889
  "test-execute: add tests for credentials directory with mount namespace"↲
- 94fe4cf255
  "core: do not leak mount for credentials directory if mount namespace is enabled",
- 7241b9cd72
  "core/credential: make setup_credentials() return path to credentials directory",
- fbaf3b23ae
  "core: set $CREDENTIALS_DIRECTORY only when we set up credentials"

Before the commits, credentials directory set up on ExecStart= was kept
on e.g. ExecStop=. But, with the changes, if a service requests a
private mount namespace, the credentials directory is discarded after
ExecStart= is finished.

Let's revert the change, and find better way later.

Addresses the post-merge comment
https://github.com/systemd/systemd/pull/28787#issuecomment-1690614202.
2023-09-07 00:53:28 +09:00
Jan Janssen
592ee08f3b ci: Use add-apt-repository to enable sources
This should also ensure that consistent mirrors are selected.
2023-09-06 11:01:53 +02:00
Susant Sahani
681007ac20 test-network: Add test for PREF64 2023-09-06 15:53:11 +09:00
Luca Boccassi
3894b3f0c2
Merge pull request #29080 from mrc0mmand/test-tweaks
A couple of test tweaks for recent-ish CI fails
2023-09-05 19:44:52 +01:00
Zbigniew Jędrzejewski-Szmek
b86fe4ba7f
Merge pull request #29038 from keszybz/test-name-length-enforcement
Limit width of fuzz test names in meson output
2023-09-05 21:29:13 +03:00
Frantisek Sumsal
89562f08c9 test: create the "global" dropins in /run
So the test doesn't fail if run multiple times in a succession.
2023-09-05 15:55:52 +02:00
Frantisek Sumsal
04bf0452a5 test: set ncat's idle timeout as well
Otherwise we'll get stuck waiting indefinitely if the test socket unit
fails to fail due the trigger limit, i.e.:

[  111.104906] testsuite-07.sh[743]: + systemctl start issue2467.socket
[  OK  ] Listening on issue2467.socket.
[  111.746465] testsuite-07.sh[743]: + nc -w20 -U /run/test.ctl
         Starting systemd-tmpfiles-clean.service...
[  OK  ] Finished systemd-tmpfiles-clean.service.
qemu-system-x86_64: terminating on signal 15 from pid 565814 (timeout)
E: Test timed out after 1800s

With the idle timeout we should give up after 20 seconds, allowing the next
statement to properly fail:

[   34.233084] testsuite-07.sh[450]: + systemctl start issue2467.socket
[   35.475392] testsuite-07.sh[450]: + nc -i20 -w20 -U /run/test.ctl
[   56.122941] testsuite-07.sh[458]: Ncat: Idle timeout expired (20000 ms).
[   56.140871] testsuite-07.sh[450]: + :
[   56.145460] testsuite-07.sh[450]: + timeout 10 bash -c 'while ! [[ "$(systemctl show issue2467.socket -P ActiveState)" == failed ]]; do sleep .5; done'
[   66.197623] testsuite-07.sh[446]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/testsuite-07.issue-2467.sh failed'
2023-09-05 13:30:12 +02:00
Frantisek Sumsal
54bf13a46a test: bump the trigger limit interval when running w/o KVM
As we might be slow enough to miss the trigger limit. Spotted in a nightly
cron build on C8S.
2023-09-05 13:14:39 +02:00
Yu Watanabe
a832087979
Merge pull request #29023 from pelaufer/dhcp-prefix-dbus
Add dhcp client prefix lease information to networkd json output
2023-09-05 00:16:19 +09:00
Yu Watanabe
47d8770aac
Merge pull request #28896 from pelaufer/dhcp_dbus_notify
Add DHCP client state and change notification to networkd dbus interface
2023-09-04 21:48:43 +09:00
Luca Boccassi
626a9eba09
Merge pull request #28988 from keszybz/sd128-arbitrary-values
Add sd-id128 and systemd-id128 functionality to do "app specific" with any "base"
2023-09-03 14:05:32 +01:00
pelaufer
e1ef777192 Adding tests for dhcp client and dhcp6 client dbus state interface 2023-09-02 14:53:23 -06:00
pelaufer
8fb6320e4b Add dhcp client prefix lease information to networkd json output 2023-09-02 13:45:03 -06:00
Zbigniew Jędrzejewski-Szmek
37edb704f9 test: shorten sample names, drop numerical prefixes
We don't care about the ordering, so we may just as well drop the numerical
prefixes that we normally use for sorting. Also rename some other samples
to keep width of output down to reasonable width.
2023-09-02 17:32:19 +03:00
Zbigniew Jędrzejewski-Szmek
b37e8184a5 id128: allow combining --app with show
This effectively exposes sd_id128_get_app_specific() on the commandline.

Fixes https://github.com/systemd/systemd/issues/27514.
2023-09-02 14:17:29 +03:00
Yu Watanabe
1d4c874d3c
Merge pull request #24570 from topimiettinen/nft-sets-v2
network: firewall integration with NFT sets
2023-09-01 20:13:39 +09:00
Lennart Poettering
a4e941ee1f test: add test for new measurement log 2023-08-30 13:08:17 +02:00
Zbigniew Jędrzejewski-Szmek
782902f217 id128: add option -P to only show value
We have '-P' in systemctl with similar meaning.

Partially closes https://github.com/systemd/systemd/issues/27514.
2023-08-29 17:06:47 +03:00
Frantisek Sumsal
5599c84bcd test: fix debugging of nspawn tests
The pipe stuff introduced in 701e0c2660 causes nspawn to switch the
console from 'interactive' into 'read-only' which is a bit useless when
debugging. Let's set --console=interactive explicitly in such case.

Follow-up to 701e0c2660.
2023-08-29 01:08:08 +01:00
Mike Yuan
08a5bc4f48 Revert "Revert "test: add test case for systemd-update-utmp vs daemon-reexec""
This reverts commit 837773add4.

The original issue #27287 is fixed by #28123. Let's
reintroduce the test for systemd-update-utmp.
2023-08-28 17:43:57 +01:00
Topi Miettinen
c742d7e801
test: testing for networkd NFTSet feature 2023-08-26 21:37:35 +03:00
Yu Watanabe
927e20fa49 nspawn: check validity of the internal interface name only explicitly specified
Follow-up for 2f091b1b49.

Fixes #28844.
2023-08-24 15:55:32 +02:00
Susant Sahani
e448fcd01a test-network: re-add test for custom client identifier 2023-08-24 19:55:31 +09:00
Yu Watanabe
6ed69be98a Revert "network: DHCP6 client- Allow to send manual DUID"
This reverts commits 89e73ce86f and
543d2a4d45.

The commit assign "custom" to fixed DUID type 5. When making DUID fully
configurable, the type number should be also configurable. Also, the
fully custom DUID should be acceptable for DHCPv4.
2023-08-24 19:50:36 +09:00
Zbigniew Jędrzejewski-Szmek
c9c4e599fc
Merge pull request #24175 from medhefgo/meson-feature
meson: Use feature options
2023-08-24 11:19:55 +02:00
Frantisek Sumsal
9541addff0 test: use the correct file name when restoring the original fstab 2023-08-24 07:54:13 +00:00