summaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #32475 from bluca/skipLuca Boccassi2024-04-253-10/+5
|\ | | | | test: skip testsuite-50.mountnfsd if kernel/polkit are too old
| * test: skip testsuite-50.mountnfsd if kernel/polkit are too oldLuca Boccassi2024-04-252-1/+4
| | | | | | | | | | Need full support of pidfd to work, so skip the test if it's not available
| * test: use sd-analyze for kernel version check in TEST-62Luca Boccassi2024-04-251-9/+1
| |
* | test: Skip meson integration tests if SYSTEMD_INTEGRATION_TESTS != 1Daan De Meyer2024-04-253-44/+42
| | | | | | | | | | | | | | | | | | We cannot mark a test suite as excluded by default in meson. Instead, let's require that SYSTEMD_INTEGRATION_TESTS=1 and skip any integration test if it's not set. This is effectively the same as excluding it by default. If the integration-test option is enabled, we'll set the environment variable by default, just like we do with SYSTEMD_SLOW_TESTS and the slow-tests meson option.
* | manager: switch service unit type over to using new handoff timestamping logicLennart Poettering2024-04-251-3/+3
|/ | | | | | Also: rename Handover → Handoff. I think it makes it clearer that this is not really about handing over any resources, but that the executor is out off the game from that point on.
* Merge pull request #32465 from CodethinkLabs/mkosi-debugDaan De Meyer2024-04-241-0/+1
|\ | | | | mkosi: Build images and run mkosi tests with --debug to aid debugging in CI
| * test: Add --debug when running mkosi through integration-test-wrapperRichard Maw2024-04-241-0/+1
| |
* | TEST-50-DISSECT: Skip mutable sysext tests on virtiofsDaan De Meyer2024-04-241-0/+31
| | | | | | | | | | | | virtiofs cannot be used as the upper fs for overlayfs, so skip all the sysext mutable tests that would try to use virtiofs as the upper fs.
* | TEST-50-DISSECT: Use --apparent-size when calling duDaan De Meyer2024-04-241-2/+2
| | | | | | | | | | Otherwise if the file is full of holes we get the wrong size and we'll fail later on.
* | TEST-50-DISSECT: Skip mountfsd test if the user namespace interface is not ↵Daan De Meyer2024-04-241-0/+9
|/ | | | supported
* test: Shut down tests on crashRichard Maw2024-04-241-6/+10
| | | | | | | | | | | | | | | | | | | | If an assert in systemd fails it can't shut down normally. By default it freezes. For interactive runs we want the crash shell to enable further debugging, but during test runs we want it to exit without having to wait for the test timeout. By deactivating the crash shell, enabling reboot, and configuring qemu so that it shuts down instead of rebooting we can shut down instead. Because by default UEFI will enroll keys and then reboot we also have to set --qemu-firmware-variables=custom so it doesn't need to auto-enroll. Because mkosi has to handle not receiving an EXIT_STATUS notification it falls back to the exit code of qemu, which in the case of reboot would be 0, we also override the success exit status to 123 and check that we got that as an exit code from mkosi.
* test: document when writable /usr overlays may be neededRichard Maw2024-04-244-0/+4
|
* test: Various mkosi integration test improvementsDaan De Meyer2024-04-234-152/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Stop using logging module since the default output formatting is pretty bad. Prefer print() for now. - Log less, logging the full mkosi command line is rather verbose, especially when it contains multi-line dropins. - Streamline the journalctl command we output for debugging failed tests. - Don't force usage of the disk image format. - Don't force running without unit tests. - Don't force disabling RuntimeBuildSources. - Update documentation to streamline the command for running a single test and remove sudo as it's not required anymore. - Improve the console output by having the test unit's output logged to both the journal and the console. - Disable journal console log forwarding as we have journal forwarding as a better alternative. - Delete existing journal file before running test. - Delete journal files of succeeded tests to reduce disk usage. - Rename system_mkosi target to just mkosi - Pass in mkosi source directory explicitly to accomodate arbitrary build directory locations. - Add test interactive debugging if stdout is connected to a tty - Stop explicitly using the 'system' image since it'll likely be dropped soon. - Only forward journal if we're not running in debugging mode. - Stop using testsuite.target and instead just add the necessary extras to the main testsuite unit via the credential dropin. - Override type to idle so test output is not interleaved with status output. - Don't build mkosi target by default - Always add the mkosi target if mkosi is found - Remove dependency of the integration tests on the mkosi target as otherwise the image is always built, even though we configure it to not be built by default. - Move mkosi output, cache and build directory into build/ so that invocations from meson and regular invocations share the same directories. - Various aesthetic cleanups.
* test: Rework TEST-02-UNITTESTSDaan De Meyer2024-04-222-48/+21
| | | | | | | | | | | | | | | | | Currently, A large amount of unit test output is logged directly to the console instead of to the per test log file as any subprocesses executed by a test manager will detect that stderr is not connected to the journal and log directly to /dev/console instead. To solve this issue, let's make sure all tests are connected directly to the journal by running them with systemd-run. We also simplify the entire test script by getting rid of the custom queue and replicating it with xargs instead. By using bash's function export feature, we can make our run_test() function available to the bash subprocess spawned by xargs. Once a test is finished, we read its logs from the journal and put them in the appropriate file if needed.
* Merge pull request #32369 from DaanDeMeyer/serialLennart Poettering2024-04-221-1/+1
|\ | | | | terminal-util: Enable line wrapping in reset_terminal_fd()
| * terminal-util: Enable line wrapping in reset_terminal_fd()Daan De Meyer2024-04-221-1/+1
| | | | | | | | | | | | | | | | | | The qemu seabios firmware disables serial console line wrapping. Let's make sure we re-enable it again when we reset a terminal to some sane defaults. To avoid potentially blocking on writing to the terminal, we put it in nonblocking mode and add a timeout of 50ms.
* | nspawn: ensure single-process container running as --user can access credentialsLuca Boccassi2024-04-221-0/+7
|/ | | | | | | | | | | | | | When starting a container with --user, the new uid will be resolved and switched to only in the inner child, at the end of the setup, by spawning getent. But the credentials are set up in the outer child, long before the user is resolvable, and the directories/files are made only readable by root and read-only, which means they cannot be changed later and made visible to the user. When this particular combination is specified, it is obvious the caller wants the single-process container to be able to use credentials, so make them world readable only in that specific case. Fixes https://github.com/systemd/systemd/issues/31794
* core: add ExecMainHandoverTimestamp property recording time-of-execveLuca Boccassi2024-04-221-0/+17
| | | | | | | | | Enable the exec_fd logic for Type=notify* services too, and change it to send a timestamp instead of a '1' byte. Record the timestamp in a new ExecMainHandoverTimestamp property so that users can track accurately when control is handed over from systemd to the service payload, so that latency and startup performance can be trivially and accurately tracked and attributed.
* test-network: add test for [IPv6SendRA] ReachableTimeSec= and RetransmitSec=Yu Watanabe2024-04-222-0/+5
|
* Merge pull request #31987 from flatcar-hub/krnowak/usr-perm-checkLennart Poettering2024-04-221-140/+397
|\ | | | | sysext: Fix issues with merged hierarchy mode
| * test: Make the sysext test to run with --root and withoutKrzesimir Nowak2024-04-191-149/+351
| | | | | | | | | | | | | | | | | | | | I was bitten several times by testing things only with --root flag, so this commit prepares the existing test cases to run on / too. This required the test cases to clean up after themselves, thus I have put each test case in a separate subshell and used traps to do the cleanups. I needed to change the hierarchy used by the test extension to /opt, because unmounting /usr often failed with EBUSY.
| * test: Do not limit hierarchiesKrzesimir Nowak2024-04-191-56/+56
| |
| * test: Add sysext test case for checking valid mutable directory modeKrzesimir Nowak2024-04-191-0/+18
| |
| * test: Add sysext test-cases for checking mode preservationKrzesimir Nowak2024-04-191-0/+37
| |
* | test-network: add test for global UseDomains= settingYu Watanabe2024-04-201-6/+10
| |
* | Merge pull request #32142 from bluca/portable_vpickLuca Boccassi2024-04-191-0/+20
|\ \ | |/ |/| portable: support vpick
| * portable: support vpickLuca Boccassi2024-04-191-0/+20
| | | | | | | | | | | | Resolve at attach/detach/inspect time, so that the image is pinned and requires re-attaching on update, given files are extracted from it so just passing img.v/ to RootImage= is not enough to get a portable image updated
* | Merge pull request #32299 from ↵Luca Boccassi2024-04-181-51/+25
|\ \ | |/ |/| | | | | yuwata/network-radv-ignore-rs-from-the-same-interface network/radv: ignore RS message from the same interface
| * test-network: add test case of RS sent by the same interfaceYu Watanabe2024-04-181-0/+6
| |
| * test-network: introduce check_networkd_log() helper functionYu Watanabe2024-04-181-47/+15
| |
| * test-network: drop trailing spacesYu Watanabe2024-04-181-4/+4
| | | | | | | | Follow-up for fb573007430ab0dbe45517b58837d2fa5cfa1a48.
* | Merge pull request #31790 from poettering/pcrlock-policy-fixLennart Poettering2024-04-181-2/+6
|\ \ | | | | | | Replace PolicyAuthValue by PolicySigned as access policy for pcrlock policy nvindex
| * | ci: update tests to showcase new option a bitLennart Poettering2024-04-181-2/+6
| |/
* | Merge pull request #32121 from CodethinkLabs/basic-mkosi-integration-testsLuca Boccassi2024-04-184-0/+204
|\ \ | | | | | | Basic mkosi integration tests
| * | test: Add mkosi-based integration test runnerRichard Maw2024-04-184-0/+204
| |/ | | | | | | | | The first two tests are included to ensure parallel test execution is demonstrable.
* / portablectl: add --clean parameter for detachingLuca Boccassi2024-04-181-1/+5
|/ | | | | Calls CleanUnit on each portable service being removed, after it has stopped
* test: fix typoYu Watanabe2024-04-171-2/+2
| | | | Follow-up for 236634c82c56e280348f9452129f3cdfd1fb7a45.
* Merge pull request #32300 from mrc0mmand/assorted-tweaksYu Watanabe2024-04-175-1921/+1704
|\ | | | | test: split TEST-50-DISSECT into smaller parts
| * test: rework systemd-sysext testFrantisek Sumsal2024-04-161-931/+506
| | | | | | | | | | | | | | | | | | | | Let's rework the test a bit, namely: - condense the code a bit - drop unnecessary braces around variables - drop unnecessary explanations around `touch` calls - drop/rename functions to make the code more self-explanatory - simplify cleanup a bit - create R/O bind mounts directly (supported since util-linux 2.27)
| * test: simplify unit checkFrantisek Sumsal2024-04-161-6/+2
| |
| * test: split some overly long linesFrantisek Sumsal2024-04-163-62/+256
| | | | | | | | | | Let's get the line count back up again by splitting some overly long lines in hopes to make the code slightly more readable.
| * test: split TEST-50-DISSECT into smaller partsFrantisek Sumsal2024-04-165-1921/+1939
| | | | | | | | As the current version has almost 2k lines.
* | test-64-udev-storage: partition disk inside testcase - ↵Sam Leonard2024-04-162-11/+11
| | | | | | | | testcase_multipath_basic_failover
* | test-64-udev-storage: partition disk inside testcase - ↵Sam Leonard2024-04-162-14/+16
| | | | | | | | testcase_virtio_scsi_identically_named_partitions
* | test-64-udev-storage: partition disk inside testcase - testcase_long_sysfs_pathSam Leonard2024-04-163-12/+13
| |
* | Merge pull request #32294 from yuwata/network-generator-credsYu Watanabe2024-04-161-1/+11
|\ \ | | | | | | network-generator: also load drop-ins for networkd.conf from credentials
| * | test: add test case for network.conf.* credentialYu Watanabe2024-04-161-1/+11
| | |
* | | test: add test case for 'networkctl cat' without argumentsYu Watanabe2024-04-161-0/+11
|/ /
* | test: add test for systemd-udev-load-credentials.serviceYu Watanabe2024-04-162-0/+34
| |
* | udevadm-control: check if control command really specifiedYu Watanabe2024-04-161-2/+1
| | | | | | | | | | | | Previously, 'udevadm control' only checked the number of the arguments. So, if only `--timeout` is specified, it spuriously did nothing and succeeded. This makes the command request at least one control command.