Skip to content

test: add sd-bus early-fd test case - #5520

Closed
dvdhrm wants to merge 1 commit into
systemd:mainfrom
dvdhrm:authfd
Closed

dvdhrm wants to merge 1 commit into
systemd:mainfrom
dvdhrm:authfd

Conversation

@dvdhrm

@dvdhrm dvdhrm commented Mar 2, 2017 •

Copy link
Copy Markdown
Contributor

A dbus connection setup is always special. It uses an ASCII line based
protocol to authenticate via SASL. Once that setup is done, normal DBus
messages are sent. Sadly, the line-based protocol does not allow us to
know message sizes up-front. Hence, we have a buffered reader.

Once the authentication phase is done, we use the trailing buffer data
as input for the first message. From then on, we always read exactly the
required sizes from the wire.

Now if the first message in the trailing SASL buffer contains
file-descriptors, we must be able to properly assign them to the
correct message. This commit adds a test case for exactly that. This
sd-bus does not allow us to have full control over the wire scheduling,
we have to hand-craft some messages here to trigger those code paths.

This test currently fails, since sd-bus is broken. So lets delay this until we fixed it.

A dbus connection setup is always special. It uses an ASCII line based
protocol to authenticate via SASL. Once that setup is done, normal DBus
messages are sent. Sadly, the line-based protocol does not allow us to
know message sizes up-front. Hence, we have a buffered reader.

Once the authentication phase is done, we use the trailing buffer data
as input for the first message. From them on, we always read exactly the
required sizes from the wire.

Now if the first message in the trailing SASL buffer contains
file-descriptors, we must be able to properly assign them to the
correct message. This commit adds a test case for exactly that. This
sd-bus does not allow us to have full control over the wire scheduling,
we have to hand-craft some messages here to trigger those code paths.
@dvdhrm dvdhrm added bug 🐛 Programming errors, that need preferential fixing sd-bus labels Mar 2, 2017
@martinpitt martinpitt added the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label Mar 2, 2017
@dvdhrm dvdhrm removed the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label Jun 26, 2017
@dvdhrm

dvdhrm commented Jun 26, 2017

Copy link
Copy Markdown
Contributor Author

The CI-fails here on purpose, since that's the point of the PR.

@sniten sniten left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull requested

Base automatically changed from master to main January 21, 2021 11:53
@keszybz

keszybz commented Oct 1, 2022

Copy link
Copy Markdown
Member

Hmm, should we try to revive this? @dvdhrm can you update this if it's still relevant?

@YHNdnzj YHNdnzj removed the bug 🐛 Programming errors, that need preferential fixing label Apr 8, 2024
@brauner

brauner commented May 13, 2026

Copy link
Copy Markdown
Member

Let's close this issue. If this is still needed then it's no big issue to just open a new pull request for this.

@dvdhrm

dvdhrm commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

This is a bug in sd-bus. By closing it, you remove the last tracking of it.

Not sure anybody is going to fix this, though.

@brauner

brauner commented May 14, 2026

Copy link
Copy Markdown
Member

This is a bug in sd-bus. By closing it, you remove the last tracking of it.

Not sure anybody is going to fix this, though.

Then maybe file an issue instead of letting a pull request linger for almost 10 years? Seems simpler if you're just worried about tracking the issue.

@dvdhrm

dvdhrm commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Then maybe file an issue instead of letting a pull request linger for almost 10 years? Seems simpler if you're just worried about tracking the issue.

Ah no, I am not worried at all. I think the maintainers of sd-bus are worried about tracking bugs in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

6 participants