Commit graph

2500 commits

Author SHA1 Message Date
Yu Watanabe 92ecc87512 test: install losetup by default
Preparation for the next commit.
2021-12-20 23:34:27 +09:00
Daan De Meyer 73b3314bfd
Merge pull request #21818 from bluca/path_trigger_limit
path unit: add TriggerLimitBurst= and TriggerLimitIntervalSec=
2021-12-19 12:42:11 +01:00
Yu Watanabe ecb0be874d
Merge pull request #21814 from yuwata/network-dhcp-pd-fixes
network: several fixes for DHCP prefix delegation
2021-12-19 08:52:08 +09:00
Luca Boccassi 47dba9fb09 path unit: add TriggerLimitBurst= and TriggerLimitIntervalSec=
Given there's now a default for these settings, also allow users to configure
them, matching socket units
2021-12-18 23:17:53 +00:00
Daan De Meyer aaae822b37 core: Add trigger limit for path units
When conditions fail on a service unit, a path unit can cause
PID 1 to busy loop as it keeps trying to activate the service unit.
To avoid this from happening, add a trigger limit to the path unit,
identical to the trigger limit we have for socket units.

Initially, let's start with a high limit and not make it configurable.
If needed, we can add properties to configure the rate limit similar
to the ones we have for socket units.
2021-12-18 11:26:25 +01:00
Yu Watanabe 6a936c9c9a test-network: add tests for renewing/rebinding lease 2021-12-18 10:09:07 +09:00
Yu Watanabe 2616b5285f test-network: introduce dump_dnsmasq_log_file() 2021-12-18 10:09:07 +09:00
Yu Watanabe 4862fb693d test-network: use dnsmasq for testing DHCP4-6RD 2021-12-18 10:09:07 +09:00
Yu Watanabe f56af3b4c8 test-network: use --bind-interfaces option for dnsmasq
Also make the interface name and router address configurable.
2021-12-18 10:09:07 +09:00
Yu Watanabe fe87807eaa network: dhcp-pd: do not stack 6rd sit tunnel 2021-12-18 10:09:07 +09:00
Daan De Meyer 40f41f34d4 Revert "core: Propagate condition failed state to triggering units."
This reverts commit 12ab94a1e4.
2021-12-17 19:39:29 +01:00
Anita Zhang 415d7d774a test: adjust MemoryHigh= on oomd extended test units
On some runs `sleep infinity` run by the user manager uses over 3M of
memory, which is higher than the MemoryHigh= set on testbloat and
testmunch. If no pgscan is generated, then systemd-oomd sorts by memory
usage which leads to a situation where testchill (using 3M) could be
targeted over testbloat (1M-2M).

Fix this by setting reasonable MemoryHigh= values for all of these test
units. Even if somehow testchill throttles a bit at 3M, testbloat and
testmunch should still be trying to use over 100M at memory and will
throttle down to 5M and 6M with the new values. This should reflect
the desired state in pgscan and memory usage during the test run.

Fixes #21684
2021-12-17 16:27:58 +00:00
Michael Biebl 5c18815dc0 test: mark TEST-46-HOMED as skipped if feature is disabled
See https://github.com/systemd/systemd/pull/21253#issuecomment-995721856
2021-12-16 21:41:49 +00:00
Michael Biebl 85e3a3a832 test: record missing openssl as a failure
The openssl binary is an optional dependency.
If systemd has been built with OpenSSL support, we want to test its
OpenSSL functionality.
So record a failure message in /failed if the binary is missing.

See https://github.com/systemd/systemd/pull/21724#issuecomment-992707614
2021-12-16 21:18:38 +00:00
Yu Watanabe 75e1378c0d
Merge pull request #21736 from yuwata/network-cleanups-for-drop-foreign-configs
network: cleanups for dropping foreign configs
2021-12-17 04:07:00 +09:00
Yu Watanabe 2347b6b94e test-network: wait for veth99 being configured
As the address, which should be kept, may not be just removed yet.
Let's check that the address is actually kept.
2021-12-17 00:14:30 +09:00
Frantisek Sumsal bd1660c4fa test: bump the timeout when collecting test coverage 2021-12-16 12:05:01 +01:00
Frantisek Sumsal 7b3a1af063 test: settle before checking logs
Otherwise we might miss the "Device path too long" message:

```
[   21.083274] testsuite-64.sh[374]: swapoff /dev/vda1
[   21.089841] testsuite-64.sh[376]: ++ mktemp
[   21.095115] testsuite-64.sh[271]: + logfile=/tmp/tmp.a1MULA35wL
[   21.095115] testsuite-64.sh[271]: + journalctl -b -q --no-pager -o short-monotonic -p info --grep 'Device path.*vda.?'\'' too long to fit into unit name'
...
[   21.277360] systemd[1]: testsuite-64.service: Main process exited, code=exited, status=1/FAILURE
[   21.277508] systemd[1]: testsuite-64.service: Failed with result 'exit-code'.
...
[   21.323500] systemd[1]: Device path '/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/0000:0a:00.0/0000:0b:00.0/0000:0c:00.0/0000:0d:00.0/0000:0e:00.0/0000:0f:00.0/0000:10:00.0/0000:11:00.0/0000:12:00.0/0000:13:00.0/0000:14:00.0/0000:15:00.0/0000:16:00.0/0000:17:00.0/0000:18:00.0/0000:19:00.0/0000:1a:00.0/virtio0/block/vda/vda1' too long to fit into unit name, ignoring device.

```
2021-12-16 11:59:09 +01:00
Luca Boccassi 109a157cea test: bump timeout for TEST-50-DISSECT and TEST-67-INTEGRITY
TEST-67-INTEGRITY times out quite often, and when it passes
it does so a few seconds short of the timeout. It's a slow
qemu test, so bump the timeout.
TEST-50-DISSECT has been reported to fail in the same way
on Debian's infrastructure, again narrowly failing or passing
just short of the timeout.
2021-12-13 09:29:47 +01:00
Zbigniew Jędrzejewski-Szmek 6d7bc744ce
Merge pull request #21614 from medhefgo/boot-bcd
boot: Add BCD store parser
2021-12-12 09:18:26 +01:00
Jan Janssen d2a58f0edb meson: Drop meson version compare for fuzz test
We are depending on meson >= 0.53.2 now, so this check can be dropped.
2021-12-12 11:51:03 +09:00
Jan Janssen db7f5ab68f test: Add BCD unit test 2021-12-11 21:32:29 +01:00
Yu Watanabe 60055fd176 test: add missing section for Description= 2021-12-11 11:55:03 +09:00
Yu Watanabe c18f18745b test: fix grepping fixed string starts from hyphen
Follow-up for 85445fba22.

Fixes #21718.
2021-12-11 11:54:24 +09:00
Zbigniew Jędrzejewski-Szmek 40676ce6f8
Merge pull request #21722 from yuwata/bpf-framework
build: include BPF_FRAMEWORK in version string
2021-12-10 17:18:24 +01:00
Frantisek Sumsal f4ec527492
Merge pull request #21708 from mrc0mmand/mkosi-ci-improvements
ci: check for failed services after boot
2021-12-10 13:50:55 +00:00
Yu Watanabe d1dfedcf85 test: addresses shell check warning
This fixes the following warning:
-----
In /github/workspace/test/units/testsuite-62.sh line 39:
KERNEL_MINOR="${KERNEL_VERSION#$KERNEL_MAJOR.}"
                               ^-----------^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean:
KERNEL_MINOR="${KERNEL_VERSION#"$KERNEL_MAJOR".}"
2021-12-10 20:07:38 +09:00
Yu Watanabe 85445fba22 test: skip TEST-62 if bpf-framework is not supported
Fixes #21718.
2021-12-10 19:54:33 +09:00
Frantisek Sumsal 24acd4064e ci: check for failed services after boot
This should, hopefully, catch issues like systemd/systemd#21671
automagically.
2021-12-10 10:25:43 +01:00
Luca Boccassi 082c676165 meson: exclude .gitattributes when using install_subdir
It picks the whole content of the directory by default, but we don't
want to install .gitattributes files. Add it to all invocations, not
just the ones on subdirs with .gitattributes, so that we don't regress
in the future.

Fixes #21715
2021-12-10 07:30:58 +01:00
Yu Watanabe 42592d0ad4 test-network: support the case that the default config files are not installed yet 2021-12-07 20:33:20 +09:00
Yu Watanabe 84cc85f983 test-network: add test for 6rd 2021-12-07 20:33:20 +09:00
Yu Watanabe e49bad0179 network: dhcp-pd: add 6rd support
Closes #19152.
2021-12-07 20:33:16 +09:00
Yu Watanabe a27588d4e7 network: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]
This just changes the names of settings, variables, functions, files, and so on.
No functionality is changed.

Preparation for supporting 6rd.
2021-12-07 20:30:30 +09:00
Yu Watanabe 5ed057b67b
Merge pull request #21653 from yuwata/network-dhcp6pd-unreachable-route-cleanups
network: dhcp6pd: cleanups for unreachable route
2021-12-07 20:28:18 +09:00
Yu Watanabe ab0c82d9f7 network: dhcp6pd: assign addresses in the delegated prefix instead of a subnet prefix /64 on upstream interface 2021-12-07 19:46:37 +09:00
Yu Watanabe 2d00239cbe network: dhcp6pd: always use main route table for unreachable route
This mostly reverts e47bcb7d0b.
2021-12-07 18:35:30 +09:00
Yu Watanabe 45aa0e841b network,udev: do not adjust local assignment bit of specified MAC address
People often assigns the MAC address of the enslaved interface to e.g.
bridge interface. So, the local assignment bit should not be adjusted.

Fixes #21649.
2021-12-07 15:01:04 +09:00
Franck Bui 051ea718f2 TEST-10: don't attempt to write a byte to the socket
Writing a byte to test10.socket is actually the root cause of issue #19154:
depending on the timing, it's possible that PID1 closes the socket before socat
(or nc, it doesn't matter which tool is actually used) tries to write that one
byte to the socket. In this case writing to the socket returns EPIPE, which
causes socat to exit(1) and subsequently make the test fail.

Since we're only interested in connecting to the socket and triggering the rate
limit of the socket, this patch removes the parts that write the single byte to
the socket, which should remove the race for good.

Since it shouldn't matter whether the test uses socat or nc, let's switch back
to nc and hence remove the sole user of socat. The exit status of nc is however
ignored because some versions might choke when the socket is closed
unexpectedly.
2021-12-07 08:29:09 +09:00
Yu Watanabe 24888c0b19
Merge pull request #21630 from yuwata/test-network-cleanups
test-network: trivial cleanups
2021-12-06 21:24:26 +09:00
Zbigniew Jędrzejewski-Szmek ec1574cd8e
Merge pull request #21454 from bluca/inspect_elf
analyze: add inspect-elf verb to parse package metadata
2021-12-06 12:45:25 +01:00
Joris Hartog 5ef599b324 systemctl: support JSON output for "show-environment"
This commit adds a function which converts a bus message containing the
environment variables to a JSON object and uses this function to support
JSON formatted output for the "systemctl show-environment" command.

Fixes #21348
2021-12-06 11:40:52 +01:00
Yu Watanabe 133f65ef2c test-network: start dhcpd after address is assigned 2021-12-06 19:18:55 +09:00
Yu Watanabe 5f7f1f824f test-network: make start_isc_dhcpd() take IP version 2021-12-06 19:18:55 +09:00
Yu Watanabe 72e65e6ffd network: add support to configure IPoIB interfaces 2021-12-05 00:18:58 +09:00
Yu Watanabe b90d0f83b2 network/netdev: add support to create IPoIB subinterface 2021-12-04 15:06:58 +09:00
Yu Watanabe bf1e65a4fd
Merge pull request #21585 from yuwata/network-radv-uplink-interface-auto-with-dhcp6-pd
network: cleanups for uplink interface handling for RADV and DHCP6-PD
2021-12-02 08:16:23 +09:00
Luca Boccassi cb94244406 test: run commands with debug level logs in TEST-65-ANALYZE 2021-12-01 12:06:36 +00:00
Yu Watanabe 6016f1cfbb test-network: re-arrange DHCP6-PD subnet IDs to test searching free subnet ID 2021-12-01 20:35:03 +09:00
Yu Watanabe 6c8d6bdd40 test-network: add testcases for uplink interface detection for RADV with DHCPv6-PD 2021-12-01 20:35:03 +09:00