1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
Commit Graph

2284 Commits

Author SHA1 Message Date
Frantisek Sumsal
26a5ae8e95 test: dump the test output to console as well for easier debugging 2021-09-19 13:46:55 +02:00
Frantisek Sumsal
41187e716d test: regenerate module dependencies after installing all modules 2021-09-19 13:46:55 +02:00
Frantisek Sumsal
abfa9a0e7d test: fix error handling with set -e
Unfortunately, when checking the return/exit code using &&, ||, if,
while, etc., `set -e` is disabled for all nested functions as well,
which leads to incorrectly ignored errors, *sigh*.

Example:

```
set -eu
set -o pipefail

task() {
    echo "task init"
    echo "this should fail"
    false
    nonexistentcommand
    echo "task end (we shouldn't be here)"
}

if ! task; then
    echo >&2 "The task failed"
    exit 1
else
    echo "The task passed"
fi
```

```
$ bash test.sh
task init
this should fail
test.sh: line 10: nonexistentcommand: command not found
task end (we shouldn't be here)
The task passed
$ echo $?
0
```

But without the `if`, everything works "as expected":

```
set -eu
set -o pipefail

task() {
    echo "task init"
    echo "this should fail"
    false
    nonexistentcommand
    echo "task end (we shouldn't be here)"
}

task
```

```
$ bash test.sh
task init
this should fail
$ echo $?
1
```

Wonderful.
2021-09-19 13:46:55 +02:00
Frantisek Sumsal
b1471e559e test: btrfs-related udev tests 2021-09-19 13:46:49 +02:00
Frantisek Sumsal
677acd2101 test: check symlinks under /dev/mapper by default as well 2021-09-18 20:44:34 +02:00
Frantisek Sumsal
de11005c1a test: use subshells a bit more
to tweak shell flags in specific functions without affecting the rest of
the script.
2021-09-18 20:44:34 +02:00
Frantisek Sumsal
b216501a8e test: cleanup the intermediate disk images 2021-09-18 20:44:34 +02:00
Frantisek Sumsal
70ec7736f8 test: tidy up the feature handling 2021-09-18 20:44:34 +02:00
Frantisek Sumsal
babe935563 test: add a btrfs helper 2021-09-18 20:44:34 +02:00
Frantisek Sumsal
dbc04797c1 test: lower the number of iterations in LVM tests
as some of the operations take a really long time.
2021-09-18 20:44:34 +02:00
Frantisek Sumsal
776fc8c385 test: unify handling of supported "features" 2021-09-17 17:45:39 +02:00
Luca Boccassi
1dcd91ad11
Merge pull request #20758 from yuwata/test-17-udev-cleanups
test: several cleanups for TEST-17-UDEV
2021-09-16 09:45:10 +01:00
Yu Watanabe
2d253d7206
Merge pull request #20721 from mrc0mmand/test-storage-lvm
test: udev/LVM storage tests
2021-09-16 12:39:24 +09:00
Yu Watanabe
a871f3bb54 test: drop unnecessary sleep and 'udevadm settle'
After the triggered events are processed, all symlinks which store
watch handles should be valid.
2021-09-16 06:55:11 +09:00
Yu Watanabe
a9d8bebacd test: use --settle option for udevadm trigger 2021-09-16 06:55:11 +09:00
Yu Watanabe
e70f57796d test: use --settle option for udevadm trigger
Then, we can drop the loops.
This also drops unnecessary `udevadm control --reload`.
2021-09-16 06:55:04 +09:00
Yu Watanabe
9228ecaf8c test: use /dev/null instead of the loop back network interface
It should faster to be processed. So, we can shorten the timeout.
Also, this makes the test use `udevadm trigger`.
2021-09-16 06:46:19 +09:00
Yu Watanabe
26146d82db test: use --settle option for udevadm trigger 2021-09-16 06:39:48 +09:00
Frantisek Sumsal
0203b2e4be test: basic LVM tests 2021-09-15 20:17:50 +02:00
Luca Boccassi
e236711fd7 test: document autopkgtest CI infrastructure 2021-09-15 14:58:38 +02:00
Peter Morrow
88a56dc8d6 fuzz: add StartupAllowedCPUs and StartupAllowedMemoryNodes to directives
Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
2021-09-15 09:52:12 +01:00
Frantisek Sumsal
6df0259732 test: check if all paths passed to helper_check_device_symlinks() are valid 2021-09-14 19:15:13 +02:00
Frantisek Sumsal
a0560b93ea test: make helper_check_device_symlinks() less verbose 2021-09-14 19:15:13 +02:00
Frantisek Sumsal
df72bd45f3 test: handle arbitrary paths in helper_check_device_symlinks() 2021-09-14 19:15:13 +02:00
Frantisek Sumsal
4999f3688f test: add an LVM helper 2021-09-14 19:15:13 +02:00
Frantisek Sumsal
e3d9a2e74f test: install dmevent service and socket 2021-09-14 19:15:13 +02:00
Frantisek Sumsal
bac05644a7 test: specify the rootfs by label
otherwise the boot might fail when attaching multiple SATA devices to
the VM.
2021-09-14 19:15:13 +02:00
Yu Watanabe
e47bcb7d0b network: do not use RouteTable= in [DHCPv4] section for DHCPv6 routes
We forgot to add RouteTable= in [DHCPv6] section when we split [DHCP]
into two.
2021-09-14 17:51:19 +09:00
Yu Watanabe
8be102f8b8 test-network: kernel treats the lowest IP address as unicast since 5.14
See kernel's 94c821c74bf5fe0c25e09df5334a16f98608db90.
2021-09-13 21:41:16 +02:00
Frantisek Sumsal
35497c7c33 test: coverage for #19946 2021-09-12 18:55:58 +02:00
Frantisek Sumsal
d430e451c9 test: make sure all symlinks under /dev/disk/ are valid 2021-09-12 18:52:56 +02:00
Frantisek Sumsal
d0cbad16c5 test: add a basic multipath test + failover 2021-09-12 18:38:42 +02:00
Frantisek Sumsal
9e7c3bd48c test: add a multipath helper 2021-09-12 18:38:42 +02:00
Frantisek Sumsal
e205ae0d9c test: use one call to install necessary modules 2021-09-12 18:38:42 +02:00
Anita Zhang
7417f06187 test: tweak parameters for TEST-55-OOMD
Pressure remains > 1% after a kill for some time and could cause
testchill to get killed. Bumping the limit from 1% to 20% should help
with this.

Fixes #20118
2021-09-12 19:16:18 +09:00
Frantisek Sumsal
39e1753673 test: rename dracut_install to image_install
The `dracut_install` is a misnomer, since the systemd integration test
suite is based on the original dracut's test suite, and not all the
references to dracut has been edited out. Let's fix that.
2021-09-08 22:41:20 +09:00
Luca Boccassi
7728f6aa81 test: rename TEST-63-ANALYZE to solve conflict
Two PRs adding TEST-63-* were merged more or less at the
same time, and we missed the conflict.
2021-09-08 10:12:03 +09:00
Frantisek Sumsal
f2204ac27d test: udev storage tests 2021-09-08 04:31:24 +09:00
Kyle Laker
c1e6f21556
systemd-analyze: use config value in RestrictNamespaces id (#20645)
For most fields, the text shown by `.id` is the value that should be set
in the unit file; however, for RestrictNamespaces, it is not. Changing
this to show the actual text makes it more clear to a user what the
actual change that needs to be made to the unit file is.
2021-09-06 17:33:16 +02:00
Yu Watanabe
05403363ca tree-wide: fix typo 2021-09-05 09:09:13 +02:00
Yu Watanabe
b06469a66c test-network: add tests for KeepMaster= 2021-09-04 08:15:30 +09:00
Yu Watanabe
57aef9d737 network: introduce KeepMaster= setting
Closes #20624.
2021-09-04 00:23:20 +09:00
Franck Bui
ce380c2f09 test: make sure to include all haveged unit files
Recent versions of haveged relies on haveged-switch-root.service too.
2021-09-01 20:40:55 +01:00
Maanya Goenka
4b6221194d test: add integration tests for systemd-analyze 2021-08-31 08:02:08 -07:00
Tom Yan
c918b70a4d network: default LinkLocalAddresssing= to no for link stacked with a passthru mode MACVLAN/MACVTAP
For similar reason to the case of a bridge slave: we don't want any IP configuration for it.
2021-08-26 06:11:41 +09:00
Yu Watanabe
d11ff2a4f1
Merge pull request #20515 from yuwata/pid1-mount-apivfs-no
pid1: make find_executable() work with MountAPIVFS=no
2021-08-26 06:05:03 +09:00
Yu Watanabe
42867dfeef test-execute: add a testcase for MountAPIVFS=no 2021-08-26 02:54:37 +09:00
Daan De Meyer
9727f2427f core: Check unit start rate limiting earlier
Fixes #17433. Currently, if any of the validations we do before we
check start rate limiting fail, we can still enter a busy loop as
no rate limiting gets applied. A common occurence of this scenario
is path units triggering a service that fails a condition check.

To fix the issue, we simply move up start rate limiting checks to
be the first thing we do when starting a unit. To achieve this,
we add a new method to the unit vtable and implement it for the
relevant unit types so that we can do the start rate limit checks
earlier on.
2021-08-25 13:26:14 +01:00
Yu Watanabe
ab47f96041 test-network: add more testcases for *Allow/DenyList= 2021-08-23 20:37:36 +09:00
Yu Watanabe
180c5116b3 test-network: add testcases that gateway address is IPv6 link local 2021-08-22 15:35:22 +09:00