Frantisek Sumsal
0f90d4f0c3
test: add a couple of tests for nss-mymachines
2023-06-28 17:04:31 +02:00
Lennart Poettering
f70c90f5ca
analyze: add new "pcrs" verb
...
It shows the PCRs we know about along with their name strings and
current values.
2023-06-28 16:50:50 +02:00
Frantisek Sumsal
1a36d2672f
test: add a couple of tests for nss-myhostname
2023-06-28 11:07:46 +02:00
Yu Watanabe
16e1e4b3e7
meson: drop doubled empty line
2023-06-27 22:34:25 -06:00
Luca Boccassi
8da88af877
Merge pull request #28064 from bluca/test_oomd_swap
...
TEST-55-OOMD: use 'stress' to create high pressure, ensure swap is set up correctly on Ubuntu CI
2023-06-26 19:39:07 +01:00
Frantisek Sumsal
7f5f781cf4
test: fix test service unit description
2023-06-26 15:54:01 +02:00
Luca Boccassi
72a28bf8ef
Merge pull request #28149 from mrc0mmand/test-machinectl-bump-container-size
...
test: bump the test container size to 64 MiB
2023-06-25 12:01:30 +01:00
Frantisek Sumsal
256c1ac9a8
test: bump the test container size to 64 MiB
...
As 32 MiB appears to be on the edge of barely enough on C8S:
[ 149.974689] testsuite-13.sh[601]: + dd if=/dev/zero of=/tmp/container.raw bs=1M count=32
[ 150.388423] testsuite-13.sh[1096]: 32+0 records in
[ 150.390721] testsuite-13.sh[1096]: 32+0 records out
[ 150.392450] testsuite-13.sh[1096]: 33554432 bytes (34 MB, 32 MiB) copied, 0.354336 s, 94.7 MB/s
[ 150.396422] testsuite-13.sh[601]: + mkfs.ext4 /tmp/container.raw
[ 150.472209] testsuite-13.sh[1097]: mke2fs 1.45.6 (20-Mar-2020)
[ 150.561303] testsuite-13.sh[1097]: Discarding device blocks: done
[ 150.565438] testsuite-13.sh[1097]: Creating filesystem with 32768 1k blocks and 8192 inodes
[ 150.568301] testsuite-13.sh[1097]: Filesystem UUID: d8e3c43b-0f1f-4e89-8c26-100e4a32b64f
[ 150.569777] testsuite-13.sh[1097]: Superblock backups stored on blocks:
[ 150.571135] testsuite-13.sh[1097]: 8193, 24577
[ 150.572751] testsuite-13.sh[1097]: Allocating group tables: done
[ 150.574294] testsuite-13.sh[1097]: Writing inode tables: done
[ 150.598696] testsuite-13.sh[1097]: Creating journal (4096 blocks): done
[ 150.604285] testsuite-13.sh[1097]: Writing superblocks and filesystem accounting information: done
[ 150.612309] testsuite-13.sh[601]: + mount -o loop /tmp/container.raw /tmp/mnt
[ 150.879736] testsuite-13.sh[601]: + cp -r /var/lib/machines/container1/bin ... /tmp/mnt
[ 152.347545] testsuite-13.sh[1104]: cp: cannot create directory '/tmp/mnt/var/log': No space left on device
[ 152.351739] testsuite-13.sh[1104]: cp: cannot create directory '/tmp/mnt/var/tmp': No space left on device
2023-06-24 20:51:27 +02:00
Frantisek Sumsal
4c88752ae5
test: show the subtest name together with the failing code
...
To make debugging slightly easier.
2023-06-24 20:44:33 +02:00
Luca Boccassi
f434f182cc
TEST-55-OOMD: use swap file instead of partition
...
The partition seems not to work on Ubuntu for some reason, use a
swap file instead
2023-06-24 11:48:51 +01:00
Luca Boccassi
937e82cb7d
TEST-55-OOMD: use 'stress' to create high pressure
...
The test fails on my machine, running Debian stable, because
testsuite-55-testbloat.service just swaps and never goes over the
limit, so it's not killed. Use 'stress' instead which seems to be
able to overwhelm the swap too.
2023-06-24 11:48:51 +01:00
Frantisek Sumsal
7eb9a4623d
test: drop timeout when running portablectl
...
The deadlock should be resolved by #28123 , so let's check if it's indeed
the case.
2023-06-24 10:35:12 +02:00
Frantisek Sumsal
f6b916d387
test: test the /boot endpoint under nspawn as well
...
Since #28144 should be now resolved by fb0e106 .
2023-06-24 10:33:14 +02:00
Lennart Poettering
9e35e9779d
Merge pull request #28144 from poettering/procfs-submounts-move
...
pid1: when setting up a new procfs instance for a service, mount submounts from host into it
2023-06-23 22:53:25 +02:00
Lennart Poettering
5ca8d2474c
test: ensure ProtectProc=invisible retains host submounts
2023-06-23 18:32:40 +02:00
Frantisek Sumsal
0651e71749
test: test transactions with cycles
...
Provides coverage for systemd/systemd#26872.
With systemd/systemd#26875 reverted:
[16444.287652] testsuite-03.sh[71]: + for i in {0..19}
[16444.287652] testsuite-03.sh[71]: + systemctl start transaction-cycle0.service
[16444.359503] systemd[1]: =================================================================
[16444.360321] systemd[1]: ==1==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6180002e578e at pc 0x7f73b25ec7a6 bp 0x7ffc5531c6f0 sp 0x7ffc5531be68
[16444.360798] systemd[1]:
[16444.361044] systemd[1]: READ of size 783 at 0x6180002e578e thread T0 (systemd)
[16444.391684] systemd[1]: #0 0x7f73b25ec7a5 (/lib64/libasan.so.5+0x557a5)
[16444.392167] systemd[1]: #1 0x7f73b260a1d5 in __interceptor_vasprintf (/lib64/libasan.so.5+0x731d5)
[16444.392442] systemd[1]: #2 0x7f73afa1d1e1 in log_format_iovec ../src/basic/log.c:996
[16444.392750] systemd[1]: #3 0x7f73afa1e7b6 in log_struct_internal ../src/basic/log.c:1058
[16444.393101] systemd[1]: #4 0x7f73b1979136 in transaction_verify_order_one ../src/core/transaction.c:392
[16444.393540] systemd[1]: #5 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
[16444.393946] systemd[1]: #6 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
[16444.394262] systemd[1]: #7 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
[16444.394532] systemd[1]: #8 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
[16444.394812] systemd[1]: #9 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
...
2023-06-23 14:37:07 +02:00
Frantisek Sumsal
88c98cb261
test: make sure we get PID1's stack trace on ASan/UBSan errors
...
As hitting an ASan/UBSan error in PID1 results in a crash (and a kernel
panic when running under qemu), we usually lose the stack trace which
makes debugging quite painful. Let's mitigate this by forwarding the
stack trace to multiple places - namely to a file and the syslog.
2023-06-23 14:37:07 +02:00
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