1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

3862 Commits

Author SHA1 Message Date
Luca Boccassi
0b1e55a616
Merge pull request #28109 from mrc0mmand/more-journal-shenanigans
test: cover a couple of missed code paths in journalctl/journald
2023-06-22 00:46:06 +01:00
Daan De Meyer
33885343cf
Merge pull request #27942 from DaanDeMeyer/root-ephemeral
core: Add RootEphemeral= setting
2023-06-21 17:24:39 +02:00
Frantisek Sumsal
51a05be9a2 test: cover a couple of missed code paths in journalctl/journald 2023-06-21 17:08:55 +02:00
Daan De Meyer
cdad1f1407 test: Add RootEphemeral= integration test 2023-06-21 12:48:48 +02:00
Daan De Meyer
d110169b65 test: Add touch into minimal verity test image 2023-06-21 12:48:48 +02:00
Daan De Meyer
9c0c670125 core: Add RootEphemeral= setting
This setting allows services to run in an ephemeral copy of the root
directory or root image. To make sure the ephemeral copies are always
cleaned up, we add a tmpfiles snippet to unconditionally clean up
/var/lib/systemd/ephemeral. To prevent in use ephemeral copies from
being cleaned up by tmpfiles, we use the newly added COPY_LOCK_BSD
and BTRFS_SNAPSHOT_LOCK_BSD flags to take a BSD lock on the ephemeral
copies which instruct tmpfiles to not touch those ephemeral copies as
long as the BSD lock is held.
2023-06-21 12:48:46 +02:00
Luca Boccassi
01a6510a62
Merge pull request #28082 from mrc0mmand/more-journal-remote-tests
test: add a couple of tests for systemd-journal-{remote,upload}
2023-06-20 23:38:24 +01:00
Frantisek Sumsal
e43e60992e test: add a couple of tests for systemd-journal-{remote,upload} 2023-06-20 15:31:22 +02:00
Lennart Poettering
7dad6de158 hostnamed: when parsing day/month of firmware date, force decimal parsing
safe_atou() by default determines the base from the prefix 0x, 0b, 0o
and for compat with just 0 for octal. This is not what we want here,
since the date components are padded with zeroes yet still decimal.
Hence force decimal parsing (and while we are at it, prohibit a couple
of unexpected decorations).

WIthout this we'd fail to parse any the 8th and 9th day of each months, as
well aus aug and september of every year, because these look like octal
numbers but cannot actually parsed as such.

Let's change the testcase to check for a date that exposes this
bheaviour.
2023-06-20 15:18:58 +02:00
Lennart Poettering
e7932afe1b hostnamed: don't read DMI data within a container
If we run in a container we should show info about the container, not
the host.
2023-06-20 15:04:31 +02:00
Frantisek Sumsal
3f38d582d5 test: cover systemd-journal-remote --url=... 2023-06-19 23:42:00 +02:00
Frantisek Sumsal
033601b79a test: wrap curl when running with ASan
Necessary (unfortunately) for curl on C8S.
2023-06-19 10:19:44 +02:00
Frantisek Sumsal
52db3601bd test: extend the DynamicUser=yes coverage workaround to a couple more services 2023-06-18 23:08:24 +02:00
Luca Boccassi
55e1ff26a5
Merge pull request #28060 from mrc0mmand/remote-journal-tests
test: add a couple of tests for systemd-journal-gatewayd
2023-06-17 11:34:50 +01:00
Luca Boccassi
6acbb3f2fb TEST-55-OOMD: improve ephemeral configuration readability 2023-06-17 00:08:09 +01:00
Luca Boccassi
565b13f8b2 TEST-55-OOMD: use /run/ for configuration instead of /etc/
Make sure configuration is ephemeral if the image is reused
2023-06-17 00:08:09 +01:00
Frantisek Sumsal
1d252ea2ae test: add a couple of tests for systemd-journal-gatewayd 2023-06-16 20:42:43 +02:00
Kiran Vemula
5ed91481ab resolved: added serve stale feature implementation of RFC 8767
serve stale feature to keep the DNS resource records beyond TTL to return them as stale records in case of upstream server is not reachable or returns negative response.
SD_RESOLVED_NO_STALE flag has been added to disable serving stale records via dbus.
added serve stale test cases to TEST-75-RESOLVED
Fixes: #21815
2023-06-16 10:20:15 +01:00
Luca Boccassi
f03b74cb53
Merge pull request #23391 from yuwata/meson-bump-required-version
meson: bump required version
2023-06-16 10:13:44 +01:00
Frantisek Sumsal
e46b313a62 test: clean up the new test case a bit
Follow-up to 61cecfa0d8.
2023-06-16 09:56:32 +02:00
zhmylove
61cecfa0d8 journalctl: add --truncate-newline option 2023-06-16 09:31:47 +02:00
Yu Watanabe
5063f027ef networkd-test.py: disable global DNS= setting
Otherwise, queries may be passed to unexpected DNS servers.
2023-06-16 10:57:51 +09:00
Yu Watanabe
55f9d72a5d networkd-test.py: do not query IPv6 address
From changelog of dnsmasq v2.87:
====
Note in manpage the change in behaviour of -address. This behaviour
actually changed in v2.86, but was undocumented there. From 2.86 on,
(eg) --address=/example.com/1.2.3.4 ONLY applies to A queries. All other
types of query will be sent upstream. Pre 2.86, that would catch the
whole example.com domain and queries for other types would get
a local NODATA answer. The pre-2.86 behaviour is still available,
by configuring --address=/example.com/1.2.3.4 --local=/example.com/
====
2023-06-16 10:44:16 +09:00
Yu Watanabe
77725adedd networkd-test.py: replace deprecated option IPv6AcceptRouterAdvertisements=
Also, use 'yes' or 'no' for boolean options.
2023-06-16 10:43:06 +09:00
Yu Watanabe
eeb88ea41d networkd-test.py: show more debugging logs on failure 2023-06-16 10:43:06 +09:00
Yu Watanabe
0b01cac59a meson: drop non-existent test directories 2023-06-16 10:43:06 +09:00
Frantisek Sumsal
9a27ef092e tree-wide: fix a couple of typos
As reported by Fossies.org.
2023-06-15 20:52:45 +02:00
Frantisek Sumsal
3bba91ef44 test: set $PATH to something predictable in the ASan wrapper
This is still necessary when running with clang's ASan, as it uses an
external binary to symbolize the stack traces.

Follow-up to ba79e8c2cc.
2023-06-15 14:53:32 +01:00
Henrik Holst
cf4dbd84ac
network: make degraded-carrier bond/bridge as routable (#27776)
This makes a bond or bridge interface in the degraded-carrier state but has a routable address
handled as routable operational state.

If the carrier is degraded but the address state is routable then the operational state should be
seen as routable and not degraded because that may be the case for bonds if some of the links are down,
but when that happens the bond as whole is still routable.

This also makes operational state to degraded if address state is degraded even if the link state is
degraded-carrier.

Fixes #22713.
2023-06-15 13:32:10 +09:00
Luca Boccassi
4dad6101fd
Merge pull request #28038 from mrc0mmand/cleanups
A couple of cleanups
2023-06-14 23:18:04 +01:00
Frantisek Sumsal
9457dd8bae test: split TEST-04 into smaller chunks 2023-06-14 20:28:20 +02:00
Frantisek Sumsal
0ea6e6a526 test: exit on first failing subtest
Let's take a step back and revert back to the original behavior where we
exit on a first failing subtest. The current behavior makes fishing out the
failing test details quite unpleasant, and in certain situations the
journal may even be rotated away so we end up with no actionable logs.
2023-06-14 20:28:20 +02:00
Jan Janssen
739a62bb40 meson: Use fs module in more places 2023-06-14 16:05:52 +02:00
Frantisek Sumsal
fb310ba9eb test: re-enable TEST-02 on ppc64le 2023-06-13 10:15:27 +02:00
Frantisek Sumsal
f087837c46 test: make sure ping works for unprivileged users 2023-06-13 10:15:27 +02:00
Frantisek Sumsal
a6695a431f test: copy file xattrs (if any) as well 2023-06-13 10:15:27 +02:00
Frantisek Sumsal
bdee55672a test: merge TEST-61-UNITTESTS-QEMU with TEST-02-UNITTESTS
The test was originally introduced for Ubuntu CI, as it uses
PREFER_NSPAWN=1, but it was subsequently disabled two years ago [0], so
it was pretty much useless. Let's merge it into TEST-02 and tweak it a
bit to run only certain tests under QEMU when $TEST_PREFER_NSPAWN is
set.

[0] b152adbfa9
2023-06-13 10:15:27 +02:00
Frantisek Sumsal
d5a937a62a proc-cmdline: parse the whole /proc/cmdline
The kernel command line may contain newlines which kernel happily
accepts, but we'd ignore everything past the first newline. Let's fix
that by replacing read_one_line_file() with read_full_file().
2023-06-13 09:54:02 +02:00
Frantisek Sumsal
581427bd65 test: make coverage runs happy again 2023-06-11 12:29:59 +01:00
Luca Boccassi
71588cb6ad test-execute: add unit tests for *DirectorySymlink= 2023-06-08 23:11:42 +01:00
Luca Boccassi
4021e9e3e9
Merge pull request #26059 from DaanDeMeyer/cred-glob
creds: Add ImportCredential=
2023-06-08 20:40:37 +01:00
Daan De Meyer
bbfb25f4b9 creds: Add ImportCredential=
ImportCredential= takes a credential name and searches for a matching
credential in all the credential stores we know about it. It supports
globs which are expanded so that all matching credentials are loaded.
2023-06-08 14:09:18 +02:00
Luca Boccassi
bd65ee34ae
Merge pull request #27958 from mrc0mmand/test-functions-tweaks
test: a couple of assorted test-functions tweaks
2023-06-07 21:54:01 +01:00
Frantisek Sumsal
8e81885531 test: wrap agetty & getfacl when running with sanitizers
The list is getting slightly ridiculous.
2023-06-07 16:26:21 +02:00
Frantisek Sumsal
93b896e90e test: drop $SKIP_INITRD
It's pointless nowadays, since we always need an initrd for the test VMs
as we require modules that are usually not compiled in the kernel.
2023-06-07 15:23:36 +02:00
Frantisek Sumsal
25bc469727 test: rebuild the ldconfig cache after changing its configuration
Follow-up to ba79e8c2cc.
2023-06-07 15:19:44 +02:00
Lennart Poettering
1775872679 units: change TimeoutSec=0 to TimeoutSec=infinity
Follow-up for #27936

Let's also update a bunch of static unit files, matching what we just
did for the generators.
2023-06-06 18:23:43 +01:00
Lennart Poettering
a9b837aa34 generators: change TimeoutSec=0 to TimeoutSec=infinity
With these settings we intend to turn off timeouts for possibly
interactive/slow commands. The officially documented way to turn off the
time-outs is to setting them to infinity. So far we set them to zero
here though.

This lead to some confusiong, for example #18224. Let's fix this by
uniformly spelling out TimeoutSec=infinity.

This doesn't change behaviour. It just makes our generated files match
what we document, without relying on historic compat support.

Fixes: #18224
2023-06-06 12:38:16 +01:00
Frantisek Sumsal
6f814d4f5d
Merge pull request #27933 from mrc0mmand/selinux
test: a couple of TEST-06-SELINUX tweaks
2023-06-06 11:18:50 +02:00
Luca Boccassi
6aea5ce814 tests: fix shellcheck warnings 2023-06-06 02:37:36 +01:00