1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00
Commit Graph

2524 Commits

Author SHA1 Message Date
Frantisek Sumsal
c635058797 test: lvm 2.03.15 dropped the static autoactivation
so install the respective generator only if we're running with older
lvm versions.

See: https://sourceware.org/git/?p=lvm2.git;a=commit;h=ee8fb0310c53ed003a43b324c99cdfd891dd1a7c
(cherry picked from commit d10d562bd4)
2022-03-05 21:03:32 +00:00
Frantisek Sumsal
99d291eee9 test: accept both unpadded and padded partition sizes
Since util-linux/util-linux@921c7da55e
libfdisk aligns the last partition (on GPT) for optimal I/O. Let's
account for that.

Fixes: #22606
(cherry picked from commit d490188b8f)
2022-03-05 21:03:32 +00:00
Yu Watanabe
66411cea19 network: dhcp-pd: fix prefix length of address assigned to upstream interface
This effectively revert ab0c82d9f7.

I have no idea why I did that...

Fixes #22559.

(cherry picked from commit 38488babe7)
2022-02-22 21:47:38 +00:00
Luca Boccassi
e69b2a3a69 Partially revert "sd-dhcp-server: refuse too large packet to send"
This test fails on this branch:

 949/1228 fuzz-dhcp-server-relay-message_clusterfuzz-testcase-minimized-fuzz-dhcp-server-relay-message-4972399731277824_address,undefined FAIL           0.00s (exit status 127)12:43
--- command ---12:43
01:47:36 UBSAN_OPTIONS='print_stacktrace=1:print_summary=1:halt_on_error=1' /usr/bin/env /tmp/autopkgtest-lxc.cl7c6fs0/downtmp/build.X6Z/src/build-deb/fuzz-dhcp-server-relay-message:address,undefined /tmp/autopkgtest-lxc.cl7c6fs0/downtmp/build.X6Z/src/test/fuzz/fuzz-dhcp-server-relay-message/clusterfuzz-testcase-minimized-fuzz-dhcp-server-relay-message-497239973127782412:43
--- stderr ---12:43
/usr/bin/env: ‘/tmp/autopkgtest-lxc.cl7c6fs0/downtmp/build.X6Z/src/build-deb/fuzz-dhcp-server-relay-message:address,undefined’: No such file or directory

This partially reverts commit 76bcd1d6d2.
2022-02-15 14:17:47 +00:00
Luca Boccassi
2614461383 Revert "tests: add a file triggering a memory leak in dhcp_lease_parse_search_domains"
The test fails on this branch:

 948/1228 fuzz-dhcp-client_minimized-from-555a2b073b8d208655b68c294f8dfd592a11e50a_address,undefined                                      FAIL           0.00s (exit status 127)12:43
--- command ---12:43
01:47:36 UBSAN_OPTIONS='print_stacktrace=1:print_summary=1:halt_on_error=1' /usr/bin/env /tmp/autopkgtest-lxc.cl7c6fs0/downtmp/build.X6Z/src/build-deb/fuzz-dhcp-client:address,undefined /tmp/autopkgtest-lxc.cl7c6fs0/downtmp/build.X6Z/src/test/fuzz/fuzz-dhcp-client/minimized-from-555a2b073b8d208655b68c294f8dfd592a11e50a12:43
--- stderr ---12:43
/usr/bin/env: ‘/tmp/autopkgtest-lxc.cl7c6fs0/downtmp/build.X6Z/src/build-deb/fuzz-dhcp-client:address,undefined’: No such file or directory

This reverts commit 87728a590a.
2022-02-15 14:17:47 +00:00
Yu Watanabe
ab30fe12ed test-network: add missing tests for bridge properties
(cherry picked from commit b6d5dab7bb)
2022-02-14 22:03:45 +00:00
Luca Boccassi
cd740bdeaf core: do not attempt to add 'private' symlinks when RootImage/RootDirectory are used
A bind mount is added directly from private on the host to the actual
destination directory, no need for the symlinks (which cannot be created
as the bind mount happens first and creates the target as an actual directory)

Fixes https://github.com/systemd/systemd/issues/22264

(cherry picked from commit 3fa80e5e75)

Conflicts:
	test/units/testsuite-50.sh
2022-02-14 22:02:31 +00:00
Luca Boccassi
44c4116557 test: use mksquashfs -noappend
Makes the setup idempotent, as mksquashfs by default attempts to
append to an existing image

(cherry picked from commit 392d46d7a8)
2022-02-14 22:01:13 +00:00
Luca Boccassi
7784d3dde0 test: rename service used in TEST-29-PORTABLE to avoid conflict
There's an app0.service in the extension app0.raw, so don't use the same
name for a unit in minimal.raw

(cherry picked from commit d76f0de746)
2022-02-14 22:01:13 +00:00
Yu Watanabe
a5fc827b3a test-network: set xfrm interface ID
This also unifies two tests for xfrm, and checks the output of
'ip link' command.

Fixes #22329.

(cherry picked from commit 020483b248)
2022-02-14 21:58:16 +00:00
Evgeny Vereshchagin
ba335f6f40 tests: add a file triggering a memory leak in dhcp_lease_parse_search_domains
(cherry picked from commit 998ec39b1d)
2022-02-14 21:56:48 +00:00
Yu Watanabe
530a18d493 sd-dhcp-server: refuse too large packet to send
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44134.

(cherry picked from commit 71df50a973)
2022-02-14 21:56:48 +00:00
Luca Boccassi
76e23c1cbe test: store empty files rather than symlinks for test-fstab-generator
Dangling symlinks get pruned when packaging up the installation
directory. Just store empty files instead, and compare the names
rather than the content for .requires/.wants - the filename is
what is important anyway, the content is ignored.

Fixes #22059

(cherry picked from commit e683878c0f)
2022-01-09 21:26:13 +01:00
Yu Watanabe
7dbfdefca3 test: add test cases for fstab-generator
(cherry picked from commit 8cc8a073a8)
2022-01-07 16:03:06 +01:00
Yu Watanabe
c6e4d8d9bd meson: install test-network-generator-conversion.sh even if networkd is not enabled
Follow-up for 987dd89c77.

(cherry picked from commit b322e683ac)
2022-01-07 16:03:03 +01:00
Frantisek Sumsal
3af61b9224 test: use full date & time when checking for coredumps
Otherwise we might hit a window where the coredump happens before
midnight, but we check for it after midnight, which yields no results.

E.g.:

```
$ coredumpctl --no-legend --no-pager --file system.journal
Wed 2022-01-05 01:00:06 CET 359 0 0 SIGABRT journal /usr/bin/udevadm n/a
$ coredumpctl --since 23:59:55 --no-legend --no-pager --file system.journal
No coredumps found.
$ coredumpctl --since "2022-01-04 23:59:59" --no-legend --no-pager --file system.journal
Wed 2022-01-05 01:00:06 CET 359 0 0 SIGABRT journal /usr/bin/udevadm n/a
```

(cherry picked from commit 1b51599f29)
2022-01-07 15:53:20 +01:00
Yu Watanabe
d83bdf711e test-network: add testcase for invalid AllowedIPs=
(cherry picked from commit 14b451f20a)
2022-01-04 16:22:24 +01:00
Yu Watanabe
2a9efd8513 test: add testcases of symlinked drop-in directories
(cherry picked from commit cf6562e456)
2022-01-04 16:17:30 +01:00
Yu Watanabe
de27f4c8b8 test: wait for user inactive
The user may be busy when auto-rebalancing the user's home device.

Workaround for #21589.

---
Dec 01 15:03:15 H systemd-homework[1078]: Provided password unlocks user record.
Dec 01 15:03:15 H systemd-homework[1078]: Image file '/home/test-user.home' already locked, can't use.
Dec 01 15:03:15 H systemd-homed[240]: Worker reported error code EADDRINUSE.
Dec 01 15:03:15 H systemd-homed[240]: Activation failed: Address already in use
---
2021-12-22 17:30:10 +09:00
Yu Watanabe
a75a4148a8 test: remove test-user2
Otherwise, we cannot run the test multiple times.
2021-12-22 17:30:03 +09:00
Xiaotian Wu
646b01121a test: add LoongArch 64bit testcase 2021-12-22 11:07:56 +08:00
Frantisek Sumsal
8470a16d6f test: tweak TriggerLimitIntervalSec= if we're running w/o KVM as well
since in that case we might be also slow enough to miss the rate-limit
window. However, let's not set the trigger limit unconditionally to
still have coverage for the unaltered path unit (but without sacrificing
CI stability).

See: https://github.com/systemd/systemd/pull/21808#issuecomment-998927401
2021-12-22 08:56:20 +09:00
Frantisek Sumsal
2cb726adf5 test: tweak the path trigger limit a bit when collecting coverage
Basically the same thing as in e70103e, but for TEST-63. Uses
directives introduced by 47dba9f.

Follow-up to aaae822.
2021-12-20 22:05:14 +00:00
Yu Watanabe
71bb604807 test: add a test case for issue #21817 2021-12-21 00:28:39 +09:00
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