]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: do not fail when parsing PID that isn't thread-group leader (#40677)
authorLuca Boccassi <bluca@debian.org>
Fri, 13 Feb 2026 21:37:56 +0000 (21:37 +0000)
committerGitHub <noreply@github.com>
Fri, 13 Feb 2026 21:37:56 +0000 (21:37 +0000)
commit10a04f6fd23d23b7c8adc4ad2720dccefe4de9ee
tree43cbcc16ddb8c49bc5cc0cc20feedd4a5e87c432
parenta1c8e5e338baa18d65272066d064a193fd8c8067
test: do not fail when parsing PID that isn't thread-group leader (#40677)

```
TEST-02-UNITTESTS.sh[4382]: [  707.393188] test-cgroup-util[426]: Failed to open pidfd for pid 414: Invalid argument
TEST-02-UNITTESTS.sh[4382]: [  707.393193] test-cgroup-util[426]: src/test/test-cgroup-util.c:249: Assertion failed: Expected "r = proc_dir_read_pidref(d, &pid)" to succeed, but got error: -22/EINVAL
```

The kernel can return EINVAL on pidfd_open() when the selected PID is
not a thread group leader. Don't fail the test, as we are iterating on
everything, so this can seldomly happen.
src/test/test-cgroup-util.c