Skip to content

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

Open
dvdhrm wants to merge 1 commit intosystemd:mainfrom
dvdhrm:authfd
Open

test: add sd-bus early-fd test case#5520
dvdhrm wants to merge 1 commit intosystemd:mainfrom
dvdhrm:authfd

Conversation

@dvdhrm
Copy link
Copy Markdown
Contributor

@dvdhrm dvdhrm commented Mar 2, 2017

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
Copy link
Copy Markdown
Contributor Author

dvdhrm commented Jun 26, 2017

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

Copy link
Copy Markdown

@SNiTEBoBy SNiTEBoBy left a comment

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
Copy link
Copy Markdown
Member

keszybz commented Oct 1, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants