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
Frantisek Sumsal
d5ab23aa54
test: a couple of assorted cleanups
...
- sort binaries
- send stdout/stderr of the autorelabel service to console as well
2023-06-05 23:30:01 +02:00
Frantisek Sumsal
fa5dee77c0
test: load the SELinux module outside of the VM
...
Turns out we can, apart from just building the module, "shove" it into
the SELinux database in a chroot as well. This brings quite significant
time savings, as the SELinux db rebuild takes 2 - 5 minutes in a VM
without acceleration (and takes currently ~half of the runtime of the test
in the C8S job).
2023-06-05 22:52:38 +02:00
Frantisek Sumsal
8c0ace5739
test: add a reasoning why we don't use the SELinux-provided units
2023-06-05 22:52:38 +02:00
Yu Watanabe
3db7f3c58c
Merge pull request #27912 from mrc0mmand/cryptsetup-tests
...
test: add a couple more tests for systemd-cryptsetup
2023-06-06 03:34:59 +09:00
Luca Boccassi
9bb4f9f2ff
Merge pull request #27926 from DaanDeMeyer/repart-offline
...
repart: Add --offline argument
2023-06-05 19:11:41 +01:00
Frantisek Sumsal
d7c1df84d9
test: make sure we unmount /var late during shutdown
...
To avoid the "mountpoint is busy" error.
2023-06-05 16:54:31 +02:00
Frantisek Sumsal
eb26f34a09
test: add a couple more tests for systemd-cryptsetup
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
71d7f02cc7
test: make check_result_*() set -e
friendly
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
e6faf0ee22
test: use check_result_common()
...
The TEST-24 has been silently timing out for quite a while in the C8S
job, as the check_result_qemu() override lacked some error checks,
whoopsie.
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
168ccb879f
test: clean up the test cleanup a bit
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
00c2676972
test: minor cleanup
...
No functional change.
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
b7e913841b
test: make the data partition larger for the cryptsetup test
...
As we use it for /var and with the default 100 MiB there's not enough
space for the journal.
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
0334afe4d0
test: make the root/data partition size configurable per test
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
70bdf6e661
test: introduce test_require_bin() and use it
...
No functional change.
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
97d7af86b5
test: fix indentation
2023-06-05 16:50:13 +02:00
Frantisek Sumsal
18fa5c8283
test: move TPM2-related setup stuff into test-functions
...
And hide it all behind $TEST_SETUP_SWTPM.
2023-06-05 16:50:13 +02:00
Zbigniew Jędrzejewski-Szmek
1ab32e8aaf
Merge pull request #27871 from yuwata/udevadm-verify-downgrade-style-issues
...
udevadm-verify: downgrade log level about style issues
2023-06-05 16:07:19 +02:00
Frantisek Sumsal
0efa27bd4b
test: allow running only specified subtests/testcases
...
Useful when debugging, e.g.:
make -C test/TEST-74-AUX-UTILS clean setup run TEST_MATCH_SUBTEST=run
Resolves : #27914
2023-06-05 15:58:37 +02:00
Daan De Meyer
94d74c9cd7
test: Test --offline= in TEST-58-REPART
...
Instead of using a privileged and unprivileged user to test the
offline and online logic of systemd-repart, let's always run repart
as root and use the --offline= argument to specify repart to use
either the offline or online logic.
2023-06-05 15:29:47 +02:00
Yu Watanabe
1bf3dd4153
udev: downgrade log level about style issues
...
And add --no-style switch that make style issues not critical.
2023-06-05 11:37:26 +09:00
Yu Watanabe
2ef0959fbe
test: drop unnecessary copy of expected output
2023-06-05 11:21:28 +09:00
Yu Watanabe
4134614fc0
udev-rules: terminate log messages with period
2023-06-05 11:21:28 +09:00
Frantisek Sumsal
d99e099fb4
test: drop the --recursive=no test
...
As the outcome also depends on availability of the PID namespace, so
the test might (and does) unexpectedly pass in some environments.
2023-06-03 16:30:46 +02:00
Frantisek Sumsal
686da1c095
test: ignore missing coverage in TEST-82-SOFTREBOOT
...
As we temporarily mount rootfs read-only there.
2023-06-03 16:30:46 +02:00
Adrian Vovk
0470f91983
sysupdate.d: Add way to drop binaries into $BOOT
...
As described in the BLS, we should place binaries into the XBOOTLDR
directory if it is available, otherwise into the ESP. Thus, we might
need to put binaries into /boot or into /efi depending on the existence
of the XBOOTLDR partition.
With this change, we introduce a new PathRelativeTo= config option that
makes this functionality possible
2023-06-03 09:13:27 +02:00
Luca Boccassi
e1aacab7d5
Merge pull request #27903 from mrc0mmand/test-followups
...
test: a couple of systemd-{coredump,pstore,run} followups
2023-06-02 23:56:58 +01:00
Lennart Poettering
093d545658
test: add integration test for soft reboots incl. fdstore passing
2023-06-02 18:43:11 +02:00
Lennart Poettering
8af66251a1
test: disable SoftReboot() in dfuzzer test for now
...
As requested:
https://github.com/systemd/systemd/pull/27435#issuecomment-1527810336
2023-06-02 18:43:11 +02:00
Frantisek Sumsal
50fb26d237
test: probe a couple more paths in systemd-run
2023-06-02 16:59:58 +02:00
Frantisek Sumsal
1326d2dd05
test: sync with the fake binary before killing it
...
On faster machines we might be too fast and kill the fake binary during
fork() which then makes kernel report a "wrong" binary in the coredump,
e.g.:
[ 31.408078] testsuite-74.sh[548]: + /tmp/make-dump /tmp/test-dump SIGTRAP
[ 31.409720] testsuite-74.sh[560]: + bin=/tmp/test-dump
[ 31.409720] testsuite-74.sh[560]: + sig=SIGTRAP
[ 31.409720] testsuite-74.sh[560]: + ulimit -c unlimited
[ 31.409720] testsuite-74.sh[560]: + pid=561
[ 31.409720] testsuite-74.sh[560]: + sleep 1
[ 31.409720] testsuite-74.sh[560]: + kill -s SIGTRAP 561
[ 31.409720] testsuite-74.sh[560]: + wait 561
[ 31.491757] systemd[1]: Created slice system-systemd\x2dcoredump.slice.
[ 31.524488] systemd[1]: Started systemd-coredump@0-563-0.service .
[ 31.616372] systemd-coredump[564]: [🡕] Process 561 (make-dump) of user 0 dumped core.
Stack trace of thread 561:
#0 0x00007ff86bb49af7 _Fork (libc.so.6 + 0xd4af7)
#1 0x00007ff86bb4965f __libc_fork (libc.so.6 + 0xd465f)
#2 0x000055e88011b0ad make_child (bash + 0x550ad)
#3 0x000055e8800fd05f n/a (bash + 0x3705f)
#4 0x000055e880100116 execute_command_internal (bash + 0x3a116)
#5 0x000055e8801011f2 execute_command_internal (bash + 0x3b1f2)
#6 0x000055e8801025b6 execute_command (bash + 0x3c5b6)
#7 0x000055e8800f134b reader_loop (bash + 0x2b34b)
#8 0x000055e8800e757d main (bash + 0x2157d)
#9 0x00007ff86ba98850 n/a (libc.so.6 + 0x23850)
#10 0x00007ff86ba9890a __libc_start_main (libc.so.6 + 0x2390a)
#11 0x000055e8800e83b5 _start (bash + 0x223b5)
ELF object binary architecture: AMD x86-64
[ 31.666617] testsuite-74.sh[560]: /tmp/make-dump: line 12: 561 Trace/breakpoint trap (core dumped) "$bin" infinity
...
$ coredumpctl list --file system.journal
TIME PID UID GID SIG COREFILE EXE SIZE
Fri 2023-06-02 10:42:10 CEST 561 0 0 SIGTRAP journal /usr/bin/bash -
Fri 2023-06-02 10:42:11 CEST 570 0 0 SIGABRT journal /tmp/test-dump -
Fri 2023-06-02 10:42:12 CEST 582 0 0 SIGTRAP missing /tmp/test-dump -
Fri 2023-06-02 10:42:13 CEST 593 0 0 SIGABRT missing /tmp/test-dump -
2023-06-02 13:24:32 +02:00
Frantisek Sumsal
e8ee168344
test: clean up our mess after the pstore test
2023-06-02 10:07:57 +02:00
Frantisek Sumsal
dee4a9923b
test: add a couple of tests for systemd-run
2023-06-01 23:12:47 +02:00
Frantisek Sumsal
6178ced491
test: make the multiple-file test more thorough
...
Let's check if we keep the old records after multiple systemd-pstore
invocations (i.e. simulate a scenario where we get multiple crashes and
multiple machine reboots).
2023-06-01 20:06:40 +02:00
Frantisek Sumsal
57130ca01b
test: make TEST-04 stable once again
...
Wait a bit if necessary for the cursor file to appear.
Follow-up fb35feae97
.
2023-06-01 21:11:21 +09:00
Frantisek Sumsal
4c709f3908
test: skip the test early if we're built without systemd-homed
...
We check for homed stuff in the test itself, but this is way too late,
since we already started a unit that Requires=systemd-homed.service
(testsuite-46.service). For now this doesn't matter, but with #27852
the offending transaction is dropped from the job queue, making the test
fail.
Spotted in #27852 in Ubuntu CI.
2023-06-01 06:30:45 +09:00
Yu Watanabe
322bda8241
Merge pull request #27826 from yuwata/network-link-ready-without-ndisc-when-has-static-address
...
network: do not request dynamic addressing protocols finished when at…
2023-06-01 06:29:55 +09:00
Yu Watanabe
2f96a29c2c
wait-online: request that at least one managed online interface exists
...
Fixes a regression caused by ab3aed4a03
.
I thought the commit does not cause any severe regression. However,
drivers for network interfaces may be loaded later. So, we should wait
if no network interface is found.
Fixes #27822 .
2023-05-31 22:12:03 +02:00
Daan De Meyer
edabe6fc11
Merge pull request #27806 from DaanDeMeyer/fix-mkosi-check
...
mkosi: Use proper check to detect whether we're in a VM
2023-05-31 15:26:05 +02:00
Daan De Meyer
2533fdd0fb
Merge pull request #27766 from rphibel/cleanup-cgroups-before-cleaning-units
...
Don't GC unit if it is in cgroup_empty_queue
2023-05-31 14:48:42 +02:00
Daan De Meyer
a0807bdc23
sysv-generator-test: Bump log level to info
...
Otherwise, non-fatal debug error logs might interfere with the test.
2023-05-31 14:19:25 +02:00
Luca Boccassi
1a7e5c51dc
Merge pull request #27853 from keszybz/various-bits-and-pieces-included-to-reuse-the-ci-run
...
Various bits and pieces included to reuse the ci run
2023-05-31 11:08:36 +01:00
Luca Boccassi
29084afd91
Merge pull request #27519 from yuwata/journalctl-fixes
...
journalctl: several fixes and cleanups for --follow
2023-05-31 11:05:54 +01:00
Luca Boccassi
23f315dc08
Merge pull request #27835 from keszybz/test-58-repart-modernization
...
Cleanup/simplifications for TEST-58-repart
2023-05-31 11:00:18 +01:00
Zbigniew Jędrzejewski-Szmek
088d8c99fe
test-fstab-generator: fix test on systemd with systemd-boot
...
(… or other boot loaders implementing the Boot Loader Interface.)
Fixes #27857 .
2023-05-31 10:59:50 +01:00
Zbigniew Jędrzejewski-Szmek
e80444729f
tests: drop unnecessary redirection of stderr
...
command -v doesn't print anything to stderr, let's use the canonical
form with just >/dev/null.
2023-05-30 16:04:35 +02:00
Daan De Meyer
cc11107fd2
test-udev: Skip running in container
...
Containers generally don't have permission to mknod() which is
required by test-udev so let's skip the test as well if we detect
we're running in a container.
2023-05-30 14:48:38 +02:00