summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* network: add UseMTU= in [IPv6AcceptRA]Yu Watanabe2021-08-201-0/+1
| | | | | | Note that kernel has similar knob in sysctl: accept_ra_mtu. Closes #18868.
* Merge pull request #18385 from kinvolk/mauricio/restrict-network-interfacesLennart Poettering2021-08-2017-0/+129
|\ | | | | Add RestrictNetworkInterfaces=
| * tests: add integration test for RestrictNetworkInterfaces=Mauricio Vásquez2021-08-1910-0/+122
| | | | | | | | Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
| * core: add load fragment implementation for RestrictNetworkInterfaces=Mauricio Vásquez2021-08-187-0/+7
| | | | | | | | Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
* | udev: Add support for configuring nic coalescing settingsDaan De Meyer2021-08-201-0/+22
| | | | | | | | These are configured via the corresponding ethtool ioctl.
* | Merge pull request #20436 from fbuihuu/add-no-build-support-on-opensuseLuca Boccassi2021-08-194-47/+86
|\ \ | |/ |/| Add no build support on opensuse
| * test: if haveged is part of initrd it needs to be installed in the image tooFranck Bui2021-08-181-0/+11
| | | | | | | | | | Otherwise haveged won't survive when switching root from initrd to host making haveged service in host fail.
| * test: adapt install_pam() for openSUSEFranck Bui2021-08-181-1/+8
| | | | | | | | | | | | On openSUSE the default pam config files are shipped in /usr/etc/pam.d. Also empty password is not allowed by default.
| * Revert "test: adapt TEST-13-NSPAWN-SMOKE for SUSE"Franck Bui2021-08-182-29/+12
| | | | | | | | | | | | | | | | | | | | This reverts commit 491b736a49fb9d64b0b515aa773297a30c8bab1d. If the _static_ linked version of busybox is installed, openSUSE doesn't need any specific code. A following commit will make sure that the static linked version of busybox is installed in the busybox container.
| * test: on openSUSE the static linked version of busybox is named "busybox-static"Franck Bui2021-08-182-2/+8
| |
| * TEST-13-*: in busybox container sleep(1) takes a delay in seconds onlyFranck Bui2021-08-182-1/+2
| |
| * test: don't try to find BUILD_DIR when NO_BUILD is setFranck Bui2021-08-181-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | NO_BUILD=1 indicates that we want to test systemd from the local system and not the one from the local build. Hence there should be no need to call find-build-dir.sh when NO_BUID=1 especially since it's likely that the script will fail to find a local build in this case. This avoids find-build-dir.sh to emit 'Specify build directory with $BUILD_DIR' message when NO_BUILD=1 and no local build can be found. This introduces a behavior change though: systemd from the local system will always be preferred when NO_BUILD=1 even if a local build can be found.
| * test: add support for NO_BUILD=1 on openSUSEFranck Bui2021-08-181-8/+41
| |
* | network: do not assume the highest priority when Priority= is unspecifiedYu Watanabe2021-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when Priority= is unspecified, networkd configured the rule with the highest (=0) priority. This commit makes networkd distinguish the case the setting is unspecified and one explicitly specified as Priority=0. Note. 1) If the priority is unspecified on configure, then kernel dynamically picks a priority for the rule. 2) The new behavior is consistent with 'ip rule' command. Replaces #15606.
* | extension-release: search for other files if expected name not foundLuca Boccassi2021-08-173-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | In some cases image names are unpredictable - some orchestrators/deployment tools like to mangle names to suit their internal formats. In these cases, the requirement that the extension-release file matches exactly the image name where it's contained cannot work. Allow falling back to loading the first regular file which name starts with 'extension-release' located in /usr/lib/extension-release.d/ and tagged with a user.extension-release.strict extended attribute with a true value, if the one with the expected name cannot be found.
* | Merge pull request #20442 from yuwata/network-can-introduce-many-settingsYu Watanabe2021-08-171-0/+14
|\ \ | | | | | | network: introduce several CAN interface related settings
| * | network: can: allow to specify bit-timing with TimeQuantaNSec= and friendsYu Watanabe2021-08-161-0/+10
| | | | | | | | | | | | Closes #19424 and #20435.
| * | network: can: add missing control modesYu Watanabe2021-08-161-0/+4
| | |
* | | network: add address label on dhcpv4Maxime de Roucy2021-08-173-0/+3
|/ / | | | | | | Fixes: #13967
* | test-network: add a testcase for recreating stacked netdevsYu Watanabe2021-08-121-0/+19
|/
* test-network: test static lease outside of poolYu Watanabe2021-08-112-2/+2
|
* test: fix TEST-10-ISSUE-2467Michael Biebl2021-08-101-1/+10
| | | | | | | | | | | | | | | | | | | | | Depending on the timing, socat will either get ECONNREFUSED oder EPIPE from systemd. The latter will cause it to exit(1) and subsequently the test to fail. We are not actually interested in the return code of socat though. The test is supposed to check, whether rate limiting of a socket unit works properly. So ignore any failures from the socat invocation and instead check, if test10.socket is in state "failed" with result "trigger-limit-hit" after it has been triggered. TriggerLimitIntervalSec= by default is set to 2s. A "sleep 10" should give systemd enough time even on slower machines, to reach the trigger limit. For better readability, break the test into separate ExecStart lines. Fixes #19154.
* test-network: add a testcase to enter unmanaged state on reconfiguringYu Watanabe2021-08-101-6/+27
|
* test: use a correct kernel binary on ppc64le machinesFrantisek Sumsal2021-08-091-5/+7
| | | | | | | Ubuntu calls the kernel binary as `vmlinux-*`, but RHEL/CentOS uses the "standard" `vmlinuz-` prefix. Follow-up to eaa602cb14217f2623c9c8c44b6f3012dc4d0b24.
* Merge pull request #20399 from mrc0mmand/test-tweaksZbigniew Jędrzejewski-Szmek2021-08-092-2/+2
|\ | | | | test: yet another fix for ASan detection
| * test: make busybox TEST-13-only dependencyFrantisek Sumsal2021-08-082-1/+1
| | | | | | | | | | to make running other tests a bit easier on distributions which don't have busybox in repositories (CentOS).
| * test: yet another fix for ASan detectionFrantisek Sumsal2021-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This time for ppc64le: ``` 100737c4: 5d 55 f9 4b bl 10008d20 <00000024.plt_call.__asan_report_load8> 100737f4: 4d 55 f9 4b bl 10008d40 <00000024.plt_call.__asan_handle_no_return> 10073884: 5d 50 f9 4b bl 100088e0 <00000024.plt_call.__asan_init> 1007388c: 75 54 f9 4b bl 10008d00 <00000024.plt_call.__asan_version_mismatch_check_v8> 100738a0: 41 36 f9 4b bl 10006ee0 <00000024.plt_call.__asan_register_globals> 100738f0: 71 4c f9 4b bl 10008560 <00000024.plt_call.__asan_unregister_globals> ```
* | test: skip a harmless ldd error when installing test libsFrantisek Sumsal2021-08-091-0/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Skip a harmless error when running the tests on a system with a significantly older systemd version (ldd tries to resolve the unprefixed RPATH for libsystemd.so.0, which is in this case older than the already installed libsystemd.so.0 in $initdir). The issue is triggered by installing test dependencies in install_missing_libraries(). Spotted on CentOS 8. ``` $ ldd /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread: /lib64/libsystemd.so.0: version `LIBSYSTEMD_240' not found (required by /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread) linux-vdso64.so.1 (0x00007fffb79d0000) libclang_rt.asan-powerpc64le.so => /usr/lib64/clang/11.0.0/lib/linux/libclang_rt.asan-powerpc64le.so (0x00007fffb6ef0000) libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007fffb6d20000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fffb6cd0000) libc.so.6 => /lib64/libc.so.6 (0x00007fffb6ab0000) $ LD_LIBRARY_PATH=/var/tmp/systemd-test.nZO11F/root/lib64/ ldd /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread linux-vdso64.so.1 (0x00007fffaba80000) libclang_rt.asan-powerpc64le.so => /usr/lib64/clang/11.0.0/lib/linux/libclang_rt.asan-powerpc64le.so (0x00007fffaafa0000) libsystemd.so.0 => /var/tmp/systemd-test.nZO11F/root/lib64/libsystemd.so.0 (0x00007fffaa5f0000) libpthread.so.0 => /var/tmp/systemd-test.nZO11F/root/lib64/libpthread.so.0 (0x00007fffaa5a0000) libc.so.6 => /var/tmp/systemd-test.nZO11F/root/lib64/libc.so.6 (0x00007fffaa380000) ```
* test: attempt to install only kernel modules for each subsystemFrantisek Sumsal2021-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | When `linux-headers` is installed on Arch Linux, it stores the module source tree in the kernel module directory, which is then picked up by `find` and we get a lot of harmless but annoying errors: ``` ... modprobe: FATAL: Module Kconfig.iosched not found in directory /lib/modules/5.13.7-arch1-1 modprobe: FATAL: Module Kconfig not found in directory /lib/modules/5.13.7-arch1-1 modprobe: FATAL: Module Kconfig not found in directory /lib/modules/5.13.7-arch1-1 modprobe: FATAL: Module dm-mpath.h not found in directory /lib/modules/5.13.7-arch1-1 modprobe: FATAL: Module dm-bio-prison-v2.h not found in directory /lib/modules/5.13.7-arch1-1 modprobe: FATAL: Module raid0.h not found in directory /lib/modules/5.13.7-arch1-1 ... ``` Let's fix this by trying to install only kernel modules (*.ko files with an optional compression).
* Merge pull request #20375 from yuwata/network-bridge-vlan-issue-20373Luca Boccassi2021-08-054-2/+90
|\ | | | | network: fix bridge and openvswitch issues
| * test-network: add a test case for issue #20373Yu Watanabe2021-08-044-2/+90
| |
* | Merge pull request #20377 from yuwata/network-bridge-fdb-20305Yu Watanabe2021-08-054-17/+59
|\ \ | | | | | | network: always append new bridge FDB entries
| * | test-network: add a testcase for vxlan with IPv6 local addressYu Watanabe2021-08-044-17/+59
| |/
* | test-network: add a testcase for UplinkInterface= in [IPv6SendRA]Yu Watanabe2021-08-046-7/+47
| |
* | network: introduce UplinkInterface= in [IPv6SendRA]Yu Watanabe2021-08-041-0/+1
|/
* test: correctly detect ASan on s390xFrantisek Sumsal2021-07-291-1/+1
| | | | | | | | | | | | | | | | | | s390x uses BRAS(L) instead of CALL(Q), e.g.: ``` 1009528: c0 e5 ff ff f8 a0 brasl %r14,1008668 <__asan_report_load1@plt> 10095f0: c0 e5 ff ff ea ec brasl %r14,1006bc8 <__asan_stack_malloc_4@plt> 10097f8: c0 e5 ff ff f8 f8 brasl %r14,10089e8 <__asan_report_load8@plt> ``` x86_64 for reference: ``` 4011f3: e8 48 fe ff ff callq 401040 <__asan_report_load1@plt> 401227: e8 24 fe ff ff callq 401050 <__asan_report_load8@plt> 401251: e8 da fd ff ff callq 401030 <__asan_init@plt> ```
* meson: use a/b instead of join_paths(a,b)Zbigniew Jędrzejewski-Szmek2021-07-271-1/+1
| | | | It is nicer and shorter.
* meson: use maps for udev program pathsZbigniew Jędrzejewski-Szmek2021-07-271-1/+3
|
* test: make sure we don't access an unbound variableFrantisek Sumsal2021-07-231-0/+1
| | | | | | | | | | ``` testsuite-60.sh[759]: + grep -q '(mount-monitor-dispatch) entered rate limit' testsuite-60.sh[571]: + sleep 5 testsuite-60.sh[761]: ++ date -u +%s testsuite-60.sh[571]: + [[ 1627037066 -le 1627037061 ]] testsuite-60.sh[571]: /usr/lib/systemd/tests/testdata/units/testsuite-60.sh: line 41: entered_rl: unbound variable ```
* Merge pull request #20225 from mrc0mmand/selinux-nspawn-sanityLuca Boccassi2021-07-153-1/+17
|\ | | | | test: add a sanity test for #19976
| * test: add a sanity test for systemd/systemd#19976Frantisek Sumsal2021-07-142-0/+17
| | | | | | | | | | which should ensure we can use nspawn containers with SELinux context set via the `--selinux-context=` and `--selinux-apifs-context=` options.
| * test: don't explicitly disable SELinuxFrantisek Sumsal2021-07-141-1/+0
| | | | | | | | | | We don't install any policies by default, so it shouldn't interfere with anything (and it would save me some headache).
* | test-network: add a testcase for semi-static route with Gateway=_dhcp4 when ↵Yu Watanabe2021-07-151-2/+17
| | | | | | | | UseGateway=no
* | test-network: adjust testcases to follow the previous changesYu Watanabe2021-07-151-5/+6
| |
* | Merge pull request #20120 from yuwata/test-oomd-debugYu Watanabe2021-07-131-4/+16
|\ \ | | | | | | test: enable debug logging of oomd
| * | test: also show the memory pressure of testchill.serviceYu Watanabe2021-07-031-0/+2
| | | | | | | | | | | | | | | The memory pressure should be small, but let's log the value in the journal of the test environment.
| * | test: check memory pressure more frequentlyYu Watanabe2021-07-031-4/+4
| | |
| * | test: enable debug logging of systemd-oomdYu Watanabe2021-07-031-0/+10
| | |
* | | test-network: add a testcase for ManageForeignRoutes=noYu Watanabe2021-07-122-1/+31
| |/ |/|
* | test: make the strace check a bit more cleverFrantisek Sumsal2021-07-091-2/+3
| | | | | | | | | | | | | | We still sometimes try to grep an empty strace log because strace is not yet properly initialized. Let's make the check a bit clever and wait until strace is attached to PID 1 by checking the `TracerPid` field in `/proc/1/status`.