Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 00/10] Run test-functional under User Mode Linux
@ 2026-10-30 21:29 Luiz Augusto von Dentz
  2026-10-30 21:29 ` [PATCH BlueZ v1 01/10] tools/test-runner: Default to time travel with " Luiz Augusto von Dentz
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Luiz Augusto von Dentz @ 2026-10-30 21:29 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-10-30 23:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 21:29 [PATCH BlueZ v1 00/10] Run test-functional under User Mode Linux Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 01/10] tools/test-runner: Default to time travel with " Luiz Augusto von Dentz
2026-10-30 23:58   ` Run test-functional under " bluez.test.bot
2026-10-30 21:29 ` [PATCH BlueZ v1 02/10] tools/test-runner: Unbind virtio devices before powering off UML Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 03/10] emulator: Answer the time of a guest with a skew Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 04/10] adapter: Don't return Busy when a pending change sets the same value Luiz Augusto von Dentz
2026-10-30 21:34   ` Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 05/10] test: functional: wait for BAP transports to be configured Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 06/10] shared/mcp: Don't drop commands before supported opcodes are read Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 07/10] doc/test-functional: Document User Mode Linux VM hosts Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 08/10] a2dp: Fix refusing the AVDTP connection of a new link Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 09/10] adapter: Don't cancel requests of a new link on stale disconnection Luiz Augusto von Dentz
2026-10-30 21:29 ` [PATCH BlueZ v1 10/10] test: Cover A2DP reconnection with a pending disconnection Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox