summaryrefslogtreecommitdiffstats
path: root/test (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-04-25mkosi: Only keep failed test journals and other logs for 7 daysDaan De Meyer1-0/+1
The default retention of 90 days seems a bit long, so drop it to 7 days.
2024-04-25mkosi: Only archive outputs in systemd and systemd-stable repositoriesDaan De Meyer1-2/+2
Private forks would very quickly reach their quota or spend lots of money trying to archive all these artifacts, so let's make sure it only happens on our own repositories.
2024-04-25Fix _do_log conditions in log_exec_* macrosŁukasz Stelmach1-4/+4
The expression for calculation of the _do_log values in the log_exec_* macros need to be the same as the unit_log_level_test() function, used to calculate _do_log in unit.h. The only difference between execute.h and unit.h is the lack of the Unit structure. Fixes: b646fc324a ("core: ensure execute/spawn functions can work without Unit object") Fixes: 210ca71cb5 ("core/execute: clean up log_exec_full_errno and friends") Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2024-04-25build(deps): bump pkg/debian from `733ac7c` to `4b1f868`dependabot[bot]1-0/+0
Bumps pkg/debian from `733ac7c` to `4b1f868`. --- updated-dependencies: - dependency-name: pkg/debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
2024-04-25cryptsetup-tokens: fix pin assertsAntonio Alvarez Feijoo3-3/+3
If a user only presses ENTER when the PIN is requested (without actually typing the PIN), an assertion is reached and no other unlock method is requested. ``` sh-5.2# systemctl status systemd-cryptsetup@cr_root × systemd-cryptsetup@cr_root.service - Cryptography Setup for cr_root Loaded: loaded (/etc/crypttab; generated) Drop-In: /etc/systemd/system/systemd-cryptsetup@.service.d └─pcr-signature.conf Active: failed (Result: core-dump) since Thu 2024-04-25 08:44:30 UTC; 10min ago Docs: man:crypttab(5) man:systemd-cryptsetup-generator(8) man:systemd-cryptsetup@.service(8) Process: 559 ExecStartPre=/usr/bin/pcr-signature.sh (code=exited, status=0/SUCCESS) Process: 604 ExecStart=/usr/bin/systemd-cryptsetup attach cr_root /dev/disk/by-uuid/a8cbd937-6975-4e61-9120-ce5c03138700 none x-initrd.attach,tpm2-device=auto (code=dumped, signal=ABRT) Main PID: 604 (code=dumped, signal=ABRT) CPU: 19ms Apr 25 08:44:29 localhost systemd[1]: Starting Cryptography Setup for cr_root... Apr 25 08:44:30 localhost systemd-cryptsetup[604]: Assertion '!pin || pin_size > 0' failed at src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c:60, function cryptsetup_token_open_pin(). Aborting. Apr 25 08:44:30 localhost systemd[1]: systemd-cryptsetup@cr_root.service: Main process exited, code=dumped, status=6/ABRT Apr 25 08:44:30 localhost systemd[1]: systemd-cryptsetup@cr_root.service: Failed with result 'core-dump'. Apr 25 08:44:30 localhost systemd[1]: Failed to start Cryptography Setup for cr_root. ``` In this case, `cryptsetup_token_open_pin()` receives an empty (non-NULL) `pin` with `pin_size` equals to 0. ``` 🔐 Please enter LUKS2 token PIN: Breakpoint 3, cryptsetup_token_open_pin (cd=0x5555555744c0, token=0, pin=0x5555555b3cc0 "", pin_size=0, ret_password=0x7fffffffd380, ret_password_len=0x7fffffffd378, usrptr=0x0) at ../src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c:42 42 void *usrptr /* plugin defined parameter passed to crypt_activate_by_token*() API */) { (gdb) continue Assertion '!pin || pin_size > 0' failed at src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c:60, function cryptsetup_token_open_pin(). Aborting. ```
2024-04-25tree-wide: Use log_setup() everywhereDaan De Meyer38-99/+43
Otherwise the default log target is the console and we won't use the journal socket even if it is available.
2024-04-25mkosi: Make sure systemd-resolved is started on bootDaan De Meyer1-0/+3
2024-04-25portable: Don't fail if /etc/resolv.conf doesn't existDaan De Meyer2-2/+2
The portable profiles assume /etc/resolv.conf exists, which isn't always the case. Let's mark the mounts as optional so we don't fail to start the unit if /etc/resolv.conf doesn't exist.
2024-04-25test: Skip meson integration tests if SYSTEMD_INTEGRATION_TESTS != 1Daan De Meyer4-44/+43
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.
2024-04-25meson: Properly check dependencies of mkosi targetDaan De Meyer1-6/+15
Let's insist on mkosi being found if the integration-tests option is enabled and let's only add dependencies on systemd-journal-remote and systemd-measure if they're being built. Drop ukify from the list as its part of public_programs.
2024-04-25mkosi: Add squashfs-toolsDaan De Meyer4-0/+4
Required for various integration tests.
2024-04-25update NEWSLennart Poettering1-8/+57
2024-04-25test: skip testsuite-50.mountnfsd if kernel/polkit are too oldLuca Boccassi2-1/+4
Need full support of pidfd to work, so skip the test if it's not available
2024-04-25test: use sd-analyze for kernel version check in TEST-62Luca Boccassi1-9/+1
2024-04-25ci: Add the meson logs to failure log artifactsRichard Maw1-0/+1
It is not a lot of use to add --debug to tests without it since only the last 100 lines are printed to console.
2024-04-25ci: Update mkosi versionRichard Maw1-1/+1
The change to add microcode support had a bug in ukify handling that broke when it should have been picked up from ExtraSearchPaths.
2024-04-25update TODOLennart Poettering1-0/+7
2024-04-25execute: make ExecStatus dump more useful by showing passed timeLennart Poettering1-6/+27
Let's show the runtimes of our commands and preparations for them. It's actually quite interesting, we sometimes are irritatingly slow with our handoffs.
2024-04-25swap: hook up with handoff timestampsLennart Poettering1-0/+18
2024-04-25mount: hook up with handoff timestampsLennart Poettering1-0/+18
2024-04-25socket: hookup handoff timestamps with processes forked off by socket unitsLennart Poettering1-0/+18
2024-04-25manager: switch service unit type over to using new handoff timestamping logicLennart Poettering7-37/+74
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.
2024-04-25execute: send handoff timestamps from executor to service managerLennart Poettering5-73/+113
This changes the executor to systematically send handoff timestamps to the service manager if a socket for that is supplied. This drops the code that did this via Type=exec messages, and reverts that part to the old behaviour before 93cb78aee2cff8109a5a70128287732f03d7a062. Benefits of this approach: 1. We can collect the handoff for any command we fork off, regardless if it's ExecStart= something else, regardless whether it's Type=exec, Type=simple or some any other service type, regardless of the unit type. 2. We collect both CLOCK_REALTIME and CLOCK_MONOTONIC, as we do for the other process timestamps. 3. It's entirely backwards compatible, as this doesn't change the protocol between service manager and executor, but just extends it.
2024-04-25manager: add socket for receiving handoff timestamps from forked childrenLennart Poettering4-17/+151
This adds an AF_UNIX socket pair to the manager that we can collect handoff timestamp messages on. The idea is that forked off children send a datagram with a timestamp and we use its sender PID to match it against the right forked off process. This part only implements the receiving side: a socket is created, and listened on. Received datagrams are parsed, verified and then dispatched to the interested units.
2024-04-25core: fix assertions in manager_dispatch_user_lookup_fd()Lennart Poettering1-3/+2
assert_se() should not be used here, these checks are paranoia only and have no side-effect after all. hence fix this to use assert(), or in fact ASSERT_PTR()
2024-04-25varlink: fix varlink_get_peer_pidref() fallbackLennart Poettering1-1/+1
let's properly handle old kernels that have no pidfd, and use regular pids in that case, as intended originally.
2024-04-25errno-util: consider ENOPROTOOPT another "not supported"Lennart Poettering1-1/+2
It's generated by not supported getsocktopt()/setsockopt() options, and it's just another way for saying "not supported", hence treat it as such.
2024-04-25run/run: fix invocation ID handlingYu Watanabe2-5/+4
Fixes a regression introduced by 8157cc0e3e33c97b406cc088cf001ca524154f64.
2024-04-25network/radv: use sd_ndisc_prefix and friends to manage prefixes and so onYu Watanabe2-51/+48
No functional change, just refactoring.
2024-04-25network/radv: rename pref64Prefix -> Prefix64Yu Watanabe3-25/+25
Also this made several coding style cleanups.
2024-04-25network/route: use our definitions of route preferenceYu Watanabe1-4/+3
Including linux/icmpv6.h easily trigger conflicts when another header includes netinet/icmp6.h. Let's drop the dependency and use our definition of the same values.
2024-04-24systemctl: list-jobs: interchange 'waiting for' and 'blocking' in outputRasmus Villemoes1-2/+2
The current output of 'systemctl list-jobs' with the --after and/or --before switches seems backwards. With artificial units # check-oil.service [Unit] Description=Check the oil level Before=engine-ready.target # fill-gas.service [Unit] Description=Fill the tank with gasoline Before=engine-ready.target # engine-ready.target [Unit] Description=The engine is ready [Unit] Description=Start the engine! After=engine-ready.target Wants=engine-ready.target running 'systemctl list-jobs --before --after' produces JOB UNIT TYPE STATE 93 check-oil.service start running └─ waiting for job 94 (engine-ready.target/start) - - 102 fill-gas.service start running └─ waiting for job 94 (engine-ready.target/start) - - 94 engine-ready.target start waiting └─ waiting for job 111 (start-engine.service/start) - - └─ blocking job 93 (check-oil.service/start) - - └─ blocking job 102 (fill-gas.service/start) - - 111 start-engine.service start waiting └─ waiting for job 1 (multi-user.target/start) - - └─ blocking job 94 (engine-ready.target/start) - - Obviously, job 93 is not waiting for job 94, but rather blocking it.
2024-04-24mount,swap: include ExecStatus output in dumpLennart Poettering4-1/+31
socket and service units output there ExecCommand/ExecStatus definitions already, but this was missing in mount/swap. Fix that.
2024-04-24TEST-50-DISSECT: Skip mutable sysext tests on virtiofsDaan De Meyer1-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.
2024-04-24test: Add --debug when running mkosi through integration-test-wrapperRichard Maw1-0/+1
2024-04-24man/systemd.journal-fields: add missing OBJECT_SYSTEMD_INVOCATION_IDMike Yuan1-5/+14
2024-04-24journald-server: drop spuriously doubled '=' for OBJECT_SYSTEMD_INVOCATION_IDMike Yuan1-1/+1
2024-04-24mkosi: Build images with --debug to aid debugging in CIRichard Maw1-0/+1
2024-04-24manager: also port manager_dispatch_sigchld() to manager_get_units_for_pidref()Lennart Poettering1-34/+17
We have pretty much the same code here, let's reuse the common implementation.
2024-04-24manager: split out helper that gets Unit objects with interest in given PidRefLennart Poettering1-32/+65
This is both easier to read and allows us to reuse the helper later.
2024-04-24ci: remove packages.microsoft.comLuca Boccassi2-0/+4
It is not needed, it publishes things like dotnet, and it is often broken, so just remove the sources
2024-04-24manager: port user lookup fd serialization to serialize_fd_many()Lennart Poettering1-21/+10
2024-04-24manager: comprehensively mark manager_dispatch_user_lookup_fd() as staticLennart Poettering1-1/+1
The prototype was static, but the implementation was not. Make both static, this is otherwise too confusing. (This doesn't actually change anything, since the prototype decides about this anyway, but it makes things easier to read.)
2024-04-24capability-util: avoid thread_localLennart Poettering1-23/+24
While stracing PID1's forking off of children I noticed that every single forked off child reads cap_last_cap from procfs. That value is a kernel constant, hence we can save a lot of work if we'd cache it. Thing is, we actually do cache it, in a thread_local cache field. This means that the forked off processes (which are considered new threads) will have to re-query it, even though we already know the result. Hence, let's get rid of the thread_local stuff (given that the value is going to be the same for all threads anyway, and we pretty much have a single thread only anyway). Use an C11 atomic_int instead, which ensures the value is either initialized or not initialized, but we don't need to be concerned of partial initialization. This makes the cap_last_cap reading go away in the children, as strace shows (since cap_last_cap() is already called by PID 1 before fork()ing, anyway).
2024-04-24cryptenroll: fix typo (close parenthesis out of nowhere)Mike Yuan1-1/+1
Follow-up for 8518f4a814426e7a92342298353a4cd9508cb33b
2024-04-24manager: use startswith() return valueLennart Poettering1-3/+3
2024-04-24manager: use proper unicode arrow in dumpLennart Poettering3-6/+6
2024-04-24TEST-50-DISSECT: Use --apparent-size when calling duDaan De Meyer1-2/+2
Otherwise if the file is full of holes we get the wrong size and we'll fail later on.
2024-04-24TEST-50-DISSECT: Skip mountfsd test if the user namespace interface is not ↵Daan De Meyer1-0/+9
supported
2024-04-24core/taint: make short_uid_range() not take a pathZbigniew Jędrzejewski-Szmek1-8/+6
As requested in review.