summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* 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`.
* | test: strip binaries by defaultFrantisek Sumsal2021-07-091-0/+1
| | | | | | | | | | Since 23f8e01 we always kept binaries unstripped, since $STRIP_BINARIES is unset by default.
* | test: bump the test timeout to give ldconfig.service enough time to finishFrantisek Sumsal2021-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the ldconfig.service might take a bit longer to finish, causing spurious test timeouts: ``` [ 1025.858923] systemd[24]: ldconfig.service: Executing: /sbin/ldconfig -X ... [ 1043.883620] systemd[1]: ldconfig.service: Main process exited, code=exited, status=0/SUCCESS (success) ... Trying to halt container. Send SIGTERM again to trigger immediate termination. Container TEST-52-HONORFIRSTSHUTDOWN terminated by signal KILL. E: Test timed out after 20s ```
* | test: extend credentials test to cover encrypted credentialsLennart Poettering2021-07-081-0/+24
| |
* | pid1: add support for encrypted credentialsLennart Poettering2021-07-084-0/+8
| |
* | test: unify handling of boolean valuesFrantisek Sumsal2021-07-042-62/+82
| | | | | | | | | | | | | | Let's unify handling of the boolean values throughout the test-functions code, since we use 0/1, true/false, and yes/no almost randomly in many places, so picking the right values during CI configuration can be a real pain.
* | test: optionally, only save test journal for failing testsDan Streetman2021-07-031-9/+26
|/ | | | | | Saving the journal for passing tests creates a huge amount of unneeded data stored for each full test run. Add a env var to allow saving the journal only for failed tests.
* Revert "rules: ubi mtd - add link to named partitions"Lennart Poettering2021-07-011-3/+0
| | | | | | | | This reverts commit 7f1e9c806b6915e8020cf3706dc87e1cd37bc2fa, PR #6750 Apparently the rule change never worked, see #20071. Fixes #20071
* Merge pull request #19980 from yuwata/sd-ipv4acd-filter-all-hwaddrZbigniew Jędrzejewski-Szmek2021-06-305-24/+35
|\ | | | | network: IPv4LL and ACD fixes
| * test-network: update tests for ipv4acdYu Watanabe2021-07-015-24/+35
| |
* | Revert "Introduce ExitType"Zbigniew Jędrzejewski-Szmek2021-06-305-115/+0
|/ | | | | | | | | | | This reverts commit cb0e818f7cc2499d81ef143e5acaa00c6e684711. After this was merged, some design and implementation issues were discovered, see the discussion in #18782 and #19385. They certainly can be fixed, but so far nobody has stepped up, and we're nearing a release. Hopefully, this feature can be merged again after a rework. Fixes #19345.
* udev-test: add a testcase for string_escape=replaceYu Watanabe2021-06-271-0/+15
|
* Merge pull request #19883 from ↵Zbigniew Jędrzejewski-Szmek2021-06-254-0/+54
|\ | | | | | | | | ddstreet/activation-policy-down-required-for-online-no Activation policy down required for online no
| * test: add test to verify RequiredForOnline= setting with ActivationPolicy=Dan Streetman2021-06-244-0/+54
| | | | | | | | | | Add test to verify that the RequiredForOnline= value is correct based on the configuration of ActivationPolicy=
* | Merge pull request #19941 from bluca/condition_os_releaseZbigniew Jędrzejewski-Szmek2021-06-252-0/+4
|\ \ | | | | | | core: add ConditionOSRelease= directive
| * | core: add ConditionOSRelease= directiveLuca Boccassi2021-06-242-0/+4
| |/
* | test: correctly mask supporting services in tests, take #2Frantisek Sumsal2021-06-242-13/+7
|/ | | | | | | | | Due to a little misunderstanding the last patch doesn't work as expected, since test_create_image() is called only for the first image (usually TEST-01-BASIC), and all subsequent images are then (possibly) modified with test_append_files(). Follow-up to 179ca4d2b1b5579014773a128462475f99b7a91b.
* Merge pull request #19990 from mrc0mmand/test-tweaksYu Watanabe2021-06-233-12/+25
|\ | | | | A couple of stability-related test tweaks
| * test: correctly mask supporting services in testsFrantisek Sumsal2021-06-222-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out the "supporting services" were run in _all_ tests if TEST-01-BASIC was run as the first test (which is usually the case), since with the original condition in test_create_image() we would skip the masking and then propagate the change to the default image used by other tests. This has been causing multiple bogus test timeouts (especially when the hwdb was being rebuilt in tests with short timeouts, like TEST-52-HONORFIRSTSHUTDOWN). Let's "fix" this by making the call to mask_supporting_services() uncoditional and override the test_create_image() function in TEST-01-BASIC to avoid the masking in this single case.
| * test: ignore the "freezing" & "thawing" intermediate statesFrantisek Sumsal2021-06-221-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking the unit state after `systemctl freeze|thaw` we can be "too fast" and get the intermediate state (freezing/thawing) which we're not interested in. Let's wait a bit and try to get the state again in such cases to avoid unnecessary flakiness. ``` [ 29.390203] testsuite-38.sh[218]: + state=thawing [ 29.390203] testsuite-38.sh[218]: + '[' thawing = running ']' [ 29.390203] testsuite-38.sh[218]: + echo 'error: unexpected freezer state, expected: running, actual: thawing' [ 29.390203] testsuite-38.sh[218]: error: unexpected freezer state, expected: running, actual: thawing [ 29.390203] testsuite-38.sh[218]: + exit 1 ```
* | networkd: Permit all-zero RoutingPolicyRule prefixesHristo Venev2021-06-222-1/+15
| | | | | | | | | | | | | | For example this `From` address range is no longer ignored: [RoutingPolicyRule] From=0.0.0.0/8
* | test-loop-block: run in qemuLuca Boccassi2021-06-215-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | test-loop-block needs to run in qemu, so we are currently not testing it in the CI. Run it by itself in a separate job from TEST-02-UNITTESTS to avoid slowing that suite down. Fixes https://github.com/systemd/systemd/issues/19966 Disable it in the bionic-* CI for now, as it's affected by the same uevent ordering issue as TEST-50-DISSECT which makes it flaky.
* | test: move custom result checks from TEST-02-UNITTESTS to test-functionsLuca Boccassi2021-06-212-54/+62
| |
* | test: allow to call units/testsuite-02.sh from other scriptsLuca Boccassi2021-06-211-1/+2
| |
* | test: do not fail TEST-02-UNITTESTS if they are all skippedLuca Boccassi2021-06-211-0/+4
| | | | | | | | | | The return code is initialized to fail if /testok is not found, but that also covers the case where all tests are skipped.