Run test-functional under User Mode Linux
Status from this message: This series was applied to bluetooth/bluez.git (master)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH BlueZ v1 00/10] Run test-functional under User Mode Linux
From: Luiz Augusto von Dentz <[email protected]>
This allows running test-functional with User Mode Linux (UML) VM hosts, e.g. on machines without KVM support, together with pytest-bluezenv:
https://github.com/bluez/pytest-bluezenv/pull/8
test-runner runs UML guests on time travel by default, as the kernel testers benefit from it, with -R to run on real time, which is what test-functional uses: with traffic between several guests, lock-step makes the tests slower, see the measurements in the documentation.
The slower timing of UML exposed races, which are fixed by:
- adapter: setting Pairable right after an agent registered failed with Busy while bondable was being set by bluetoothd itself. This is fixed in bluetoothd, replying once the pending change completes when it sets the requested value, rather than retrying in the tests.
- test_bap: transports were acquired or selected before bluetoothctl had them configured on its endpoint.
- shared/mcp: commands sent before the Media Control Point Opcodes Supported was read were dropped while the D-Bus call succeeded.
- a2dp, adapter: when the remote reconnects before the disconnection of the previous link is processed, the new AVDTP connection was taken for a transport channel of the stale session and refused, or its service authorization was cancelled by the stale disconnection. A new test reproduces it by stopping bluetoothd across the reconnection.
With these, make check-functional with 4 workers takes about 100-140 s under UML (68 s with KVM on the same machine). Remaining intermittent failures under UML:
- test_bass_past_*_transport_acquire, addressed by the pending "bass:
wait for PAST listener readiness".
- test_hog[sci], reading the HID SCI Information characteristic returns 00, not investigated yet.
Luiz Augusto von Dentz (10):
tools/test-runner: Default to time travel with User Mode Linux tools/test-runner: Unbind virtio devices before powering off UML
emulator: Answer the time of a guest with a skew
adapter: Don't return Busy when a pending change sets the same value
test: functional: wait for BAP transports to be configured shared/mcp: Don't drop commands before supported opcodes are read doc/test-functional: Document User Mode Linux VM hosts
a2dp: Fix refusing the AVDTP connection of a new link
adapter: Don't cancel requests of a new link on stale disconnection
test: Cover A2DP reconnection with a pending disconnection
doc/functional-a2dp.rst | 32 +++++++++ doc/test-functional.rst | 74 +++++++++++++++++++-- doc/test-runner.rst | 23 ++++--- emulator/timetravel.c | 8 ++- profiles/audio/a2dp.c | 7 ++ profiles/audio/avdtp.c | 24 +++++++ profiles/audio/avdtp.h | 1 + profiles/audio/mcp.c | 10 +-- src/adapter.c | 123 +++++++++++++++++++++++++++++++++-- src/shared/mcp.c | 8 ++- test/functional/test_a2dp.py | 36 ++++++++++ test/functional/test_bap.py | 22 ++++--- tools/test-runner.c | 72 +++++++++++++++++--- 13 files changed, 396 insertions(+), 44 deletions(-)
Signature · 1 line
2.56.0