Detect dummy/virtual sinks with checkbox-support-pipewire-utils (New)#2317
Detect dummy/virtual sinks with checkbox-support-pipewire-utils (New)#2317tomli380576 wants to merge 29 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2317 +/- ##
==========================================
+ Coverage 55.24% 55.27% +0.02%
==========================================
Files 413 413
Lines 44448 44481 +33
Branches 8194 8202 +8
==========================================
+ Hits 24556 24587 +31
- Misses 19032 19033 +1
- Partials 860 861 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds a new default_device_is_real subcommand to checkbox-support-pipewire-utils that validates whether the default audio/video device is a physical device rather than a virtual or dummy device (e.g., "Dummy Output"). This prevents manual audio test cases from incorrectly passing when no real audio hardware is being tested.
Changes:
- Added
default_device_is_realmethod to detect virtual/dummy audio devices - Integrated device validation checks into audio test jobs with
set -efor proper error handling - Added test coverage for both real and dummy device scenarios
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| providers/base/units/bluetooth/jobs.pxu | Added device validation checks to Bluetooth audio tests with proper error handling |
| providers/base/units/audio/jobs.pxu | Added device validation checks to audio playback and recording tests with proper error handling |
| checkbox-support/checkbox_support/scripts/tests/test_pipewire_utils.py | Added unit tests and test data for device validation functionality |
| checkbox-support/checkbox_support/scripts/tests/test_data/wpctl_happy_path.txt | Test data for real HDMI audio device scenario |
| checkbox-support/checkbox_support/scripts/tests/test_data/wpctl_dummy.txt | Test data for dummy/virtual audio device scenario |
| checkbox-support/checkbox_support/scripts/tests/test_data/pw_dump_happy_path.txt | JSON output for real device validation test |
| checkbox-support/checkbox_support/scripts/tests/test_data/pw_dump_dummy.txt | JSON output for dummy device validation test |
| checkbox-support/checkbox_support/scripts/pipewire_utils.py | Implemented default_device_is_real method with CLI argument parser |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
checkbox-support/checkbox_support/scripts/tests/test_pipewire_utils.py
Outdated
Show resolved
Hide resolved
|
Job related changes are removed for now to not make this pr too big |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR adds a new subcommand to
checkbox-support-pipewire-utilsthat checks whether the default audio/video device is a real device.Example:
Running this command before the record/playback step can prevent manual test cases from passing when the sources/sinks aren't real devices like dummy sink or a pipewire node created by another application.
Resolved issues
The current
audio/alsa_record_playback_internal,audio/playback_headphones,bluetooth/audio-a2dp,bluetooth/audio_record_playback(and many others) are allowed to pass by default when the output device is a Dummy Sink or a virtual pipewire node as long as pipewire reports the device as a source/sink. This check can prevent these tests from passing when the device is not real.Documentation
The basic idea is we ask
wpctlfor the ID of the current default device, then feed that ID intopw-dump. Inside the json returned by pw-dump there's an optional field callednode.virtual. If it's explicitly set to true, then this node is definitely associated with a virtual/dummy device thus shouldn't be tested. Otherwise the device is likely real (or at least pipewire thinks it's real).Some caveats:
video-sink