summaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: fix access mode of root inode of throw-away container imagesLennart Poettering44 hours1-0/+1
| | | | | | Otherwise the root inode will typically have what mkdtemp sets up, which is something like 0700, which is weird and somewhat broken when trying to look into containers from unpriv users.
* machine: increase timeouts in attempt to fix #35115 (#35117)Luca Boccassi3 days1-3/+8
|\ | | | | | | | | An attempt to fix https://github.com/systemd/systemd/issues/35115
| * machine: add debug for systemd-nspawn@.serviceIvan Kruglov10 days1-0/+5
| |
| * machine: increase timeouts in attempt to fix #35115Ivan Kruglov10 days1-3/+3
| |
* | test: Use env in testsuite readmeDaan De Meyer4 days1-5/+5
| | | | | | | | | | Let's make sure we use env when we're setting environment variables to rely less on shell specifics.
* | core/device: ignore ID_PROCESSING udev property on enumerate (#35332)Zbigniew Jędrzejewski-Szmek4 days1-0/+71
|\ \ | | | | | | Fixes #35329.
| * | TEST-17: add reproducer for issue #35329Yu Watanabe4 days1-0/+71
| | | | | | | | | | | | Without the previous commit, the test case will fail.
* | | Check inode number to see if we are in init namespace (#35306)Zbigniew Jędrzejewski-Szmek4 days1-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a more comprehensive fix compared to #35273. Also adds a minimal test only. Based on Luca's #35273 but generalizes the code a bit. In v258 we really should get rid of the old heuristics around userns and cgroupns detection, but given we are late in the v257 cycle this keeps them in.
| * | | detect-virt: check the inode number of the pid namespaceLuca Boccassi7 days1-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The indoe number of root pid namespace is hardcoded in the kernel to 0xEFFFFFFC since 3.8, so check the inode number of our pid namespace if all else fails. If it's not 0xEFFFFFFC then we are in a pid namespace, hence a container environment. Fixes https://github.com/systemd/systemd/issues/35249 [Reworked by Lennart, to make use of namespace_is_init()]
* | | | test: Dump coredumps from journal in the integration test wrapperDaan De Meyer4 days8-37/+98
| | | | | | | | | | | | | | | | Fixes #35277
* | | | networkd-test.py: disable IPv6AcceptRA= if not necessaryYu Watanabe4 days1-3/+16
| |/ / |/| | | | | | | | | | | To speed up the test. Otherwise, it takes about few seconds interfaces to enter the configured state. And may networkd-wait-online timeouts.
* | | test: mask tmpfiles.d file shipped by selinux policy package in containersLuca Boccassi4 days1-0/+8
| | | | | | | | | | | | | | | | | | | | | This tmpfiles.d wants to write to sysfs, which is read-only in containers, so systemd-tmpfiles --create fails in TEST-22-TMPFILES when ran in nspawn if the selinux policy package is instealled. Mask it, as it's not our config file, we don't need it in the test.
* | | test: Fix typing errors in integration-test-wrapper.pyDaan De Meyer5 days1-2/+3
| | |
* | | test: Format integration-test-wrapper.pyDaan De Meyer5 days1-63/+77
| | |
* | | integration-test-wrapper: Remove unneeded format stringsDaan De Meyer5 days1-2/+2
| | |
* | | networkd-test.py: fix interface state checkerYu Watanabe6 days1-2/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | After 259125d53d98541623b69e83000b5543f2352f5e, network interfaces declared by .netdev files are created after systemd-networkd sends READY notification. So, even when networkd is started, the netdevs may not be created yet, and 'ip' command may fail. Let's also check the return code of the command. This also - drops never worked stdout checks, - makes the test fail if the interface is not created within the timeout.
* | test-network: actually check metric and preferenceYu Watanabe9 days1-2/+2
| | | | | | | | | | | | | | | | | | Otherwise, nexthop ID may contain e.g. 300, then === AssertionError: '300' unexpectedly found in 'default nhid 3860882700 via fe80::1034:56ff:fe78:9a99 proto ra metric 512 expires 1798sec pref high\n default nhid 2639230080 via fe80::1034:56ff:fe78:9a98 proto ra metric 2048 expires 1798sec pref low' ===
* | core/exec-invoke: suppress placeholder home only in build_environment() (#35219)Yu Watanabe9 days1-0/+20
|\ \ | |/ |/| | | Alternative to https://github.com/systemd/systemd/pull/34789 Closes #34789
| * core/exec-invoke: suppress placeholder home only in build_environment()Mike Yuan10 days1-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, get_fixed_user() employs USER_CREDS_SUPPRESS_PLACEHOLDER, meaning home path is set to NULL if it's empty or root. However, the path is also used for applying WorkingDirectory=~, and we'd spuriously use the invoking user's home as fallback even if User= is changed in that case. Let's instead delegate such suppression to build_environment(), so that home is proper initialized for usage at other steps. shell doesn't actually suffer from such problem, but it's changed too for consistency. Alternative to #34789
* | test-network: add test case for IPv6 Core Conformance test v6LC.2.2.23Yu Watanabe11 days1-0/+18
| |
* | test-network: split out check_router_preference() from test_router_preference()Yu Watanabe11 days3-90/+32
|/ | | | | This also drop high2.network and low2.network, and edit high.network and low.network during the test.
* test: ignore inconsistent coverage errorsFrantisek Sumsal14 days1-4/+4
| | | | | | | | | | | | | | | | | | | | | | | lcov 2.1 introduced additional consistency checks [0] which make it trip over our coverage results quite often: Summary coverage rate: source files: 915 lines.......: 36.9% (78950 of 214010 lines) functions...: 53.3% (6906 of 12949 functions) Message summary: 73 warning messages: inconsistent: 73 lcov: ERROR: (corrupt) unable to read trace file '/var/tmp/systemd-test-TEST-04-JOURNAL/coverage-info.new': lcov: ERROR: (inconsistent) "/build/src/shutdown/umount.c":298: function 'umount_with_timeout' is not hit but line 317 is. To skip consistency checks, see the 'check_data_consistency' section in man lcovrc(5). (use "lcov --ignore-errors inconsistent ..." to bypass this error) (use "lcov --ignore-errors corrupt ..." to bypass this error) This is caused by coverage collected during shutdown which is a bit unreliable, especially towards the final shutdown stage(s). Let's just ignore the consistency errors for now. [0] https://github.com/linux-test-project/lcov/releases/tag/v2.2
* test: skip TEST-84-STORAGETM if running with bugged libnvmeLuca Boccassi2024-11-141-0/+8
| | | | | | | | | | | | | | libnvme 1.11 appears to require a kernel built with NVME TLS kconfigs, and fails hard if it is not, as the expected privileged keyring '.nvme' is not present. We cannot just create it from userspace, as privileged keyrings can only be created by the kernel itself (those starting with '.'). Skip the test if the library exactly matches this version. https://github.com/linux-nvme/nvme-cli/issues/2573 Fixes https://github.com/systemd/systemd/issues/35130
* nspawn: several follow-ups for recent changes (#35146)Yu Watanabe2024-11-142-0/+54
|\ | | | | Closes #35116.
| * TEST-13-NSPAWN: add test case for /dev/net/tunYu Watanabe2024-11-142-0/+54
| | | | | | | | For issue #35116.
* | network/ndisc: fix coalescing of ndisc routes when multiple router exists ↵Yu Watanabe2024-11-141-21/+81
|\ \ | | | | | | | | | | | | (#35119) Fixes #33470.
| * | network/ndisc: dynamically configure nexthops when routes with gateway are ↵Yu Watanabe2024-11-141-21/+81
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | requested Previously, when multiple routers send RAs with the same preference, then the kernel merges routes with the same gateway address: === default proto ra metric 1024 expires 595sec pref medium nexthop via fe80::200:10ff:fe10:1060 dev enp0s9 weight 1 nexthop via fe80::200:10ff:fe10:1061 dev enp0s9 weight 1 === This causes IPv6 Conformance Test v6LC.2.2.11 failure, as reported in #33470. To avoid the coalescing issue, we can use nexthop, as suggested by Ido Schimmel: https://lore.kernel.org/netdev/ZytjEINNRmtpadr_@shredder/ > BTW, you can avoid the coalescing problem by using the nexthop API. > # ip nexthop add id 1 via fe80::200:10ff:fe10:1060 dev enp0s9 > # ip -6 route add default nhid 1 expires 600 proto ra > # ip nexthop add id 2 via fe80::200:10ff:fe10:1061 dev enp0s9 > # ip -6 route append default nhid 2 expires 600 proto ra > # ip -6 route > fe80::/64 dev enp0s9 proto kernel metric 256 pref medium > default nhid 1 via fe80::200:10ff:fe10:1060 dev enp0s9 proto ra metric 1024 expires 563sec pref medium > default nhid 2 via fe80::200:10ff:fe10:1061 dev enp0s9 proto ra metric 1024 expires 594sec pref medium Fixes #33470. Suggested-by: Ido Schimmel <idosch@idosch.org>
* | network/netdev: follow-ups for reloading .netdev files (#34979)Luca Boccassi2024-11-142-11/+133
|\ \ | |/ |/| Follow-ups for #34909.
| * networkd-test.py: show current status when wait-online failedYu Watanabe2024-11-141-6/+25
| | | | | | | | For easier debugging on failure.
| * test-network: add tests for reloading .netdev files for independent netdevsYu Watanabe2024-11-141-5/+108
| |
* | test-network: update KeepConfiguration=dhcp -> dynamicYu Watanabe2024-11-143-7/+7
|/
* test-network: several cleanupsYu Watanabe2024-11-121-46/+43
| | | | | | | | - fix verifiers in test_router_preference() to make them actually check if unnecessary routes are removed, - stop radv in test_ndisc_vs_static_route() before checking if the static route is preserved even when the router sends a RA with zero lifetime, - make verifiers in NetworkdIPv6PrefixTests stricter.
* network: forget IPv4 non-local routes when an interface went down (#35099)Yu Watanabe2024-11-114-3/+70
|\ | | | | Fixes #35047.
| * test-network: add test case for issue #35047Yu Watanabe2024-11-114-0/+60
| |
| * network/nexthop: do not remove depending nexthops when a nexthop is removedYu Watanabe2024-11-111-3/+10
| | | | | | | | | | Previously, when a nexthop is removed, depending nexthops were removed, but that's not necessary, as the kernel keeps them, at least with v6.11.
* | Introduce systemd-keyutil to do various key/certificate operations (#35095)Lennart Poettering2024-11-112-4/+50
|\ \ | |/ |/| | | | | | | | | Let's gather generic key/certificate operations in a new tool systemd-keyutil instead of spreading them across various special purpose tools. Fixes #35087
| * Introduce systemd-keyutil to do various key/certificate operationsDaan De Meyer2024-11-082-4/+50
| | | | | | | | | | | | | | | | Let's gather generic key/certificate operations in a new tool systemd-keyutil instead of spreading them across various special purpose tools. Fixes #35087
* | test-network: reconfigure interface cleanly to drop previous DHCP lease and ↵Yu Watanabe2024-11-111-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | friends Follow-up for 451c2baf30f50b95d73e648058c7c2348dbf0c31. With the commits, reloading .network files does not release previously acquired DHCP lease and friends if possible. On graceful reconfigure triggered by the reload, the interface may acquire a new DHCPv4 lease earlier than DHCPv6 lease. In that case, the check will fail as it is done with the new DHCPv4 lease and old DHCPv6 lease, which does not contain any IPv6 DNS servers or so. So, when switching from no -> yes, we need to wait a new lease with DNS servers or so. To achieve that, we need to clean reconfigure the interface.
* | network: reset 'configured' flags even if we keep DHCP lease and friends on ↵Yu Watanabe2024-11-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reconfigure Follow-up for 451c2baf30f50b95d73e648058c7c2348dbf0c31. With the commits, reloading .network files does not release previously acquired DHCP lease and friends if possible. If previously a DHCP client was configured as not requesting DNS servers or so, then the previously acquired lease might not contain any DNS servers. In that case, if the new .network file enables UseDNS=, then the interface should enter the configured state after a new lease is acquired. To achieve that, we need to reset the flags. With this change, the workaround applied to the test by the commit 451c2baf30f50b95d73e648058c7c2348dbf0c31 can be dropped.
* | test: install integration-test-setup.sh in testdata/Franck Bui2024-11-082-7/+9
|/ | | | | | | integration-test-setup.sh is an auxiliary script that tests rely on at runtime. As such, install the script in testdata/. Follow-up for af153e36ae67c242251951c12d6d6b6ae4783845.
* Fix PrivatePIDs=yes integration test for kernels with no /proc/scsiRyan Wilson2024-11-081-5/+16
|
* Introduce systemd-sbsign to do secure boot signing (#35021)Daan De Meyer2024-11-061-0/+60
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently in mkosi and ukify we use sbsigntools to do secure boot signing. This has multiple issues: - sbsigntools is practically unmaintained, sbvarsign is completely broken with the latest gnu-efi when built without -fshort-wchar and upstream has completely ignored my bug report about this. - sbsigntools only supports openssl engines and not the new providers API. - sbsigntools doesn't allow us to cache hardware token pins in the kernel keyring like we do nowadays when we sign stuff ourselves in systemd-repart or systemd-measure There are alternative tools like sbctl and pesign but these do not support caching hardware token pins in the kernel keyring either. To get around the issues with sbsigntools, let's introduce our own tool systemd-sbsign to do secure boot signing. This allows us to take advantage of our own openssl infra so that hardware token pins are cached in the kernel keyring as expected and we get openssl provider support as well.
| * sbsign: Add validate-key verbDaan De Meyer2024-11-061-0/+4
| | | | | | | | This verb checks that we can load the specified private key.
| * Introduce systemd-sbsign to do secure boot signingDaan De Meyer2024-11-061-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently in mkosi and ukify we use sbsigntools to do secure boot signing. This has multiple issues: - sbsigntools is practically unmaintained, sbvarsign is completely broken with the latest gnu-efi when built without -fshort-wchar and upstream has completely ignored my bug report about this. - sbsigntools only supports openssl engines and not the new providers API. - sbsigntools doesn't allow us to cache hardware token pins in the kernel keyring like we do nowadays when we sign stuff ourselves in systemd-repart or systemd-measure There are alternative tools like sbctl and pesign but these do not support caching hardware token pins in the kernel keyring either. To get around the issues with sbsigntools, let's introduce our own tool systemd-sbsign to do secure boot signing. This allows us to take advantage of our own openssl infra so that hardware token pins are cached in the kernel keyring as expected and we get openssl provider support as well.
* | networkd: add possibility to specify MulticastIGMPVersionMichele Dionisio2024-11-062-0/+2
| |
* | machine: tests for io.systemd.Machine.OpenIvan Kruglov2024-11-061-0/+19
| |
* | network: reconfigure interface more gracefully (#35035)Yu Watanabe2024-11-061-0/+1
|\ \ | | | | | | split-out of #34989.
| * | network: keep dynamic configurations as possible as we can on reconfigureYu Watanabe2024-11-051-0/+1
| |/ | | | | | | | | | | | | | | | | | | E.g. when a .network file is updated, but DHCP setting is unchanged, it is not necessary to drop acquired DHCP lease. So, let's not stop DHCP client and friends in link_reconfigure_impl(), but stop them later when we know they are not necessary anymore. Still DHCP clients and friends are stopped and leases are dropped when the explicit reconfiguration is requested
* | test: delete /swapfile after swapoffLuca Boccassi2024-11-051-0/+1
| | | | | | | | | | [ 23.608342] TEST-55-OOMD.sh[689]: + btrfs filesystem mkswapfile -s 64M /swapfile [ 23.651930] TEST-55-OOMD.sh[704]: ERROR: cannot create new swapfile: File exists
* | Add PrivatePIDs= (continued) (#34940)Luca Boccassi2024-11-052-0/+166
|\ \ | |/ |/|