summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #23367 from yuwata/core-mountYu Watanabe2022-08-051-0/+152
|\ | | | | core/mount: fix dependency issues
| * test: add test case for mount unit dependenciesYu Watanabe2022-08-051-0/+152
| |
* | test-network: support the case that l2tp module is not supportedYu Watanabe2022-08-041-2/+4
|/ | | | | Hopefully fixes the issue reported at https://github.com/systemd/systemd-centos-ci/pull/517#issuecomment-1205399798.
* scope: allow unprivileged delegation on scopesMichal Sekletar2022-08-041-0/+14
| | | | | | | | | Previously it was possible to set delegate property for scope, but you were not able to allow unprivileged process to manage the scope's cgroup hierarchy. This is useful when launching manager process that will run unprivileged but is supposed to manage its own (scope) sub-hierarchy. Fixes #21683
* test: skip the relevant test case if systemd-measure is not presentFrantisek Sumsal2022-08-041-9/+13
| | | | | | | | | | | | | | | | | | | | | | | systemd-measure is not built without gnu-efi, which is the case, for example, on ppc64le. Let's skip the relevant test case in this case instead of failing. ``` The Meson build system Version: 0.58.2 ... Host machine cpu family: ppc64 Host machine cpu: ppc64le ... Message: Skipping systemd-measure.1 because HAVE_GNU_EFI is false ... [ 115.711775] testsuite-70.sh[745]: + cat [ 115.741996] testsuite-70.sh[832]: + /usr/lib/systemd/systemd-measure calculate --linux=/tmp/tpmdata1 --initrd=/tmp/tpmdata2 [ 115.754015] testsuite-70.sh[833]: + cmp - /tmp/result [ 115.758004] testsuite-70.sh[832]: /usr/lib/systemd/tests/testdata/units/testsuite-70.sh: line 56: /usr/lib/systemd/systemd-measure: No such file or directory [ 115.773851] testsuite-70.sh[833]: cmp: EOF on - which is empty [ 115.983681] sh[835]: + systemctl poweroff --no-block ```
* Merge pull request #24141 from DaanDeMeyer/dissect-umountLuca Boccassi2022-08-041-5/+5
|\ | | | | dissect: Add systemd-dissect --umount
| * dissect: Add systemd-dissect --umountDaan De Meyer2022-08-031-5/+5
| | | | | | | | | | | | | | | | | | | | This command takes a mountpoint, unmounts it and makes sure the underlying partition devices and block device are removed before exiting. To mirror the --mount operation, we also add a --rmdir option which does the opposite of --mkdir, and a -U option which is a shortcut for --umount --rmdir.
* | integritysetup: do not use crypt_init_data_device after crypt_initLuca Boccassi2022-08-041-4/+25
| | | | | | | | | | | | | | | | crypt_init_data_device() replaces the crypt_device struct with a new allocation, losing the old one, which we get from crypt_init(). Use crypt_set_data_device() instead. Enhance the test to cover this option too.
* | test: optionally wait a bit when checking the mount unitFrantisek Sumsal2022-08-031-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On fast systems we might race against systemd and check the mount unit after mounting it way too early before systemd had a chance to react to the change. ``` [ 4.677701] H systemd[1]: Event source 0x210b3b0 (mount-monitor-dispatch) entered rate limit state. ... [ 4.863731] H testsuite-64.sh[812]: + mount /logsysfsRxx [ 4.865918] H kernel: EXT4-fs (vda2): mounted filesystem with ordered data mode. Opts: (null) [ 4.866213] H testsuite-64.sh[812]: + systemctl status /logsysfsRxx [ 4.877502] H testsuite-64.sh[919]: ○ logsysfsRxx.mount - /logsysfsRxx [ 4.877502] H testsuite-64.sh[919]: Loaded: loaded (/etc/fstab; generated) [ 4.877502] H testsuite-64.sh[919]: Active: inactive (dead) [ 4.877502] H testsuite-64.sh[919]: Where: /logsysfsRxx [ 4.877502] H testsuite-64.sh[919]: What: /dev/disk/by-uuid/deadbeef-dead-dead-beef-222222222222 [ 4.877502] H testsuite-64.sh[919]: Docs: man:fstab(5) [ 4.877502] H testsuite-64.sh[919]: man:systemd-fstab-generator(8) [ 4.877502] H testsuite-64.sh[919]: Aug 03 10:10:10 H systemd[1]: logsysfsRxx.mount: Processing implicit device dependencies [ 4.877502] H testsuite-64.sh[919]: Aug 03 10:10:10 H systemd[1]: logsysfsRxx.mount: Added Requires dependency on /dev/disk/by-uuid/deadbeef-dead-dead-beef-222222222222 [ 4.877502] H testsuite-64.sh[919]: Aug 03 10:10:10 H systemd[1]: logsysfsRxx.mount: Added StopPropagatedFrom dependency on /dev/disk/by-uuid/deadbeef-dead-dead-beef-222222222222 [ 4.895683] H sh[920]: + systemctl poweroff --no-block [ 4.906533] H systemd[1]: Found unit logsysfsRxx.mount at /run/systemd/generator/logsysfsRxx.mount (regular file) [ 4.906594] H systemd[1]: Preset files don't specify rule for logsysfsRxx.mount. Enabling. [ 4.906990] H systemd[1]: testsuite-64.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED [ 4.907057] H systemd[1]: testsuite-64.service: Failed with result 'exit-code'. [ 4.907287] H systemd[1]: Failed to start testsuite-64.service. [ 4.955293] H systemd[1]: Starting end.service... [ 4.955736] H systemd-logind[809]: The system will power off now! [ 4.955868] H systemd-logind[809]: System is powering down. [ 4.975781] H systemd[1]: Event source 0x210b3b0 (mount-monitor-dispatch) left rate limit state. [ 4.975821] H systemd[1]: logsysfsRxx.mount: Processing implicit device dependencies [ 4.975857] H systemd[1]: logsysfsRxx.mount: Added Requires dependency on /dev/vda2 [ 4.975893] H systemd[1]: logsysfsRxx.mount: Added StopPropagatedFrom dependency on /dev/vda2 [ 4.975928] H systemd[1]: Unit blockdev@dev-vda2.target has alias blockdev@.target. [ 4.975967] H systemd[1]: logsysfsRxx.mount: Added After dependency on /dev/vda2 [ 4.976081] H systemd[1]: logsysfsRxx.mount: Changed dead -> mounted ```
* Merge pull request #24178 from mrc0mmand/libgcc_sFrantisek Sumsal2022-08-032-11/+9
|\ | | | | test: install libgcc_s.so.1 explicitly if available
| * test: be a bit more verbose about shared library symlinksFrantisek Sumsal2022-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | For example: ``` D: Installing /usr/lib64/libz.so.1.2.11 D: Creating symlink /usr/lib64/libz.so.1.2.11 -> /usr/lib64/libz.so.1 D: Creating extra symlink: /lib64/libz.so D: Installing /usr/lib64/libgcc_s-12-20220507.so.1 D: Creating symlink /usr/lib64/libgcc_s-12-20220507.so.1 -> /usr/lib64/libgcc_s.so.1 ```
| * test: install libgcc_s.so.1 explicitly if availableFrantisek Sumsal2022-08-022-11/+8
| | | | | | | | | | | | | | Since the library is dlopen()ed by libpthread and required during pthread_exit()/pthread_cancel(), let's install it explicitly if available to avoid unexpected fails in tests. This also consolidates all related workarounds for this library across the test scripts.
* | test: add trivial test for systemd-measureLennart Poettering2022-08-021-0/+12
|/
* test-network: add test case for #23197Yu Watanabe2022-08-022-0/+10
|
* test: restart logind before cleaning up sessionsYu Watanabe2022-07-311-2/+2
| | | | Hopefully, fixes #24040.
* test: do not restart getty@tty2 automaticallyYu Watanabe2022-07-311-0/+1
|
* test: terminate session and user on cleanupYu Watanabe2022-07-311-1/+12
|
* Merge pull request #23991 from yuwata/udev-reloadLennart Poettering2022-07-251-10/+33
|\ | | | | udev: reload rules and builtins only when mtime of a config changed
| * test-network: reload udevd when .link file is copied/removedYu Watanabe2022-07-231-10/+33
| |
* | sysctl: add --strict option to fail if sysctl does not existsQuentin Deslandes2022-07-254-0/+40
|/ | | | | | | | | | | | | | systemd-sysctl currently fails silently under any of these conditions: - Missing permission to write a sysctl. - Invalid sysctl (path doesn't exists). - Ignore failure flag ('-' in front of the sysctl name). Because of this behaviour, configuration issues can go unnoticed as there is no way to detect those unless going through the logs. --strict option forces systemd-sysctl to fail if a sysctl is invalid or if permission are insufficient. Errors on sysctl marked as "ignore failure" will still be ignored.
* Merge pull request #24074 from yuwata/network-dhcp6-rapid-commitYu Watanabe2022-07-231-0/+38
|\ | | | | network: dhcp6: re-introduce RapidCommit= setting
| * test-network: add tests for RapidCommit=Yu Watanabe2022-07-221-0/+38
| |
* | test: wait for user service or slice to be finishedYu Watanabe2022-07-221-5/+22
| | | | | | | | Hopefully fixes #24040.
* | test-network: drop unnecessary call of systemctlYu Watanabe2022-07-221-3/+0
| | | | | | | | As the units are not started at that stage.
* | test-network: drop unnecessary default argumentYu Watanabe2022-07-221-1/+1
| |
* | test-network: do not stop/restart udevd and related socket unitsYu Watanabe2022-07-221-4/+2
|/ | | | | | | | | | | | That's not necessary. Moreover, if the socket units are stopped in `setUpModule()`, then there exists a short timespan that we cannot call `udevadm control`, as the control socket may not be opened yet. If we run whole tests, then the first test is NetworkctlTests.test_altname, and it calls `udevadm control` in `setUp()`. Hence, the test may fail. Fixes https://github.com/systemd/systemd-centos-ci/pull/512#issuecomment-1191591008.
* tmpfiles: automatically provision /etc/issue.d/ + /etc/motd.d/ + /etc/hosts ↵Lennart Poettering2022-07-212-3/+25
| | | | from credentials
* tmpfiles: accept additional tmpfiles lines via credentialLennart Poettering2022-07-202-1/+4
|
* Merge pull request #24025 from DaanDeMeyer/mkosi-sanitizersEvgeny Vereshchagin2022-07-181-1/+1
|\ | | | | mkosi: Changes to allow booting with sanitizers in mkosi
| * mkosi: Remove usage of deprecated option names/sectionsDaan De Meyer2022-07-181-1/+1
| |
* | Merge pull request #24047 from dtardon/list-users-lingerYu Watanabe2022-07-181-3/+23
|\ \ | |/ |/| Add linger status to `loginctl list-users`
| * test: merge grep | awk callsDavid Tardon2022-07-171-3/+3
| |
| * test: add a simple test for list-usersDavid Tardon2022-07-171-0/+20
| |
* | sysusers: allow defining additional sysusers lines via credentialsLennart Poettering2022-07-162-1/+4
| |
* | Merge pull request #24011 from poettering/condition-credLennart Poettering2022-07-156-23/+37
|\ \ | | | | | | pid1: add new condition type "ConditionCredential=" for checking for credentials passed into the system
| * | fuzz: add ConditionCredential= to fuzz files, and sort their sectionsLennart Poettering2022-07-155-23/+31
| | |
| * | pid1: add mechanism for conditionalizing units/network/netdev/link based on ↵Lennart Poettering2022-07-151-0/+6
| | | | | | | | | | | | | | | | | | | | | credentials passed in This is useful when provisioning systems via nspawn/qemu and running specific services only if specific data is passed into the system.
* | | tmpfiles: optionally, decode string to write to files with base64Lennart Poettering2022-07-151-0/+10
|/ / | | | | | | | | | | This is useful to use "f" or "w" to write arbitrary binary files to disk, or files with newlines and similar (for example to provision SSH host keys and similar).
* | pid1: import creds from SMBIOS too, not just qemu's fw_cfgLennart Poettering2022-07-152-1/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | This imports credentials also via SMBIOS' "OEM vendor string" section, similar to the existing import logic from fw_cfg. Functionality-wise this is very similar to the existing fw_cfg logic, both of which are easily settable on the qemu command line. Pros and cons of each: SMBIOS OEM vendor strings: - pro: fast, because memory mapped - pro: somewhat VMM independent, at least in theory - pro: qemu upstream sees this as the future - pro: no additional kernel module needed - con: strings only, thus binary data is base64 encoded fw_cfg: - pro: has been supported for longer in qemu - pro: supports binary data - con: slow, because IO port based - con: only qemu - con: requires qemu_fw_cfg.ko kernel module - con: qemu upstream sees this as legacy
* Merge pull request #24019 from yuwata/network-ipv4llYu Watanabe2022-07-152-3/+4
|\ | | | | network: refuse 169.254.0.0/24 and 169.254.255.0/24
| * test-network: add a test case for IPv4LLStartAddress=Yu Watanabe2022-07-152-3/+4
| |
* | Merge pull request #24016 from poettering/sysctl-cred-extraYu Watanabe2022-07-152-1/+4
|\ \ | |/ |/| sysctl: also process sysctl requests via the "sysctl.extra" credential
| * sysctl: also process sysctl requests via the "sysctl.extra" credentialLennart Poettering2022-07-142-1/+4
| |
* | Merge pull request #23927 from AndreKalb/feature/ipv4-link-local-start-addressYu Watanabe2022-07-151-0/+1
|\ \ | | | | | | network: Feature IPv4 link-local start address
| * | network: Add support to select an IPv4 link-local start addressAndre Kalb2022-07-131-0/+1
| | |
* | | Revert "tests: add test for handling of background sessions"Michal Sekletar2022-07-142-46/+1
| |/ |/| | | | | This reverts commit bf40417c7cbe0afb185eda97ea46395b1bb74bdf.
* | test: add test for org.freedesktop.login1.Session SetTypeDavid Tardon2022-07-131-0/+16
| |
* | test: ensure cleanup functions return successDavid Tardon2022-07-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the return value of the last command is propagated, which may cause spurious test failures. E.g., pkill returns 1 if no process matched, which may be a problem in cleanup session: cleanup_session() { ... pkill -u "$(id -u logind-test-user)" sleep 1 pkill -KILL -u "$(id -u logind-test-user)" } If there are no remaining processes when the final pkill runs, it will return 1 and therefore cleanup_session will return 1 as well.
* | test-network: save and restore timezoneYu Watanabe2022-07-131-0/+15
| | | | | | | | | | | | Several DHCP client tests change the system timezone. Let's save the current timezone at the beginning, and restore it with the saved value at the end.
* | test-network: wait for L2TP tunnels being removedYu Watanabe2022-07-131-1/+13
| | | | | | | | Fixes #23985.