]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-fd-util: skip test when lacking privileges to create a new namespace
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 11 Dec 2024 12:01:18 +0000 (12:01 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 11 Dec 2024 13:42:11 +0000 (13:42 +0000)
commit630a2e7ee195ca96e102acac8df67a278a879124
treebec0db5cc973531dc0686e13a22749c5b48b1732
parent058a07635f3ff70cc99943dcf4f2a079bc9c28b9
test-fd-util: skip test when lacking privileges to create a new namespace

To reproduce, as an unprivileged user start a docker container and build
and run the unit tests inside it:

$ docker run --rm -ti debian:bookworm bash
...
/* test_close_all_fds */
Successfully forked off '(caf-plain)' as PID 10496.
Skipping PR_SET_MM, as we don't have privileges.
(caf-plain) succeeded.
Failed to fork off '(caf-noproc)': Operation not permitted
Assertion 'r >= 0' failed at src/test/test-fd-util.c:392, function test_close_all_fds(). Aborting.

Partially fixes #35552
src/test/test-fd-util.c