]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-bus: add test cases for truncated fds 40089/head
authorAllison Karlitskaya <allison.karlitskaya@redhat.com>
Mon, 15 Dec 2025 09:35:56 +0000 (10:35 +0100)
committerAllison Karlitskaya <allison.karlitskaya@redhat.com>
Mon, 26 Jan 2026 15:07:26 +0000 (16:07 +0100)
commit744d589632c545e90ae76853abbfbc90cb530e24
tree983f7ace6fe750cf1c389ca7ca7a1e23eceef6ef
parent6c8de404c98fb9b965cba68360c2db1e3f55b776
sd-bus: add test cases for truncated fds

We add some test cases for the previous commits: first (with Claude's
help) we exercise the message creation API internally by passing it
various combinations of incorrect fds with the might_be_truncated flag
set to true or false.

Then we try more of a "real world" test by lowering our fd limit and
sending ourselves a message via the bus and making sure that we
successfully receive a message that has had at least some of its fds
truncated.
src/libsystemd/sd-bus/test-bus-chat.c
src/libsystemd/sd-bus/test-bus-marshal.c