summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #26499 from mrc0mmand/assorted-tweaksYu Watanabe2023-02-212-0/+6
|\ | | | | A couple of test tweaks for recent CI fails
| * test: ignore missing coverage in TEST-78Frantisek Sumsal2023-02-201-0/+2
| | | | | | | | | | | | gcov is incompatible with DynamicUser=true without additional tweaks, so let's ignore its complaints in this test, as working around it is not worth it (in this case).
| * test: disable pipefail when testing interactive firstbootFrantisek Sumsal2023-02-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | Otherwise we might get unexpected test fails due to SIGPIPE: ``` [ 14.334917] testsuite-74.sh[565]: + grep -q '^root:.*:0:0:.*:/bin/fooshell$' test-root/etc/passwd [ 14.335670] testsuite-74.sh[681]: + systemd-firstboot --root=test-root --prompt-root-shell [ 14.336382] testsuite-74.sh[680]: + echo -ne '\n/bin/barshell\n' [ 14.336980] testsuite-74.sh[680]: .//usr/lib/systemd/tests/testdata/units/testsuite-74.firstboot.sh: line 166: echo: write error: Broken pipe ```
* | Merge pull request #26437 from DaanDeMeyer/repart-excludeDaan De Meyer2023-02-201-2/+8
|\ \ | |/ |/| repart: Add ExcludeFiles= option
| * repart: Add ExcludeFiles= optionDaan De Meyer2023-02-201-2/+8
| |
* | test: add test for new "systemctl --kill-value=" functionalityLennart Poettering2023-02-174-0/+54
| | | | | | | | (as side-effect this also tests the new systemd-notify --exec switch)
* | test: avoid matching other fields than __SEQNUM=Frantisek Sumsal2023-02-171-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current unanchored grep sometimes matches MESSAGE=/_CMDLINE= fields that contain "__SEQNUM=" instead of just the __SEQNUM= field, causing spurious test fails: [ 721.546372] testsuite-04.sh[1013]: ++ cut -d= -f2 [ 721.555858] testsuite-04.sh[1011]: ++ journalctl -o export -n 1 [ 721.573037] testsuite-04.sh[1012]: ++ grep -a __SEQNUM= [ 721.767294] testsuite-04.sh[562]: + SEQNUM1='495773 [ 721.769671] testsuite-04.sh[562]: ++ grep -a __SEQNUM [ 721.771323] testsuite-04.sh[562]: grep -a __SEQNUM' [ 721.772938] testsuite-04.sh[562]: + systemd-cat echo yo [ 721.921413] testsuite-04.sh[562]: + journalctl --sync [ 722.088945] testsuite-04.sh[1018]: ++ journalctl -o export -n 1 [ 722.104040] testsuite-04.sh[1019]: ++ grep -a __SEQNUM= [ 722.117239] testsuite-04.sh[1020]: ++ cut -d= -f2 [ 722.314936] testsuite-04.sh[562]: + SEQNUM2=495786 [ 722.317906] testsuite-04.sh[562]: + test 495786 -gt '495773 [ 722.319737] testsuite-04.sh[562]: ++ grep -a __SEQNUM [ 722.321609] testsuite-04.sh[562]: grep -a __SEQNUM' [ 722.323536] testsuite-04.sh[562]: /usr/lib/systemd/tests/testdata/units/testsuite-04.sh: line 276: test: 495773 [ 722.325744] testsuite-04.sh[562]: ++ grep -a __SEQNUM [ 722.327498] testsuite-04.sh[562]: grep -a __SEQNUM: integer expression expected [ 722.329528] testsuite-04.sh[562]: + journalctl --rotate --vacuum-size=16M $ build/journalctl --file /var/tmp/systemd-test.0HpVjt/system.journal -o export | grep -a __SEQNUM= ... __SEQNUM=214849 __SEQNUM=214850 MESSAGE=++ grep -a __SEQNUM= _CMDLINE=grep -a __SEQNUM= __SEQNUM=214851 ... __SEQNUM=214860 MESSAGE=++ grep -a __SEQNUM= _CMDLINE=grep -a __SEQNUM= __SEQNUM=214861 __SEQNUM=214862 __SEQNUM=214863 ... Let's anchor the expression to avoid this. Follow-up to f28ed2c1be7.
* core: add support for Startup memory limitsLuca Boccassi2023-02-151-1/+2
| | | | | We support separate Startup configurations for CPU and I/O, so add it for memory too. Only cover cgroupsv2 settings.
* Merge pull request #26307 from yuwata/test-execute-credentialsLuca Boccassi2023-02-1511-95/+124
|\ | | | | test-execute: drop capabilities when testing with user manager
| * test-execute: add basic tests for LoadCredential= and SetCredential=Yu Watanabe2023-02-153-0/+16
| |
| * test-execute: drop capabilities when testing with user managerYu Watanabe2023-02-158-95/+108
| | | | | | | | | | | | | | | | | | | | | | Before this, tests are split into two categories, system and user, but both are running in fully privileged environment. Hence, unprivileged user scope was mostly not covered by the test. Let's run all tests in both system and user scopes, and drop capabilities when Manager is running in user scope. This also makes the host environment protected more from the test run.
* | Merge pull request #26213 from poettering/journal-rework-seqnumLuca Boccassi2023-02-151-1/+10
|\ \ | | | | | | journal sequence number rework
| * | test: add basic seqnum testLennart Poettering2023-02-081-0/+9
| | |
| * | logs-show: show seqnum info in export+json output modeLennart Poettering2023-02-081-1/+1
| | |
* | | Merge pull request #26417 from yuwata/sysusers-root-groupLuca Boccassi2023-02-153-0/+62
|\ \ \ | | | | | | | | sysusers: also create root group
| * | | test-sysusers: add test for basic.confYu Watanabe2023-02-153-0/+62
| | |/ | |/|
* | | treewide: fix a few typos in NEWS, docs and commentsDmitry V. Levin2023-02-151-1/+1
|/ /
* | tree-wide: fix typo and comment style updateYu Watanabe2023-02-151-1/+1
| |
* | journald: fix ignored filtering patterns for delegated cgroupsQuentin Deslandes2023-02-084-2/+40
|/ | | | | | | | If a service defines Delegate=yes, its subcgroup won't inherit the LogFilterPatterns= option, because the option is stored on the unit's cgroup attributes, not on the subcgroup. Fixed by using the unit's cgroup attributes instead.
* core: imply DeviceAllow=/dev/tpmrm0 with LoadCredentialEncryptedLuca Boccassi2023-02-081-0/+6
| | | | | | | If the device access policy is restricted, add implicitly access to the TPM if at least one encrypted credential needs to be loaded. Fixes https://github.com/systemd/systemd/issues/26042
* cryptenroll: do not implicitly verify with default tpm policy signatureLuca Boccassi2023-02-081-0/+6
| | | | | | | | If it was not requested to use a tpm2 signature file when enrolling, do not fallback to the default /run/systemd/tpm2-pcr-signature.json as it likely will be unrelated if it exists. Fixes https://github.com/systemd/systemd/issues/25435
* Merge pull request #26324 from yuwata/argv-util-update-short-nameYu Watanabe2023-02-072-1/+2
|\ | | | | argv-util: also update short invocation name
| * test: use notice log level to make easily filter out logs from PID1Yu Watanabe2023-02-062-1/+2
| |
* | test: drop whitespace after shell redirection operatorsZbigniew Jędrzejewski-Szmek2023-02-0624-69/+69
|/ | | | | | | | | | (The one case that is left unchanged is '< <(subcommand)'.) This way, the style with no gap was already dominant. This way, the reader immediately knows that ' < ' is a comparison operator and ' << ' is a shift. In a few cases, replace custom EOF replacement by just EOF. There is no point in using someting like "_EOL" unless "EOF" appears in the text.
* Merge pull request #26269 from keszybz/sysusers-empty-etc-and-improved-messagesLuca Boccassi2023-02-011-0/+8
|\ | | | | sysusers: improve messages and autocreate /etc
| * test-sysusers: check that sysusers creates /etc when missingZbigniew Jędrzejewski-Szmek2023-02-011-0/+8
| |
* | Merge pull request #26287 from medhefgo/mkosi-auto-enrollLuca Boccassi2023-02-011-0/+6
|\ \ | | | | | | ci: Test with secure boot enabled under mkosi
| * | ci: Test with secure boot enabled under mkosiJan Janssen2023-02-011-0/+6
| |/ | | | | | | | | | | This gives us some nice test coverage for secure boot enrolling and the stub secure boot workound. The authenticated EFI variables are already created by mkosi, all we need to do is request secure boot to be used.
* | Merge pull request #26285 from yuwata/test-lvextendFrantisek Sumsal2023-02-011-3/+24
|\ \ | | | | | | test: add a testcase for lvextend
| * | test: add a testcase for lvextendYu Watanabe2023-02-021-0/+20
| | | | | | | | | | | | For RHBZ#2158628 (https://bugzilla.redhat.com/show_bug.cgi?id=2158628)
| * | test: make helper_check_device_units() log unit nameYu Watanabe2023-02-011-3/+4
| |/
* | Merge pull request #26219 from yuwata/localed-follow-upsZbigniew Jędrzejewski-Szmek2023-02-011-0/+122
|\ \ | |/ |/| locale: check conversion before polkit
| * test: add tests for localectl --no-convertYu Watanabe2023-01-281-0/+122
| |
* | Merge pull request #26245 from ldv-alt/tmpfiles-fixesLennart Poettering2023-01-302-1/+61
|\ \ | | | | | | tmpfiles: fix specifier expansion in arguments of C and L lines
| * | tmpfiles: avoid double specifier expansion in L linesDmitry V. Levin2022-01-291-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with commit 2f3b873a4973, when the path contains a specifier and the argument is omitted, tmpfiles used to perform specifier expansions twice: first specifier expansion was applied to the path itself, and afterwards the result of the first expansion was used in the constructed argument and expanded once again. Resolves: #26244 Fixes: 2f3b873a4973 ("tmpfiles: copy/link /usr/share/factory/ files when the source argument is omitted")
| * | tmpfiles: fix specifier expansion in arguments of C linesDmitry V. Levin2022-01-291-1/+29
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the argument of "C" type undergoes specifier expansion before it's checked for validity. In particular, starting with commit ce610af143b2, the check for path existence used to fail in case of presence of any specifier in the argument. Also, starting with commit 2f3b873a4973, when the path contains a specifier and the argument is omitted, tmpfiles used to perform specifier expansions twice: first specifier expansion was applied to the path itself, and afterwards the result of the first expansion was used in the constructed argument and expanded once again. Finally, starting with commit 849958d1ba35, when the argument begins with %h specifier, tmpfiles used to complain that the source path is not absolute. Resolves: #25381 Fixes: ce610af143b2 ('tmpfiles: in C lines, make missing source graceful error') Fixes: 2f3b873a4973 ('tmpfiles: copy/link /usr/share/factory/ files when the source argument is omitted') Fixes: 849958d1ba35 ('tmpfiles: add new "C" line for copying files or directories')
* | Merge pull request #23956 from mrc0mmand/resolved-ipv6Yu Watanabe2023-01-309-52/+221
|\ \ | | | | | | test: cover (not only) IPv6 in the resolved test suite
| * | test: wrap delv & dig when running with sanitizersFrantisek Sumsal2023-01-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | On Arch both delv and dig pull in libnss_resolve: ``` $ grep resolve /etc/nsswitch.conf hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns ```
| * | test: don't hang indefinitely on no matchFrantisek Sumsal2023-01-271-1/+1
| | |
| * | test: add a test for the OPENPGPKEY RRFrantisek Sumsal2023-01-272-0/+20
| | |
| * | test: add a couple of SRV records to check service resolutionFrantisek Sumsal2023-01-273-0/+29
| | |
| * | test: cover IPv6 in the resolved test suiteFrantisek Sumsal2023-01-278-50/+169
| |/
* | test-systemd-tmpfiles: Fix execution when user is not in /etc/passwdDaan De Meyer2023-01-291-5/+15
|/ | | | | | | | We might be running in a chroot as a uid that doesn't exist in /etc/passwd. Let's make sure we don't fail in this scenario. We pass $HOME when resetting the env so that we can find a home directory and skip tests that depend on user name/group.
* repart: Add roothash to output of all verity siblingsDaan De Meyer2023-01-251-4/+9
| | | | | This can be used to match verity partitions together using the repart JSON output.
* test: skip firstboot --prompt-keymap check if keymaps are missingMichael Biebl2023-01-251-2/+8
| | | | Fixes: #26165
* locale: rename new XKB variables to match Debian/Ubuntu'sLuca Boccassi2023-01-241-28/+28
| | | | | | | | | | | | Debian/Ubuntu use almost the same variables, but without '_'. Given our usage is new, rename them so that they match and downstream tech debt can be removed. Follow-up for https://github.com/systemd/systemd/pull/25805 See: https://github.com/systemd/systemd/issues/24228 https://github.com/systemd/systemd/pull/25412
* Merge pull request #26164 from mrc0mmand/test-bus-timeoutFrantisek Sumsal2023-01-242-1/+4
|\ | | | | test: bump the client-side timeout in sd-bus as well
| * test: bump the container spawn timeout to 60sFrantisek Sumsal2023-01-231-1/+1
| | | | | | | | | | As 30s might be not enough on busy systems (and we already bumped the reboot timeout from 30s to 60s for this reason).
| * test: bump the client-side timeout in sd-bus as wellFrantisek Sumsal2023-01-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since c78d18215b D-Bus services now have 60s to start, but the client side (sd-bus) still waits only for 25s before giving up: ``` [ 226.196380] testsuite-71.sh[556]: + assert_in 'Static hostname: H' '' [ 226.332965] testsuite-71.sh[576]: + set +ex [ 226.332965] testsuite-71.sh[576]: FAIL: 'Static hostname: H' not found in: [ 228.910782] sh[577]: + systemctl poweroff --no-block [ 232.255584] hostnamectl[565]: Failed to query system properties: Connection timed out [ 236.827514] systemd[1]: end.service: Consumed 2.131s CPU time. [ 237.476969] dbus-daemon[566]: [system] Successfully activated service 'org.freedesktop.hostname1' [ 237.516308] systemd[1]: system-modprobe.slice: Consumed 1.533s CPU time. [ 237.794635] systemd[1]: testsuite-71.service: Main process exited, code=exited, status=1/FAILURE [ 237.818469] systemd[1]: testsuite-71.service: Failed with result 'exit-code'. [ 237.931415] systemd[1]: Failed to start testsuite-71.service. [ 238.000833] systemd[1]: testsuite-71.service: Consumed 5.651s CPU time. [ 238.181030] systemd[1]: Reached target testsuite.target. ``` Let's override the timeout in sd-bus as well to mitigate this. Follow-up to c78d18215b3e5b0f0896ddb1d0d72c666b5e830b.
* | Merge pull request #26153 from DaanDeMeyer/repart-remove-usernsZbigniew Jędrzejewski-Szmek2023-01-231-42/+42
|\ \ | | | | | | mkfs-util: Remove user namespace owner => root mapping