summaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test: ignore gcov errors with RestrictFileSystems=Frantisek Sumsal2023-11-291-2/+5
| | | | | | | The errors are valid, since the file system is indeed not writable, but we don't care about the missing coverage data in this case. Follow-up to 4a43c2b3a1.
* rules: go to the end of rules indeed when dm is suspendedjanana2023-11-291-1/+3
| | | | | | | | The previous patch 466266c does not make sense indeed, that is to say, if the SYSTEMD_READY is not recorded in the database, the GOTO="systemd_end" will not be applied. The IMPORT{db} is actually a matching token, it returns false when there is no SYSTEMD_READY recorded in the database. The previous patch 466266c tended to inherit the state of SYSTEMD_READY from the database and skip to the end of current rule file. But when the database does not contain SYSTEMD_READY, e.g., the dm-* is not set db_persistent during initrd and the database will be cleared after switching root, the following rules will still be applied not as expected.
* Merge pull request #30203 from yuwata/resolve-dump-cacheLuca Boccassi2023-11-2811-14/+19
|\ | | | | resolve: fix varlink message verification
| * test: verify json format passed through varlinkYu Watanabe2023-11-273-4/+11
| | | | | | | | | | | | | | This drops logs of failed unit tests in TEST-02-UNITTESTS from the journal, as the expected logs from test-varlink-idl makes the post script fail. Saving logs in journal is simply noisy, and we will output anyway after qemu or nspawn finished by check_result_{qemu,nspawn}_unittests().
| * test: show saved journal files after TEST-02-UNITTESTSYu Watanabe2023-11-271-0/+2
| |
| * test: drop remaining console outputYu Watanabe2023-11-276-10/+1
| | | | | | | | | | | | | | Follow-up for fa6f37c04391d0103c95e24813ad345c2d5c4b67. Partially reverts d5ab23aa54229e9e89427e7d20883bd8c93fd976 and 3540ce8587cbd21ce9c2dbec72ea7fa3d1b38a5f.
| * test: add simple coverity test for 'resolvectl show-cache'Yu Watanabe2023-11-271-0/+5
| |
* | Merge pull request #30216 from poettering/loginctl-table-tweaksLuca Boccassi2023-11-281-1/+1
|\ \ | | | | | | loginctl: minor tweaks to tabular output
| * | loginctl: set appropriate ersatz strings for all tablesLennart Poettering2023-11-281-1/+1
| |/
* / test: check journal files are not corrupted after soft-rebootYu Watanabe2023-11-281-0/+7
|/
* Merge pull request #30170 from bluca/exec_bpf_fdLuca Boccassi2023-11-272-0/+50
|\ | | | | core: pass bpf_outer_map_fd to sd-executor only if RestrictFileSystems was set
| * test: add a couple of tests for RestrictFileSystems=Frantisek Sumsal2023-11-242-0/+50
| |
* | test: drop 'noearly' from crypttabFrantisek Sumsal2023-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | It's a Debian thing, we don't support it. [ 30.639971] testsuite-64.sh[475]: + systemctl restart cryptsetup.target [ 30.697667] systemd-cryptsetup[3389]: Encountered unknown /etc/crypttab option 'noearly', ignoring. [ 30.700529] systemd-cryptsetup[3390]: Encountered unknown /etc/crypttab option 'noearly', ignoring. [ 30.700594] systemd-cryptsetup[3391]: Encountered unknown /etc/crypttab option 'noearly', ignoring. [ 30.704638] systemd-cryptsetup[3392]: Encountered unknown /etc/crypttab option 'noearly', ignoring
* | test: drop invalid LogTarget= assignmentFrantisek Sumsal2023-11-251-1/+0
| | | | | | | | | | | | | | It's been there since the test was introduced and I'm not really sure what was the original intention behind it, but it makes systemd sad: [ 4.909056] systemd[1]: /usr/lib/systemd/tests/testdata/units/testsuite-44.service:13: Unknown key name 'LogTarget' in section 'Service', ignoring.
* | test: remove the reboot counter just before spawning container/VMFrantisek Sumsal2023-11-251-3/+4
| | | | | | | | | | Doing that in test_run() is not enough, since it's called only once and spawns all QEMU/nspawn jobs.
* | test: don't redirect stdout/stderr to consoleFrantisek Sumsal2023-11-241-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out that redirecting a lot of output to the console can have some funny effects, like random kernel soft lockups. I spotted this in various CIs, but it remained almost entirely hidden thanks to `softlockup_panic=1`, until 1a36d2672f which introduced a couple of tests that log quite a lot in a short amount of time. This, in combination with newer kernel version, which, for some reason, seem to be more susceptible to such soft lockups, made the Arch Linux jobs soft lockup quite a lot, see [0]. While debugging this I also noticed that runs which don't redirect stdout/stderr to the console are noticeably faster, e.g.: # TEST-71 nspawn + QEMU (KVM), StandardOutput=journal+console Elapsed (wall clock) time (h:mm:ss or m:ss): 0:24.64 # TEST-71 nspawn + QEMU (KVM), StandardOutput=journal Elapsed (wall clock) time (h:mm:ss or m:ss): 0:17.95 # TEST-71 nspawn + QEMU, StandardOutput=journal+console Elapsed (wall clock) time (h:mm:ss or m:ss): 2:04.70 # TEST-71 nspawn + QEMU, StandardOutput=journal Elapsed (wall clock) time (h:mm:ss or m:ss): 1:44.48 # TEST-04 QEMU, StandardOutput=journal+console Elapsed (wall clock) time (h:mm:ss or m:ss): 4:22.70 # TEST-04 QEMU, StandardOutput=console Elapsed (wall clock) time (h:mm:ss or m:ss): 5:04.67 Given all this, let's effectively revert ba7abf79a5, and dump the testsuite-related journal messages only after the test finishes, so they don't go through the slow console. Resolves: systemd/systemd-centos-ci#660 [0] https://github.com/systemd/systemd-centos-ci/issues/660
* | test: don't make the final vacuum multiple of 8MFrantisek Sumsal2023-11-241-1/+1
| | | | | | | | | | As this would usually mean we'd nuke everything, since there are two open journals - system and user - both being 8M in size.
* | test: clean up the save_journal() stuff a bitFrantisek Sumsal2023-11-241-26/+31
|/ | | | | | Let's save all journals from the test machine instead of calling export on each journal file separately, which makes the code less complicated (and probably faster).
* Merge pull request #30024 from keszybz/one-doc-thingyLuca Boccassi2023-11-222-0/+6
|\ | | | | Serialize units ratelimits and document StartLimitIntervalSec=infinity
| * core: serialize and deserialize unit start ratelimitsZbigniew Jędrzejewski-Szmek2023-11-222-0/+6
| | | | | | | | | | | | | | | | | | | | The logic is taken from dump ratelimit: if the config changes, we discard the counters. This allows the user apply new limits and "start from scratch" in that case. This actually makes StartLimitIntervalSec=infinity (or with a large interval) work as expected, because the counter is maintained even if daemon-reload operations are interleaved.
* | test: make sure pcrlock tests run headlessLennart Poettering2023-11-221-3/+3
| | | | | | | | | | We want the tests to fail rather than hang if unlock via tpm doesn't work.
* | test-network: add tests for [DHCPv4] AllowList= and DenyList=Yu Watanabe2023-11-214-3/+59
| | | | | | | | | | | | | | | | | | | | | | We have not tested if the settings actually filter DHCP servers. Let's add a test case for the settings. Note, the .network file used here has been unused since 0730e3767d91e020985dc5c7c2178460f627581a. So, we can freely reuse it without changing other test cases. Closes #30107.
* | bsod: install the signal handler only just before we need itFrantisek Sumsal2023-11-211-0/+13
| | | | | | | | | | | | | | Otherwise we might get stuck in sd_journal_wait(), since it handles EINTR internally. Resolves: #30084
* | Merge pull request #30108 from mrc0mmand/packit-testing-farmLuca Boccassi2023-11-211-46/+99
|\ \ | | | | | | packit: run tests on Fedora Rawhide via Testing Farm
| * | test: don't use ddebug() before it's definedFrantisek Sumsal2023-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | I'm pretty sure this is not the only case, but it's the one I recently noticed. Even though we call ddebug() from a function, that function is called before ddebug() is defined, resulting in the same issue as if we called just ddebug() in its place, i.e.: ..//test-functions: line 276: ddebug: command not found
| * | test: move a couple of binaries to the BASICTOOLS arrayFrantisek Sumsal2023-11-201-14/+14
| | | | | | | | | | | | As they're not optional.
| * | test: support NO_BUILD=yes on FedoraFrantisek Sumsal2023-11-201-6/+58
| | |
| * | test: make the LOOKS_LIKE_* variables proper booleansFrantisek Sumsal2023-11-201-25/+26
| | |
* | | test: add simple test case for invalid userspace log recordsLuca Boccassi2023-11-201-0/+9
|/ /
* | network/dhcp: actually refuse to assign DHCP option when an invalid string ↵Yu Watanabe2023-11-181-0/+5
| | | | | | | | | | | | is passed Prompted by #30029.
* | test: read from the right deviceDavid Tardon2023-11-161-1/+1
| |
* | Merge pull request #30035 from keszybz/buid-sys-cleanupsLuca Boccassi2023-11-151-5/+1
|\ \ | | | | | | Build system cleanups
| * | meson: use ternary op for brevityZbigniew Jędrzejewski-Szmek2023-11-151-5/+1
| |/
* / test: update Ubuntu CI instructionsFrantisek Sumsal2023-11-151-0/+1
|/
* fuzz: don't panic without a C++ compilerFrantisek Sumsal2023-11-151-2/+9
| | | | | | | meson's `cpp_args` option is defined only if it detects a C++ compiler, otherwise we get an error: ../test/fuzz/meson.build:56:28: ERROR: Tried to access unknown option 'cpp_args'.
* Merge pull request #30023 from mrc0mmand/selinuxLuca Boccassi2023-11-146-125/+68
|\ | | | | test: make TEST-06-SELINUX work with the refpolicy and beef it up a bit
| * test: make TEST-06-SELINUX work with the refpolicy and beef it up a bitFrantisek Sumsal2023-11-146-119/+65
| | | | | | | | | | | | | | Currently the test works only with policy shipped by Fedora, which makes it pretty much useless in most of our CIs. Let's drop the custom module and make the test more generic, so it works with the refpolicy as well, which should allow us to run it on Arch and probably even in Ubuntu CI.
| * test: switch SELinux to permissive in the config fileFrantisek Sumsal2023-11-142-7/+4
| | | | | | | | | | The config file has (unfortunately) precedence over the kernel command line, so let's tweak the config file if necessary.
* | Merge pull request #29930 from yuwata/meson-default-network-fix-install-pathZbigniew Jędrzejewski-Szmek2023-11-144-37/+43
|\ \ | |/ |/| meson: fix install path of example .network files
| * test: use wait-onlineYu Watanabe2023-11-081-2/+2
| |
| * test: prefix network config files with digitsYu Watanabe2023-11-083-7/+7
| |
| * networkd-test.py: prefix .network and .netdev files with digitsYu Watanabe2023-11-081-28/+28
| | | | | | | | | | Otherwise config files generated by systemd-network-generator may match with the test interfaces.
| * networkd-test.py: hide default .network filesYu Watanabe2023-11-081-0/+6
| | | | | | | | To make the test works fine with -Ddefault-network=True.
* | Merge pull request #30018 from mrc0mmand/TEST-70Luca Boccassi2023-11-132-18/+32
|\ \ | | | | | | test: skip --tpm2-device-key= tests with older OpenSSL
| * | test: skip --tpm2-device-key= tests with older OpenSSLFrantisek Sumsal2023-11-132-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --tpm2-device-key= requires OpenSSL >= 3 with KDF-SS, so let's skip the test if we're running with older OpenSSL. + systemd-cryptenroll --tpm2-device-key=/tmp/srk.pub --tpm2-pcrs=12:sha256=F5A5FD42D16A20302798EF6ED309979B43003D2320D9F0E8EA9831A92759FB4B /tmp/systemd-cryptsetup-H8y.IMAGE Failed to find TPM2 pcrlock policy file 'pcrlock.json': No such file or directory Allocating context for crypt device /tmp/systemd-cryptsetup-H8y.IMAGE. Trying to open and read device /tmp/systemd-cryptsetup-H8y.IMAGE with direct-io. Trying to open device /tmp/systemd-cryptsetup-H8y.IMAGE without direct-io. Initialising device-mapper backend library. Trying to load LUKS2 crypt type from device /tmp/systemd-cryptsetup-H8y.IMAGE. Crypto backend (OpenSSL 1.1.1k FIPS 25 Mar 2021) initialized in cryptsetup library version 2.3.7. Detected kernel Linux 4.18.0-521.el8.ppc64le ppc64le. ... Failed to find TPM PCR public key file 'tpm2-pcr-public-key.pem': No such file or directory Failed to read TPM2 PCR public key, proceeding without: No such file or directory Can't find symbol Esys_TR_GetTpmHandle: /lib64/libtss2-esys.so.0: undefined symbol: Esys_TR_GetTpmHandle libtss2-esys too old, does not include Esys_TR_GetTpmHandle. Can't find symbol Esys_TR_GetTpmHandle: /lib64/libtss2-esys.so.0: undefined symbol: Esys_TR_GetTpmHandle libtss2-esys too old, does not include Esys_TR_GetTpmHandle. PolicyPCR calculated digest: 9a1f511fb94f030eb21d0332ef2739727bf0ead4ec26a204d15b09cdeb4b2555 Calculating sealed object. Calculating encrypted seed for sealed object. Calculating encrypted seed for ECC sealed object. Calculating KDFe(). KDF-SS requires openssl >= 3. Could not calculate KDFe: Operation not supported Could not calculate encrypted seed: Operation not supported Failed to seal to TPM2: Operation not supported
* | | storagetm: expose more useful metadata for nvme block devicesLennart Poettering2023-11-131-3/+3
| | | | | | | | | | | | | | | | | | don't let the devices to be announced just as model "Linux". Let's instead propagate the underlying block device's model. Also do something reasonably smart for the serial and firmware version fields.
* | | tests: add test for udevadm control -pDavid Tardon2023-11-131-0/+89
|/ / | | | | | | Follow-up for e1593039dbb64e47e3ec81d2c913e7730d94a727 .
* | Merge pull request #29958 from mrc0mmand/journal-line_maxYu Watanabe2023-11-111-2/+2
|\ \ | | | | | | journal: recalculate line_max when stdout stream state changes
| * | test: drop the workaround for unexpected newlinesFrantisek Sumsal2023-11-091-2/+2
| | |
* | | test-network: add test case for issue #29979Yu Watanabe2023-11-103-3/+23
| | |