rust-vmm / rust-vmm-container

Container with all dependencies required for running rust-vmm crates integration tests.
Apache License 2.0
65 stars 32 forks source link

pipewire followup #92

Closed stefano-garzarella closed 10 months ago

stefano-garzarella commented 10 months ago

Summary of the PR

This PR reduces pipewire dependencies and install dbus (needed to run pipewire).

CC @epilys

Requirements

Before submitting your PR, please make sure you addressed the following requirements:

stefano-garzarella commented 10 months ago

With this PR, I'm able to start pipewire and dbus in the container to run the vhost-user-sound tests in this way:

export DBUS_SESSION_BUS_ADDRESS="$(/usr/bin/dbus-daemon --system --print-address)"
export XDG_RUNTIME_DIR=/tmp
pipewire &

cd vhost-device/staging
cargo test

Where do you think is the best place to launch these daemons?

I was thinking in the vhost-device custom pipeline (at each command where I need it), but I don't know if there is a better place.

epilys commented 10 months ago

@stefano-garzarella we could add them as Rust tests that don't run by default, then manually execute them in the pipeline. The assert_cmd crate gives a nice interface to run your crate's binary inside a test: https://docs.rs/assert_cmd/latest/assert_cmd/cmd/struct.Command.html#method.cargo_bin

stefano-garzarella commented 10 months ago

@epilys cool! That would be nice.

stefano-garzarella commented 10 months ago

However in both cases we have to modify the pipeline, so the advantage is just having the commands directly in the tests. But is it generic enough to work anywhere, or is it specific to our container? I need to look into it more, but not this week :-(

epilys commented 10 months ago

But is it generic enough to work anywhere, or is it specific to our container?

Hm anywhere with alsa and/or pipewire and dbus, certainly 🤔 . So it'd run in the container and dev machines. I'll make a draft PR with test stubs today/tomorrow for a proof of concept.

epilys commented 10 months ago

See https://github.com/rust-vmm/vhost-device/pull/515

stefano-garzarella commented 10 months ago

Gentle ping :-) This PR should be ready, and with https://github.com/rust-vmm/vhost-device/pull/515 we tested that it works properly.