Commit Graph
82957 Commits
Author SHA1 Message Date
Luca Boccassi a8f8b3efb5 ci: add test timeout multiplier for ppc64le
The slow tests have timed out at least a couple of times,
so add a multiplier

1252/1633 systemd:libsystemd / test-sd-device      TIMEOUT 30.04s killed by signal 15 SIGTERM
1633/1633 systemd:libsystemd / test-journal-verify TIMEOUT 90.01s killed by signal 15 SIGTERM

Follow-up for 8a1d134144
2025-07-06 12:35:01 +01:00
Yu Watanabe 2643cb1ade core: rename ExecContext.ioprio_set -> .ioprio_is_set
To make it not conflict with syscall ioprio_set().
This is important as we have
```
 #define ioprio_set missing_ioprio_set
```
in missing_syscall.h.
2025-07-06 13:31:40 +02:00
Yu Watanabe c56e251d3f analyze: include unistd.h
The source file uses symbols e.g. execl(), execvp(), _exit(), and so on,
without including unistd.h.

Continuation of 4f18ff2e29.

Follow-up for 9a08000d18.
2025-07-06 13:31:17 +02:00
Yu Watanabe 8d29f31bf6 namespace-util,nsresource: explicitly include sched.h
These source files uses symbols provided by sched.h, e.g.
setns(), unshare(), CLONE_NEWNS, and friends, but they do not explicitly
include sched.h. Currently, it is included indirectly via missing_syscall.h,
which is included by e.g. pidfd-util.h.
Let's explicitly include headers that provides symbols used in the code.

This is similar to 4f18ff2e29, but for sched.h.
2025-07-06 13:28:46 +02:00
cfba9b9eab tree-wide: several cleanups for reading/writing /proc/sys/fs/nr_open
- use unsigned for the return value of read_nr_open(), as it does not
  fail, and the kernel internally uses unsigned for the value,
- when bumping the value by PID1, let's start from the kernel's maximum
  value defined in fs/file.c. The maximum value should be mostly an API
  of the kernel, but may changed in a future, hence still try several
  times if we fail to bump the value.

Co-authored-by: Jared Baur <jaredbaur@fastmail.com>
Co-authored-by: John Rinehart <johnrichardrinehart@gmail.com>
2025-07-06 13:22:56 +02:00
Luca Boccassi 6cc01c8cc4 ukify: fix parsing uname version with '+'
Debian started using '+' in the kernel uname version, which fails the
regex in ukify. Fix it.
2025-07-06 10:49:22 +01:00
Yu Watanabe ebfd56975e cgroup-util: clean up skip_{slices,session,user_manager} (#38089) 2025-07-06 16:37:28 +09:00
Yu Watanabe b0d40944b3 hwdb: fix typo in 70-maker-tools.hwdb, and add the file to meson.build (#38090) 2025-07-06 16:31:23 +09:00
Yu Watanabe e7f04514c1 meson fixlets (#38086)
Some fixes for issues found while doing a minimal aarch64 cross build
2025-07-06 16:27:31 +09:00
AsciiWolf 225de2729d hwdb: fix typo in 70-maker-tools.hwdb 2025-07-05 23:44:08 +02:00
AsciiWolf cdbc500faa hwdb: add 70-maker-tools.hwdb to meson.build
The hwdb file was not added there in 3dcb56f5e0 for some reason
2025-07-05 23:32:09 +02:00
Mike Yuan b6fde0875b core/cgroup: drop outdated comment 2025-07-05 22:26:23 +02:00
Mike Yuan d33104eba2 cgroup-util: clean up skip_{slices,session,user_manager}
Let's avoid obscure memcmp()s in skip_* and instead use
strndupa() to extract the bits we care and call usual
string routines on it.
2025-07-05 22:26:23 +02:00
Mike Yuan 68c703872c string-table: drop unneeded initialization 2025-07-05 22:26:23 +02:00
Luca Boccassi 163e666204 meson: call qemu with -machine virt on aarch64
'qemu-system-aarch64 -device help' fails when no machine is specified.
Use the 'virt' type which seems to be what everyone uses for VMs.
2025-07-05 20:21:51 +01:00
Luca Boccassi ec0bbbd2a9 meson: do not reference variable unless feature that defines it is enabled
SYSTEMD_LANGUAGE_FALLBACK_MAP is used by the localed test, and
language_fallback_map is defined by the localed meson.
If the feature is disabled, the test is not built so the env var
is not needed, and the meson variable is not defined so the build
fails.
2025-07-05 20:21:00 +01:00
Yu Watanabe f89a52e360 analyze: fix typo
Follow-up for 9a08000d18.
2025-07-06 01:42:27 +09:00
Yu Watanabe 7db319b13a man/analyze: fix typo
Follow-up for a839c4b7b7.
2025-07-06 01:41:47 +09:00
Yu Watanabe 0ddf8d9c1d TODO: fix typo 2025-07-06 01:41:14 +09:00
Yu Watanabe 4adf1b1d62 core/socket: fix typo
Follow-up for 1b4ab5a209.
2025-07-06 01:38:14 +09:00
DaanDeMeyer 5fe08a12e6 ask-password-api: Add more debug logging 2025-07-05 20:16:01 +09:00
Luca Boccassi d25e515ebc mkosi: enable arm64 job and test fixlets (#38066)
Enable nspawn job, as there's no nested kvm so VMs are too slow. Fix
some tests that fail in a VM anyway, might add a nightly job later that
runs them.
2025-07-05 11:46:30 +01:00
Mike Yuan 1320e56283 chase: introduce openat_opath_with_automount() helper
Follow-up for c5de7b14ae

chase() is arguably a hot path in our code, hence it deserves
some caching whether open_tree() is available. Moreover,
the manual set of r to -EPERM feels kinda ugly. Let's
instead extract this bit into its own function.
2025-07-05 12:18:55 +02:00
Mike Yuan d75219711f journal-file: const and _pure_'ify journal_file_writable()
Follow-up for 1543c2385c
2025-07-05 11:45:18 +02:00
Yu Watanabe 4df7d51cde networkd-test: stop varlink socket before setting up runtime directories
Follow-up for b0ea79c5b5.
2025-07-05 16:54:19 +09:00
Luca Boccassi a06e64d884 ci: use -p and -f when creating dirs/removing files in mkosi job btrfs setup
It failed at least once:

mkdir: cannot create directory ‘/mnt/mkosi’: File exists
2025-07-05 11:38:10 +09:00
Lennart Poettering aac21825cd seccomp-util: allowlist open_tree() as part of @file-system
Now that we make use of open_tree() in places we previously used
openat() with O_PATH, it makes sense to move it from @mount to
@file-system. Without the OPEN_TREE_CLONE flag open_tree() is after all
unprivileged.

Note that open_tree_attr() I left in @mount, since it's purpose is
really to set mount options when cloning, and that's clearly a mount
related thing, not so much something you could use unpriv.

Follow-up for: c5de7b14ae

This addresses an issue tracked down by Antonio Feijoo: since the commit
that started to use open_tree() various apps started to crash because
they used seccomp filters and sd-device started to use open_tree()
internally.
2025-07-04 22:23:24 +02:00
DaanDeMeyer eabee42517 man: Fix typo 2025-07-04 21:33:36 +02:00
Luca Boccassi b8fe5fa129 Small cleanups for tests (#38063) 2025-07-04 19:24:29 +01:00
Luca Boccassi 7c6e78a6bc mkosi: update debian commit reference to cc380fbc8af2e17165623d16630b7fc3ab4291d0
* cc380fbc8a Install new files for upstream build
* 45f81ec53e Install new files for upstream build
* 105837d0ba Update changelog for 257.7-1 release
* bb17074bfd systemd-boot: reduce harmless noise on cleanup
* 363898fe05 systemd-boot: remove fb too on removal
2025-07-04 20:17:51 +02:00
Gabríel Arthúr Pétursson cd12611a88 man: Fix typo in name of sd_id128_to_uuid_string 2025-07-04 18:42:22 +01:00
Luca Boccassi c0a5801f7b mkosi: enable arm64 job
There's no acceleration, so nested VMs are too slow, only enable
nspawn.
2025-07-04 17:39:29 +01:00
Luca Boccassi 4bffb45bb7 test: /lib64 is not guaranteed to exist, do not try to copy it if not 2025-07-04 17:21:16 +01:00
Luca Boccassi a1000c075b test: bump machinectl timeouts from 10s to 30s
Nested arm64 VMs are very slow, bump the timeouts
2025-07-04 17:21:16 +01:00
Luca Boccassi b6be8bf2c6 test: do not fail if scsi_debug module not available
On Debian it's only built on amd64 kernels, so skip test cases if it
cannot be loaded
2025-07-04 17:21:16 +01:00
DaanDeMeyer 1f0acba512 presets: Disable by default for initrd presets
For initrd presets, we can change the default to disable services
by default instead of enabling by default without breaking compat
so let's do that as it makes much more sense as a default than
enabling everything by default.
2025-07-04 16:22:27 +01:00
ZIHCO 9a08000d18 systemd-analyze: added the verb unit-shell to spawn and attach shell 2025-07-04 16:09:07 +01:00
Luca Boccassi 8a1d134144 ci: enable build/unit test jobs on ppc64le
New workers we got from IBM can be used now. The GHA linter doesn't
recognize them yet, so add a local workaround until the change is
merged in the linter.
2025-07-04 13:35:31 +01:00
Zbigniew Jędrzejewski-Szmek 8d853534ed shared/bus-unit-util: also send empty array for LogFilterPatterns=
Before, for empty input, we'd send an array with one item with an empty
pattern. Use the helper which sends an empty array instead.
bus_exec_context_set_transient_property() ignores items with an empty
pattern, so the result should be the same.

Request in review:
https://github.com/systemd/systemd/pull/37665#discussion_r2182375988.
2025-07-04 12:14:27 +02:00
Zbigniew Jędrzejewski-Szmek 743b09c42c test-bus-unit-util: add a test that attempts to serialize all know transient settings
The samples were partially generated using claude.ai. Those examples are
usually fairly boring. I tried to remove obvious repetitions and add some more
interesting examples, but certainly more edge cases could be added.

In some cases, we are quite lenient and do almost no verification on the sender
side.
2025-07-04 12:14:27 +02:00
Zbigniew Jędrzejewski-Szmek 892a24d42c shared/bus-unit-util: check errors before other conditions
As requested in post-merge review in
https://github.com/systemd/systemd/pull/37665#discussion_r2183755909.
2025-07-04 12:14:27 +02:00
Zbigniew Jędrzejewski-Szmek 54889c6cfb basic/rlimit-util.c: drop duplicate checks
parse_sec() and parse_time() already handle "infinity".
TEST(rlimit_parse_format) covered the first case, also extend it to cover
the second case.
2025-07-04 12:11:00 +02:00
Zbigniew Jędrzejewski-Szmek fb629de435 basic/rlimit-util.c: align table 2025-07-04 12:11:00 +02:00
Zbigniew Jędrzejewski-Szmek 269dcf0115 test-dirent-util: remove strange whitespace 2025-07-04 11:57:52 +02:00
Zbigniew Jędrzejewski-Szmek eb5b854150 tests: use log_tests_skipped more, use shorter form
Also change order to handle errors before 0 in one case.
2025-07-04 11:57:38 +02:00
Lennart Poettering 0fa3ac436c ssh-generator: generate /etc/issue.d/ with VSOCK ssh info data (#37819)
ssh-generator: generate /etc/issue.d/ with VSOCK ssh info data
    
I find myself trying to log into a fresh ParticleOS VM started via
systemd-vmspawn all the time, but I don't know its CID. Let's show it on
the getty screen, to make it immediately visible.
2025-07-04 10:45:45 +02:00
Yu Watanabe 908b0ea15f udev: gracefully handle ENODEV or friends in opening device node
Fixes #38033.
2025-07-04 09:47:47 +02:00
Luca Boccassi 614e0180ea ci: enable arm64 runner for build/unit jobs
Enable only a couple of jobs, to avoid running down capacity too much
2025-07-04 12:39:43 +09:00
Luca Boccassi 60bda55f5b ukify: when decompressing kernel before signing, call verify on decompressed file
Otherwise it will fail as it's an archive, not a PE file:

Invalid DOS header magic
Can't open image /boot/vmlinuz.old
/boot/vmlinuz.old is compressed and cannot be loaded by UEFI, decompressing
+ sbverify --list /boot/vmlinuz.old
=========================== short test summary info ============================
FAILED ../src/ukify/test/test_ukify.py::test_efi_signing_sbsign[3650] - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.
FAILED ../src/ukify/test/test_ukify.py::test_efi_signing_sbsign[None] - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.
FAILED ../src/ukify/test/test_ukify.py::test_inspect - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.

Follow-up for 0dd03215f1
2025-07-04 12:39:43 +09:00
Yu Watanabe c2f3bb742b Add systemd-analyze verb to list runtime unit properties (#37665) 2025-07-04 11:47:38 +09:00