summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* test: bump timeout for TEST-50-DISSECT and TEST-67-INTEGRITYLuca Boccassi2021-12-132-2/+2
| | | | | | | | | TEST-67-INTEGRITY times out quite often, and when it passes it does so a few seconds short of the timeout. It's a slow qemu test, so bump the timeout. TEST-50-DISSECT has been reported to fail in the same way on Debian's infrastructure, again narrowly failing or passing just short of the timeout.
* Merge pull request #21614 from medhefgo/boot-bcdZbigniew Jędrzejewski-Szmek2021-12-1212-0/+7
|\ | | | | boot: Add BCD store parser
| * test: Add BCD unit testJan Janssen2021-12-1112-0/+7
| |
* | meson: Drop meson version compare for fuzz testJan Janssen2021-12-121-9/+1
|/ | | | We are depending on meson >= 0.53.2 now, so this check can be dropped.
* test: add missing section for Description=Yu Watanabe2021-12-111-0/+1
|
* test: fix grepping fixed string starts from hyphenYu Watanabe2021-12-111-1/+1
| | | | | | Follow-up for 85445fba22b2f81853a3f018ed1f28864cef37fc. Fixes #21718.
* Merge pull request #21722 from yuwata/bpf-frameworkZbigniew Jędrzejewski-Szmek2021-12-101-1/+6
|\ | | | | build: include BPF_FRAMEWORK in version string
| * test: addresses shell check warningYu Watanabe2021-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | This fixes the following warning: ----- In /github/workspace/test/units/testsuite-62.sh line 39: KERNEL_MINOR="${KERNEL_VERSION#$KERNEL_MAJOR.}" ^-----------^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns. Did you mean: KERNEL_MINOR="${KERNEL_VERSION#"$KERNEL_MAJOR".}"
| * test: skip TEST-62 if bpf-framework is not supportedYu Watanabe2021-12-101-0/+5
| | | | | | | | Fixes #21718.
* | Merge pull request #21708 from mrc0mmand/mkosi-ci-improvementsFrantisek Sumsal2021-12-102-0/+23
|\ \ | |/ |/| ci: check for failed services after boot
| * ci: check for failed services after bootFrantisek Sumsal2021-12-102-0/+23
| | | | | | | | | | This should, hopefully, catch issues like systemd/systemd#21671 automagically.
* | meson: exclude .gitattributes when using install_subdirLuca Boccassi2021-12-101-0/+18
|/ | | | | | | | | It picks the whole content of the directory by default, but we don't want to install .gitattributes files. Add it to all invocations, not just the ones on subdirs with .gitattributes, so that we don't regress in the future. Fixes #21715
* test-network: support the case that the default config files are not ↵Yu Watanabe2021-12-072-1/+21
| | | | installed yet
* test-network: add test for 6rdYu Watanabe2021-12-074-0/+285
|
* network: dhcp-pd: add 6rd supportYu Watanabe2021-12-071-0/+1
| | | | Closes #19152.
* network: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]Yu Watanabe2021-12-0711-29/+37
| | | | | | | This just changes the names of settings, variables, functions, files, and so on. No functionality is changed. Preparation for supporting 6rd.
* Merge pull request #21653 from yuwata/network-dhcp6pd-unreachable-route-cleanupsYu Watanabe2021-12-071-1/+0
|\ | | | | network: dhcp6pd: cleanups for unreachable route
| * network: dhcp6pd: always use main route table for unreachable routeYu Watanabe2021-12-071-1/+0
| | | | | | | | This mostly reverts e47bcb7d0b2cb07c5c594e374baeb061bb7f88ba.
* | network: dhcp6pd: assign addresses in the delegated prefix instead of a ↵Yu Watanabe2021-12-071-7/+5
|/ | | | subnet prefix /64 on upstream interface
* network,udev: do not adjust local assignment bit of specified MAC addressYu Watanabe2021-12-071-4/+2
| | | | | | | People often assigns the MAC address of the enslaved interface to e.g. bridge interface. So, the local assignment bit should not be adjusted. Fixes #21649.
* TEST-10: don't attempt to write a byte to the socketFranck Bui2021-12-072-3/+1
| | | | | | | | | | | | | | | | | Writing a byte to test10.socket is actually the root cause of issue #19154: depending on the timing, it's possible that PID1 closes the socket before socat (or nc, it doesn't matter which tool is actually used) tries to write that one byte to the socket. In this case writing to the socket returns EPIPE, which causes socat to exit(1) and subsequently make the test fail. Since we're only interested in connecting to the socket and triggering the rate limit of the socket, this patch removes the parts that write the single byte to the socket, which should remove the race for good. Since it shouldn't matter whether the test uses socat or nc, let's switch back to nc and hence remove the sole user of socat. The exit status of nc is however ignored because some versions might choke when the socket is closed unexpectedly.
* Merge pull request #21630 from yuwata/test-network-cleanupsYu Watanabe2021-12-061-5/+5
|\ | | | | test-network: trivial cleanups
| * test-network: start dhcpd after address is assignedYu Watanabe2021-12-061-2/+2
| |
| * test-network: make start_isc_dhcpd() take IP versionYu Watanabe2021-12-061-3/+3
| |
* | Merge pull request #21454 from bluca/inspect_elfZbigniew Jędrzejewski-Szmek2021-12-061-0/+4
|\ \ | | | | | | analyze: add inspect-elf verb to parse package metadata
| * | analyze: add inspect-elf verb to parse package metadataLuca Boccassi2021-11-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parses and prints package metadata from executables, libraries and core files $ systemd-analyze inspect-elf /tmp/core ../fsverity-utils/fsverityb /bin/bash --json=off --no-pager __________________________ path: /tmp/core elfType: coredump elfArchitecture: AMD x86-64 module name: /tmp/crash type: deb name: hello version: 1.0 architecture: amd64 os: debian osVersion: 11 buildId: b33541096a09c29a0ba4ec5c69364a2711b7c269 module name: /usr/lib/x86_64-linux-gnu/libc-2.31.so type: deb name: hello version: 1.0 architecture: amd64 os: debian osVersion: 11 buildId: 54eef5ce96cf37cb175b0d93186836ca1caf470c module name: /usr/lib/x86_64-linux-gnu/ld-2.31.so type: deb name: hello version: 1.0 architecture: amd64 os: debian osVersion: 11 buildId: 32438eb3b034da54caf58c7a65446639f7cfe274 __________________________________________________________________ path: /home/luca/git/systemd/../fsverity-utils/fsverity elfType: executable elfArchitecture: AMD x86-64 type: deb name: fsverity-utils version: 1.3-1 architecture: amd64 os: debian debugInfoUrl: https://debuginfod.debian.net buildId: 05b899e6ee0d3653e20458719b202ed3ca8d566f _________________________ path: /bin/bash elfType: executable elfArchitecture: AMD x86-64 buildId: 4fef260f60e257d2dbd4126bf8add83837aea190 $ $ systemd-analyze inspect-elf /tmp/core ../fsverity-utils/fsverity /bin/bash /tmp/core.test-condition.1000.f9b9a84a9fd1482c9702d6afa6f6934b.37640.1637083078000000 --json=pretty --no-pager { "elfType" : "coredump", "elfArchitecture" : "AMD x86-64", "/home/bluca/git/fsverity-utils/fsverity" : { "type" : "deb", "name" : "fsverity-utils", "version" : "1.3-1", "buildId" : "7c895ecd2a271f93e96268f479fdc3c64a2ec4ee" }, "/home/bluca/git/fsverity-utils/libfsverity.so.0" : { "type" : "deb", "name" : "fsverity-utils", "version" : "1.3-1", "buildId" : "b5e428254abf14237b0ae70ed85fffbb98a78f88" } } { "elfType" : "executable", "elfArchitecture" : "AMD x86-64", "/home/bluca/git/systemd/../fsverity-utils/fsverity" : { "type" : "deb", "name" : "fsverity-utils", "version" : "1.3-1", "buildId" : "7c895ecd2a271f93e96268f479fdc3c64a2ec4ee" } } { "elfType" : "executable", "elfArchitecture" : "AMD x86-64", "/bin/bash" : { "buildId" : "3313b4cb119dcce16927a9b6cc61dcd97dfc4d59" } } { "elfType" : "coredump", "elfArchitecture" : "AMD x86-64" }
* | | systemctl: support JSON output for "show-environment"Joris Hartog2021-12-061-0/+3
| |/ |/| | | | | | | | | | | | | This commit adds a function which converts a bus message containing the environment variables to a JSON object and uses this function to support JSON formatted output for the "systemctl show-environment" command. Fixes #21348
* | network: add support to configure IPoIB interfacesYu Watanabe2021-12-051-0/+3
| |
* | network/netdev: add support to create IPoIB subinterfaceYu Watanabe2021-12-042-0/+5
| |
* | Merge pull request #21585 from ↵Yu Watanabe2021-12-028-21/+119
|\ \ | | | | | | | | | | | | yuwata/network-radv-uplink-interface-auto-with-dhcp6-pd network: cleanups for uplink interface handling for RADV and DHCP6-PD
| * | test-network: re-arrange DHCP6-PD subnet IDs to test searching free subnet IDYu Watanabe2021-12-013-17/+51
| | |
| * | test-network: add testcases for uplink interface detection for RADV with ↵Yu Watanabe2021-12-016-4/+68
| | | | | | | | | | | | DHCPv6-PD
* | | test: run commands with debug level logs in TEST-65-ANALYZELuca Boccassi2021-12-011-0/+1
|/ /
* | core: add Condition[Memory/CPU/IO]PressureLuca Boccassi2021-12-012-0/+12
| | | | | | | | | | | | | | | | | | | | By default checks PSI on /proc/pressure, and causes a unit to be skipped if the threshold is above the given configuration for the avg300 measurement. Also allow to pass a custom timespan, and a particular slice unit to check under. Fixes #20139
* | Merge pull request #21288 from loongarch64/la64/mainYu Watanabe2021-12-011-0/+5
|\ \ | | | | | | Add support for the LoongArch architecture.
| * | gpt: update the gpt test case for LoongArchXiaotian Wu2021-11-301-0/+5
| | |
* | | Merge pull request #21553 from ↵Luca Boccassi2021-11-305-92/+68
|\ \ \ | |_|/ |/| | | | | | | | yuwata/network-wireguard-add-routes-to-allowed-ips network: wireguard: add routes to AllowedIPs=
| * | test-network: add tests for creating routes to wireguard's AllowedIPs=Yu Watanabe2021-12-014-92/+64
| | |
| * | network: wireguard: automatically configure routes to addresses specified in ↵Yu Watanabe2021-12-011-0/+4
| |/ | | | | | | | | | | AllowedIPs= Closes #14176.
* | Merge pull request #21580 from bluca/core_forkZbigniew Jędrzejewski-Szmek2021-11-301-1/+1
|\ \ | |/ |/| Switch coredump ELF parsing to fork+dlopen
| * elf-util: switch libelf/libdw to dlopen()Luca Boccassi2021-11-301-1/+1
| | | | | | | | | | | | In order to avoid inflating the dependency list for the core library, use dlopen when inspecting elfs, since it's only used in two non-core executables.
* | tree-wide: fix typoYu Watanabe2021-11-301-2/+2
|/
* test-network: add more basic tests for network json formatsYu Watanabe2021-11-301-0/+21
|
* Merge pull request #21541 from bluca/analyze_security_profileZbigniew Jędrzejewski-Szmek2021-11-291-0/+13
|\ | | | | analyze: add --profile switch to security verb
| * analyze: add --profile switch to security verbLuca Boccassi2021-11-261-0/+13
| | | | | | | | | | | | | | Allows to pass a portable profile when doing offline analysis of units. Especially useful for analyzing portable images, since a lot of the security-relevant settings in those cases come from the profiles, but they are not shipped in the portable images.
* | Merge pull request #21535 from yuwata/network-netdev-verify-macLuca Boccassi2021-11-271-1/+2
|\ \ | | | | | | network/netdev: verify MAC address
| * | network/netdev: verify specified MAC addressYu Watanabe2021-11-271-1/+2
| |/ | | | | | | | | | | | | Drop multicast bit and set local bit of the specified MAC address. This also makes failure in generating persistent MAC address non-critical.
* | test: create a dummy LSan suppression file in the minimal imageFrantisek Sumsal2021-11-261-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | otherwise gcc's ASan complains (unlike clang's) when the image is used - e.g. in TEST-29 or TEST-50. ``` [ 17.328705] testsuite-29.sh[361]: + portablectl --profile=trusted attach --now --runtime /usr/share/minimal_0.raw app0 ... [ 20.978649] systemd[1]: Starting app0-foo.service... [ 21.104844] kernel: loop0: detected capacity change from 0 to 24960 [ 20.999559] systemd[1]: Starting app0.service... [ 21.126022] kernel: loop1: detected capacity change from 0 to 24960 ... [ 21.861087] cat[422]: AddressSanitizer: failed to read suppressions file '/systemd-lsan.supp' [ 21.868634] cat[421]: AddressSanitizer: failed to read suppressions file '/systemd-lsan.supp' [ 21.877941] systemd[1]: app0.service: Control process exited, code=exited, status=1/FAILURE [ 21.878836] systemd[1]: app0.service: Failed with result 'exit-code'. [ 21.905712] systemd[1]: Failed to start app0.service. ``` Follow-up to f201f3447796a5424372d32b338bc3b907516c28.
* test: make test-55-oomd less flakyAnita Zhang2021-11-261-6/+28
| | | | | | | | Make oomctl a bit less likely to race with systemd-oomd receiving the managed oom cgroup info by checking oomctl output in a loop with timeout. Fixes #21146
* Merge pull request #21360 from yuwata/network-jsonZbigniew Jędrzejewski-Szmek2021-11-261-0/+18
|\ | | | | network: json: add more information