summaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
| * test: preserve symlink in inst_recursive()Franck Bui2024-07-021-0/+2
| | | | | | | | | | On SUSE this function is used to copy symlinks installed in *.wants/ directories.
| * test: fix TEST-24-CRYPTSETUP on SUSEFranck Bui2024-07-021-1/+1
| | | | | | | | /etc/systemd/journald.conf.d drop-in dir already exists on SUSE.
| * test: install /etc/hostsFranck Bui2024-07-021-0/+1
| | | | | | | | Needed for resolving the "localhost" hostname.
* | test: split the resolved test suite into separate test casesDaniel Rusek2024-07-021-660/+721
| | | | | | | | | | | | Although being far from ideal and the first two test cases have to be run before the setup phase otherwise they will fail, it still makes the test suite look much better and easier to read
* | storagetm: add --list-devices commandLennart Poettering2024-07-011-0/+2
| |
* | repart: add --list-devices switch for listing candidate block devicesLennart Poettering2024-07-011-0/+4
| |
* | cryptenroll: add --list-devices switch that shows candidate block devicesLennart Poettering2024-07-011-0/+2
| |
* | Merge pull request #33518 from DaanDeMeyer/aarch64Luca Boccassi2024-06-2912-14/+27
|\ \ | | | | | | Various integration test fixes
| * | TEST-54-CREDS: Use UEFI firmware if availableDaan De Meyer2024-06-281-0/+1
| | | | | | | | | | | | | | | | | | On aarch64, SMBIOS is only available when using UEFI, so let's make sure that the creds test uses UEFI when available so that it can read creds from SMBIOS when running in a virtual machine.
| * | TEST-18-FAILUREACTION: Set auto firmwareDaan De Meyer2024-06-281-0/+3
| | | | | | | | | | | | | | | | | | This test runs in nspawn by default but will still run in qemu when tests are run unprivileged so make sure we use UEFI if available to avoid hangs when using the linux firmware.
| * | TEST-09-REBOOT: Set auto firmwareDaan De Meyer2024-06-281-0/+3
| | | | | | | | | | | | | | | | | | This test runs in nspawn by default but will still run in qemu when tests are run unprivileged so make sure we use UEFI if available to avoid hangs when using the linux firmware.
| * | TEST-06-SELINUX: Explicitly pull in autorelabel.serviceDaan De Meyer2024-06-281-1/+1
| | |
| * | TEST-70-TPM2: Use UEFI firmware if availableDaan De Meyer2024-06-281-0/+1
| | | | | | | | | | | | | | | | | | On x86 this doesn't matter but on aarch64 we need to make sure UEFI is used so that /sys/kernel/security/tpm0/binary_bios_measurements is there which is required for TEST-70-TPM2.
| * | TEST-45-TIMEDATE: Use syslog identifier journalctl matchDaan De Meyer2024-06-281-2/+2
| | | | | | | | | | | | | | | Using a unit match is racy whereas a syslog identifier match is reliable.
| * | TEST-64-UDEV-STORAGE: Make nvme_subsystem expected pci symlinks more genericDaan De Meyer2024-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running the test on aarch64 the symlinks look as follows: """ [root@H ~]# ls /dev/disk/by-path platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0 platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part1 platform-4010000000.pcie-pci-0000:00:05.0-nvme-16 platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part2 platform-4010000000.pcie-pci-0000:00:05.0-nvme-17 """ So let's make the PCI patterns a little more generic so they match both the x86 and the aarch64 paths.
| * | test: pull in multi-user.target explicitlyDaan De Meyer2024-06-281-0/+6
| | | | | | | | | | | | | | | Let's make sure we pull in multi-user.target so that we get a console when a test fails and we're running meson test with --interactive.
| * | TEST-64-UDEV-STORAGE: Fix python 3.9 compatibilityDaan De Meyer2024-06-283-6/+6
| | | | | | | | | | | | | | | | | | | | | Using double quotes in f-strings only works from python 3.12 onwards. Use single quotes to make sure python 3.9 works as well. Also clean up quotes a little in general.
| * | TEST-64-UDEV-STORAGE: Use bus pci slot 1 instead of 0Daan De Meyer2024-06-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to use bus pci slot 0 fails on aarch64 so let's use 1 instead. The error: """ qemu-system-aarch64: -device virtio-blk-pci,drive=drive0,scsi=off,bus=pci_bridge25: Unsupported PCI slot 0 for standard hotplug controller. Valid slots are between 1 and 31. """
* | | Merge pull request #33517 from keszybz/a-few-unrelated-cleanupsLuca Boccassi2024-06-281-3/+4
|\ \ \ | | | | | | | | A few unrelated cleanups
| * | | TEST-58-REPART: reverse order of diff argsZbigniew Jędrzejewski-Szmek2024-06-281-3/+4
| |/ / | | | | | | | | | | | | | | | | | | I expect the test output to be the second argument, so we're diffing "expected" and "output", not the other way around. I noticed this when working on https://github.com/systemd/systemd/pull/33081.
* / / core: deduplicate identical dm-verity ExtensionImages=Luca Boccassi2024-06-282-0/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out OverlayFS doesn't handle gracefully when the same source is specified multiple times in lowerdir= and it fails with ELOOP: Failed to mount overlay (type overlay) on /run/systemd/mount-rootfs/opt (MS_RDONLY "lowerdir=/run/systemd/unit-extensions/1/opt:/run/systemd/unit-extensions/0/opt:/run/systemd/mount-rootfs/opt"): Too many levels of symbolic links This happens even if we mount each image in a different internal mount path, as OverlayFS will resolve it and look for the backing device, which will be the same device mapper entity, and return a hard error. This error does not appear if dm-verity is not used, so it is very confusing for users, and unnecessary. When mounting ExtensionImages, check if an image is dm-veritied, and drop duplicates if the root hashes match, to avoid this user-unfriendly hard error.
* | ci: add simple test for the new "ssh-exec:" varlink logicLennart Poettering2024-06-271-2/+21
| |
* | tmpfiles: use common macro for a set of specifiersMatthias Lisin2024-06-261-0/+28
| | | | | | | | | | | | This adds %q, %A and %M specifiers to tmpfiles: - %A and %M were previously added to tmpfiles.d man page, but not to specifier_table - %q is added via COMMON_SYSTEM_SPECIFIERS
* | Merge pull request #33451 from yuwata/core-exec-use-writeLuca Boccassi2024-06-251-0/+11
|\ \ | | | | | | core: use write() instead of send()
| * | test-execute: add a test case for issue #33299Yu Watanabe2024-06-241-0/+11
| | |
* | | Merge pull request #33450 from ↵Luca Boccassi2024-06-252-0/+38
|\ \ \ | | | | | | | | | | | | | | | | yuwata/network-ndisc-do-not-override-static-routes network/NDisc: do not override static routes
| * | | test-network: check if static routes not overridden by NDisc routesYu Watanabe2024-06-242-0/+38
| | | |
* | | | Merge pull request #33003 from poettering/repart-progressLennart Poettering2024-06-251-0/+20
|\ \ \ \ | | | | | | | | | | repart: draw progress bar during CopyBlocks= operation and other tweaks
| * | | | ci: add small test case for /dev/urandom as source for CopyBlocks=Lennart Poettering2024-06-251-0/+20
| | |/ / | |/| |
* | | | Merge pull request #33078 from poettering/import-generatorLennart Poettering2024-06-251-1/+20
|\ \ \ \ | | | | | | | | | | importd: add import generator
| * | | | ci: add test for importd varlink interface + import generatorLennart Poettering2024-06-251-1/+20
| |/ / /
* / / / mkosi: add support for TEST_SAVE_JOURNAL to integration test wrapperLuca Boccassi2024-06-251-4/+5
|/ / / | | | | | | | | | Same variable and values as supported by the shell suite
* | | Merge pull request #33042 from poettering/machined-unprivLuca Boccassi2024-06-241-1/+1
|\ \ \ | | | | | | | | machined: unprivileged machine registration
| * | | vmspawn: by default, let machined register a cgroup for VMsLennart Poettering2024-06-211-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | This mimics what we do in nspawn: if registration is enabled we'll let machined allocate a scope unit for us. When --keep-unit is used we'll register without creating a new scope. This brings behaviour more inline with what nspawn does, exposing the same sets of options.
* / / test: add some superficial integration testsLennart Poettering2024-06-212-0/+4
|/ /
* | Merge pull request #33430 from YHNdnzj/buserror-notifyLennart Poettering2024-06-202-2/+37
|\ \ | | | | | | core/service: store BUSERROR= & VARLINKERROR= received and show them through systemctl status
| * | TEST-80-NOTIFYACCESS: introduce test for ERRNO= + BUS/VARLINKERROR=Mike Yuan2024-06-202-2/+37
| | |
* | | ci: test new --graceful= switch of varlinkctlLennart Poettering2024-06-202-6/+6
|/ /
* | bootctl: normalize how we report no boot entries foundLennart Poettering2024-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This normalizes how we report an empty list of boot entries in ListBootEntries(). Our usual pattern is to return one item per method call, but when there is none we usually return a NoSuchXYZ error. Do so here too. Before this we'd return a null item instead here, and only here. This is a minor compat break, but given that this IPC interface is very new and probably not used so far (we don't use it in our code at least, and google doesn#t find any other use) I think this normalization is OK at this point.
* | varlink-idl: allow unbalanced quote and trailing backslash in commentYu Watanabe2024-06-191-0/+2
| | | | | | | | | | | | Fixes #33381. Fixes OSS-FUZZ#69730. Follow-up for fbb69c0306d434153ca85b227c7d42b9c92872e4.
* | install: allow removing symlinks even for units that are goneLuca Boccassi2024-06-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | If a symlink is leftover, still allow cleaning it up via 'disable'. This happens when a unit is stopped and removed, but not disabled, and a reload has already happened. At that point, cleaning up the old symlinks becomes impossible through the APIs, and needs to be done manually. Always allow cleaning up symlinks, if they exist, by only erroring out if there is an OOM. Follow-up for f31f10a6207efc9ae9e0b1f73975b5b610914017
* | Merge pull request #33359 from bluca/test_apparmor_unprivLuca Boccassi2024-06-185-11/+9
|\ \ | | | | | | mkosi: enable unprivileged user ns for integration tests
| * | test: use 'auto' instead of 'uefi' for automated fallbackLuca Boccassi2024-06-171-1/+2
| | | | | | | | | | | | | | | mkosi will prefer UEFI if the architecture supports it, but fallback to 'linux' if it doesn't.
| * | test: support TEST_NO_QEMU in mkosi integration wrapperLuca Boccassi2024-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | Same as the old integration test suite, allow skipping tests that require qemu. ppc64el's vsock support doesn't appear to work, so we'll skip it, as it is already done in the legacy framework.
| * | test: support TEST_NO_KVMLuca Boccassi2024-06-171-0/+1
| | | | | | | | | | | | | | | The shell integration suite allows to manually deselect KVM, so suppor the same env var for the same purpose in python.