summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
| * | test: add a minimal test for list-pathsDavid Tardon2023-02-211-0/+2
| | |
* | | Merge pull request #26527 from mrc0mmand/more-testsYu Watanabe2023-02-221-0/+15
|\ \ \ | | | | | | | | test: provide coverage for #26467 and #26483
| * | | test: add coverage for #26483Frantisek Sumsal2023-02-211-0/+3
| | | |
| * | | test: add coverage for #26467Frantisek Sumsal2023-02-211-0/+12
| | | |
* | | | Enable TPM by default with SetCredentialEncryptedAidan Dang2023-02-211-0/+3
|/ / /
* | | Merge pull request #26518 from DaanDeMeyer/mkosi-stuffDaan De Meyer2023-02-212-29/+0
|\ \ \ | | | | | | | | mkosi: Drop build script workarounds
| * | | mkosi: Move more logic to the postinst scriptDaan De Meyer2023-02-212-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | Let's move stuff that only applies to the final image to the postinst script. Let's also move out some of the static files to mkosi.extra/ instead of hardcoding them in scripts.
* | | | bootctl: add new --print-root-device optionLennart Poettering2023-02-211-0/+17
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have this nice code in system that determines the block device backing the root file system, but it's only used internally in systemd-gpt-generator. Let's make this more accessible and expose it directly in bootctl. It doesn't fit immediately into the topic of bootctl, but I think it's close enough and behaves very similar to the existing "bootctl --print-boot-path" and "--print-esp-path" tools. If --print-root-device (or -R) is specified once, will show the block device backing the root fs, and if specified twice (probably easier: -RR) it will show the whole block device that block device belongs to in case it is a partition block device. Suggested use: # cfdisk `bootctl -RR` To get access to the partition table, behind the OS install, for whatever it might be.
* | | 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
| |/ /