summaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test: attempt to install sshd-session from multiple placesFrantisek Sumsal2024-08-012-2/+2
| | | | | | | On Fedora the sshd-session binary is under /usr/libexec/openssh/ so cover this path as well in the old framework. Follow-up for aaa7b36bd15ca3a96a1e11a557482b0bc59c769f.
* test: add test for journalctl --list-invocations and --invocation=Yu Watanabe2024-08-012-0/+68
|
* Merge pull request #33873 from DaanDeMeyer/rename-credsDaan De Meyer2024-07-311-1/+34
|\ | | | | core: Add support for renaming credentials with ImportCredential=
| * core: Add support for renaming credentials with ImportCredential=Daan De Meyer2024-07-311-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for "per-instance" credentials for units. The use case is best explained with an example. Currently all our getty units have the following stanzas in their unit file: """ ImportCredential=agetty.* ImportCredential=login.* """ This means that setting agetty.autologin=root as a system credential will make every instance of our all our getty units autologin as the root user. This prevents us from doing autologin on /dev/hvc0 while still requiring manual login on all other ttys. To solve the issue, we introduce support for renaming credentials with ImportCredential=. This will allow us to add the following to e.g. serial-getty@.service: """ ImportCredential=tty.serial.%I.agetty.*:agetty. ImportCredential=tty.serial.%I.login.*:login. """ which for serial-getty@hvc0.service will make the service manager read all credentials of the form "tty.serial.hvc0.agetty.xxx" and pass them to the service in the form "agetty.xxx" (same goes for login). We can apply the same to each of the getty units to allow setting agetty and login credentials for individual ttys instead of globally.
| * exec-credential: Skip duplicate credentials in load_credential_glob()Daan De Meyer2024-07-311-1/+4
| | | | | | | | | | We document that when multiple credentials of the same name are found, we use the first one found so let's actually implement that behavior.
* | socket: fix socket activation of stopped services with pinned FD storeMichal Sekletar2024-07-311-0/+10
|/
* test-network: add test case for preferred source with peerYu Watanabe2024-07-302-0/+13
| | | | For issue #31950.
* Merge pull request #33857 from DaanDeMeyer/mkosiDaan De Meyer2024-07-291-0/+1
|\ | | | | Two small improvements
| * test: Don't mount build sources into image when running non-interactivelyDaan De Meyer2024-07-291-0/+1
| |
* | Merge pull request #27855 from Werkov/test-delegate-useraddfixupLuca Boccassi2024-07-261-88/+95
|\ \ | | | | | | Delegate/cgroup test refactor
| * | test: Fail cgroup delegation test when user cannot be createdMichal Koutný2024-07-261-1/+1
| | | | | | | | | | | | | | | | | | It means: a) user cannot be created, something's wrong in the test environment -> fail the test; b) user already exists, we shall not continue and delete (foreign) user.
| * | test: Reorganize testcase of cgroup delegationMichal Koutný2024-07-251-88/+95
| |/ | | | | | | | | | | There are multiple subtests, just move them around into functions (leveraging the testcase_* convention) to make space for new related subtests.
* | Merge pull request #33842 from DaanDeMeyer/testLuca Boccassi2024-07-263-11/+11
|\ \ | | | | | | Two fixes
| * | resize-fs: Put minimal ext4 size in the same ballpark as the other filesystemsDaan De Meyer2024-07-262-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | TEST-46-HOMED fails on ext4 because the filesystem is deemed to small for activation by cryptsetup. Let's bump the minimal filesystem size for ext4 a bit to be in the same ballpark as ext4 and btrfs to avoid weird errors due to impossibly small filesystems. Also use U64_MB while we're touching this.
| * | TEST-54-CREDS: Specify SMBIOS creds via corresponding mkosi optionDaan De Meyer2024-07-251-6/+6
| |/ | | | | | | | | This allows mkosi to combine fstab.extra with its own fstab.extra so that it doesn't override the one we pass for the test.
* | Merge pull request #33840 from bluca/test_locale_dbusLuca Boccassi2024-07-251-8/+3
|\ \ | | | | | | test: fix D-Bus policy override for TEST-73-LOCALE
| * | test: fix D-Bus policy override for TEST-73-LOCALELuca Boccassi2024-07-251-8/+3
| |/ | | | | | | | | | | | | We don't need to allow non-root, and the policy needs to specify destination and interface too, to narrow it down Follow-up for 7b5c38a91def6cf236605010a0a93a1cd4c137e9
* | Merge pull request #33727 from intelfx/work/analyze-capability-masksLuca Boccassi2024-07-251-0/+9
|\ \ | |/ |/| analyze: capability: add support for decoding capability masks
| * analyze: capability: add support for decoding capability masksIvan Shapovalov2024-07-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support in `systemd-analyze capability` for decoding capability masks (sets), e.g.: ```console $ systemd-analyze capability --mask 0000000000003c00 NAME NUMBER cap_net_bind_service 10 cap_net_broadcast 11 cap_net_admin 12 cap_net_raw 13 ``` This is intended as a convenience tool for pretty-printing capability values as found in e.g. `/proc/$PID/status`.
* | test: systemd-networkd-tests: add fdb learned testsGregor Herburger2024-07-222-0/+5
| | | | | | | | | | | | | | Add a test for the new bridge netlink attributes IFLA_BR_FDB_N_LEARNED and IFLA_BR_FDB_MAX_LEARNED. Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
* | test-execute: ExecStop= and friends should not get credentialsMike Yuan2024-07-211-2/+2
| | | | | | | | See #32583
* | test: override blocking localed policy in TEST-73-LOCALELuca Boccassi2024-07-211-0/+23
| | | | | | | | | | On Debian and derivatives writing calls to localed are blocked as other tools are used to change settings, override that policy for the tests
* | mkosi: Streamline running the integration tests without building systemdDaan De Meyer2024-07-181-1/+30
| | | | | | | | | | | | | | | | | | | | Let's document in detail how to build the integration test image and run the integration tests without building systemd. To streamline the process, we stop automatically using binaries from build/ when invoking mkosi directly and don't automatically use a tools tree anymore if systemd on the host is too old. Instead, we document these options in HACKING.md and change the mkosi meson target to automatically use the current build directory as an extra binary search path for mkosi.
* | Merge pull request #33752 from DaanDeMeyer/lsmDaan De Meyer2024-07-171-1/+1
|\ \ | | | | | | Two mkosi improvements
| * | mkosi: Remove enforcing=0 from default kernel command lineDaan De Meyer2024-07-171-1/+1
| | | | | | | | | | | | | | | | | | We already have selinux=0 in the default kernel command line so enforcing=0 is redundant. Instead, pass in enforcing=0 when we enable selinux in TEST-06-SELINUX.
* | | id128: add 'var-partition-uuid' verbLuca Boccassi2024-07-171-0/+2
|/ / | | | | | | | | | | | | As per DPS the UUID for /var/ should be keyed by the local machine-id, which is non-trivial to do in a script. Enhance 'systemd-id128' to take 'var-partition-uuid' as a verb, and if so perform the calculation.
* | Merge pull request #33695 from DaanDeMeyer/epelDaan De Meyer2024-07-165-10/+23
|\ \ | | | | | | mkosi: Add CI for CentOS Stream 10
| * | TEST-13-NSPAWN: make sure we don't load libnss_systemdDaan De Meyer2024-07-161-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Let's make sure we don't load libnss_systemd.so from bash as the necessary environment variables aren't set to make that work when we're running with sanitizers enabled. We can't add a sanitizer wrapper for bash as the wrapper runs using bash so you end up in a loop.
| * | systemd-networkd-tests: Skip tests requiring dhcpd if it is not availableDaan De Meyer2024-07-151-0/+3
| | | | | | | | | | | | | | | | | | dhcpd is not available on CentOS Stream 10 See https://github.com/systemd/systemd/issues/33717
| * | TEST-55-OOMD: Remove the opensuse user@ dropinDaan De Meyer2024-07-151-0/+3
| | | | | | | | | | | | Required to make TEST-55-OOMD pass on OpenSUSE.
| * | TEST-64-UDEV-STORAGE: Use max_ioqpairs instead of num_queuesDaan De Meyer2024-07-151-1/+1
| | | | | | | | | | | | Fixes a deprecation warning from qemu.
| * | test: do not attempt to set xattr on tmpfsDaan De Meyer2024-07-151-7/+8
| |/ | | | | | | | | This is only possible since a recent kernel version, and fails otherwise, like on CentOS 9
* | core/unit: ignore dropins for masked units completely when checking need_reloadMike Yuan2024-07-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up for 19a44dfe4525ab01caf593a9c2beada4b412910d If a drop-in is set from upper level, e.g. global unit_type.d/, even if a unit is masked, its dropin_paths would still be partially populated. However, unit_need_daemon_reload() would always compare u->dropin_paths with empty strv in case of masked units, resulting in it always returning true. Instead, let's ignore dropins entirely here. Fixes #33672
* | test: add a reproducer for #33672David Tardon2024-07-121-0/+41
|/
* Merge pull request #33636 from DaanDeMeyer/ext4Daan De Meyer2024-07-1011-31/+23
|\ | | | | Various integration test improvements
| * TEST-06-SELINUX: Various fixesDaan De Meyer2024-07-101-1/+1
| | | | | | | | | | | | | | | | - Stop installing the policy in the initramfs as it's not really supported anyway (https://github.com/fedora-selinux/selinux-policy/issues/2221) - Stop relabeling on first boot and prefer to do it at image build time - Disable mkosi relabeling by default but enable it in CI - Build image as root in CI so the SELinux relabeling works properly
| * test: Switch to ncat instead of ncDaan De Meyer2024-07-106-18/+18
| | | | | | | | ncat is available in CentOS Stream 9 without having to enable EPEL.
| * TEST-55-OOMD: Switch to stress-ngDaan De Meyer2024-07-104-12/+4
| | | | | | | | | | stress-ng is available in OpenSUSE and in CentOS Stream without needing EPEL so let's switch to it instead of stress.
* | mount-tool: show diskseq in --list outputLennart Poettering2024-07-101-1/+1
| | | | | | | | Let's expose the diskseq a bit more prominently.
* | mount-tool: add support for a --json= output modeLennart Poettering2024-07-101-0/+1
|/ | | | Let's add a JSON output mode, like we have it for so many of our tools.
* test: install split-out sshd-session binary if presentLuca Boccassi2024-07-092-0/+2
| | | | | Archlinux split out one ssh binary, install it in the legacy test setup if present for the tests that need ssh
* mkosi: Adapt configuration to take into account configuration reworkDaan De Meyer2024-07-091-4/+2
| | | | | | | | | | | | | | | | | In https://github.com/systemd/mkosi/pull/2847, the '@' specifier is removed, CLI arguments take priority over configuration files again and the "main" image is defined at the top level instead of in mkosi.images/. Additionally, not every setting from the top level configuration is inherited by the images in mkosi.images/ anymore, only settings which make sense to be inherited are inherited. This commit gets rid of all the usages of '@', moves the "main" image configuration from mkosi.images/system to the top level and gets rid of various hacks we had in place to deal with quirks of the old configuration parsing logic. We also remove usages of Images= and --append as these options are removed by the mentioned PR.
* test: Set priority for TEST-73-LOCALEDaan De Meyer2024-07-061-0/+1
| | | | | | I don't know why yet, but TEST-73-LOCALE can take more than 10 minutes. Until we figure out why, let's give it a higher priority so it doesn't bottleneck the test run.
* TEST-06-SELINUX: Disable RuntimeBuildSources=Daan De Meyer2024-07-051-0/+3
| | | | | | Otherwise fixfiles will try to relabel it which could potentially lead to disaster. We also change the recommendation in HACKING.md to set the default so that TEST-06-SELINUX can override it.
* test: Add missing --no-rebuild to docDaan De Meyer2024-07-051-4/+4
| | | | Otherwise meson will try to rebuild all targets.
* sysusers: handle NSS errors gracefullyLuca Boccassi2024-07-041-0/+24
| | | | | | | | | | | | | If the io.systemd.DynamicUser or io.systemd.Machine files exist, but nothing is listening on them, the nss-systemd module returns ECONNREFUSED and systemd-sysusers fails to creat the user/group. This is problematic when ran by packaging scripts, as the package assumes that after this has run, the user/group exist and can be used. adduser does not fail in the same situation. Change sysusers to print a loud warning but otherwise continue when NSS returns an error.
* os-util: avoid matching on the wrong extension-release fileLuca Boccassi2024-07-041-0/+11
| | | | | | | | | | The previous commit tries to extract a substring from the extension-release suffix, but that is not right, it's only the images that need to be versioned and extracted, use the extension-release suffix as-is. Otherwise if it happens to contain a prefix that matches the wrong image, it will be taken into account. Follow-up for 37543971aff79f3a37646ffc2bb5845c9394797b
* test: skip TEST-69-SHUTDOWN on DebianLuca Boccassi2024-07-041-0/+7
| | | | | There is a regression in the login package, skip the test until it is fixed. https://bugs.debian.org/1075733
* Merge pull request #33577 from fbuihuu/testsuite-tweaks-for-v256-on-SUSELuca Boccassi2024-07-023-2/+8
|\ | | | | Testsuite tweaks for v256 on suse
| * test: fix TEST-74-AUX-UTILS.ssh.sh on SUSEFranck Bui2024-07-021-1/+4
| |