Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: run against dbus-broker bench #23

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

elmarco
Copy link
Contributor

@elmarco elmarco commented Jun 26, 2023

This series allows to run busd against dbus-broker benchmark, with:

DBUS_BROKER_TEST_DAEMON=path-to-busd/target/debug/busd dbus-broker/build/test/dbus/bench-connect

The most important change is the introduction of <busconfig> parsing, and then handling of a few command line options.

The test currently hangs after what looks like an initial successful connection. Further investigation needed.

/!\ This branch needs dbus2/zbus#390

@elmarco elmarco changed the title dbus-broker bench WIP: run against dbus-broker bench Jun 26, 2023
@zeenix
Copy link
Collaborator

zeenix commented Jun 27, 2023

@elmarco the config changes are super desirable even w/o dbus-broker tests in mind. Do you think you can clean this up soon?

@zeenix
Copy link
Collaborator

zeenix commented Jun 29, 2023

@elmarco I rebased this branch on latest git main and put it here. I didn't push it to your branch because I had to remove the unmerged zbus API for it to build.

src/bin/busd.rs Outdated
Comment on lines 81 to 89
let address = config
.elements
.iter()
.rev()
.find_map(|e| match e {
config::Element::Listen(l) => Some(l),
_ => None,
})
.unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think BusConfig should provide specific API for each element so user doesn't have to deal with generic elements. It's exposing the detail that config is xml-based IMO.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also bus module should be handling all this work. The main should remain as thin as possible.

The bus config parsing requires XML.
The tests are from dbus reference implementation. The schema/dtd is a
based on a mix of what is accepted by dbus and dbus-broker.

Some tests are left with FIXME, as they may not fit in the config parser
itself, but rather in the runtime handling of options.

dbus has extra tests which may require installation to run (*.conf.in).
As we need require=false on the following patch.
Atm, we simply handle the last <listen> address!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants