Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 00/27] Run the testers under User Mode Linux with time travel
@ 2026-10-22 15:46 Luiz Augusto von Dentz
  2026-10-22 15:46 ` [PATCH BlueZ v1 01/27] tools/test-runner: Do not report filesystems already mounted Luiz Augusto von Dentz
                   ` (27 more replies)
  0 siblings, 28 replies; 30+ messages in thread
From: Luiz Augusto von Dentz @ 2026-10-22 15:46 UTC (permalink / raw)
  To: linux-bluetooth

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

This makes test-runner run the kernel testers in a User Mode Linux guest
as well as with QEMU/KVM, and with -T on a simulated clock: btvirt is the
guest's time travel calendar, so timers and timeouts take no real time
and timing is the same on every run. btvirt can also serve controllers to
UML guests as vhost-user virtio devices sharing the calendar, e.g. for
firmware simulators.

Time travel made test races and busy loops visible, fixed first in the
series, and showed that GLib's main loop reads the clock for every source
on every iteration, a system call through the host under UML, so the
testers now run on the mainloop instead.

Wall clock time in seconds, same kernel version and machine, all tests
passing, single runs:

  tester            tests    KVM    UML   UML -T  UML -T
                                          (GLib)  (mainloop)
  mgmt-tester         514   78.2   94.0     42.6    20.3
  l2cap-tester        111    9.2   10.2     10.2     5.6
  iso-tester          141    8.1   11.7     16.3     7.6
  sco-tester           30    4.6    3.1      3.6     2.0
  rfcomm-tester        11    3.6    1.5      2.6     1.5
  smp-tester            8    3.6    1.5      1.5     1.0
  ioctl-tester         28    4.1    2.1      3.1     1.5
  userchan-tester       4    2.6    1.0      1.5     1.0
  bnep-tester           1    2.6    1.0      1.0     1.0

doc/tester.config is split into tester.kvm.config and tester.uml.config,
both building every Bluetooth driver, so a single UML kernel can verify
the drivers and run the testers.

Usage, with a UML kernel built from doc/tester.uml.config:

  tools/test-runner -T -k <linux>/linux -- tools/mgmt-tester

Luiz Augusto von Dentz (27):
  tools/test-runner: Do not report filesystems already mounted
  shared/tester: Time out teardown
  mgmt-tester: Wait for LL Privacy setup to complete
  iso-tester: Fix leaking socket watches
  l2cap-tester: Fix race in LE Client - Close socket 2
  iso-tester: Fix busy waiting in PAST tests
  doc: Enable IPv6 in tester.config
  6lowpan-tester: Find the interface of the controller
  emulator: Remove -T option from btvirt
  doc: Add btvirt documentation
  emulator: Add vhost-user backend
  emulator: Add vhost-user virtio server to btvirt
  emulator: Add time travel calendar to btvirt
  emulator: Add virtio console and time travel client to btvirt
  tools/test-runner: Add User Mode Linux support
  doc: Add virtio documentation
  shared/mainloop: Add idle callbacks
  shared/timeout: Run timeouts of 0 once idle
  shared/tester: Remove GLib dependency
  emulator/hciemu: Remove GLib dependency
  tools: Build testers that do not need GLib with the mainloop
  shared/mainloop: Add deferred callbacks
  tools: Add socket watches for testers without GLib
  tools: Run sco-tester, rfcomm-tester and 6lowpan-tester on the
    mainloop
  tools: Run l2cap-tester and iso-tester on the mainloop
  doc/virtio: Update measurements of the testers
  doc: Split tester.config for QEMU and User Mode Linux

 Makefile.am                   |    5 +-
 Makefile.tools                |   47 +-
 doc/btvirt.rst                |  189 ++++++
 doc/test-functional.rst       |    4 +-
 doc/test-runner.rst           |  150 ++++-
 doc/tester.config             |  118 +---
 doc/tester.kvm.config         |  144 +++++
 doc/tester.uml.config         |  120 ++++
 doc/virtio.rst                |  412 +++++++++++++
 emulator/hciemu.c             |  122 ++--
 emulator/main.c               |  116 +++-
 emulator/timeout.c            |  102 ++++
 emulator/timetravel.c         |  743 ++++++++++++++++++++++++
 emulator/timetravel.h         |   55 ++
 emulator/ttclient.c           |  313 ++++++++++
 emulator/ttclient.h           |   50 ++
 emulator/vconsole.c           |  701 +++++++++++++++++++++++
 emulator/vconsole.h           |   26 +
 emulator/vhost.c              | 1018 +++++++++++++++++++++++++++++++++
 emulator/vhost.h              |   67 +++
 emulator/virtio.c             |  356 ++++++++++++
 emulator/virtio.h             |   20 +
 src/shared/mainloop-ell.c     |   12 +
 src/shared/mainloop-glib.c    |   12 +
 src/shared/mainloop.c         |  177 +++++-
 src/shared/mainloop.h         |    4 +
 src/shared/tester.c           |  306 +++++++---
 src/shared/timeout-glib.c     |   10 +-
 src/shared/timeout-mainloop.c |    9 +-
 tools/6lowpan-tester.c        |  111 +++-
 tools/bnep-tester.c           |    7 -
 tools/ioctl-tester.c          |    6 +-
 tools/iso-tester.c            |  358 +++++++-----
 tools/l2cap-tester.c          |  347 +++++------
 tools/mesh-tester.c           |    1 -
 tools/mgmt-tester.c           |  204 ++++++-
 tools/rfcomm-tester.c         |  105 ++--
 tools/sco-tester.c            |  108 ++--
 tools/smp-tester.c            |   30 +-
 tools/test-runner.c           |  404 ++++++++++++-
 tools/tester-io.c             |  400 +++++++++++++
 tools/tester-io.h             |   52 ++
 tools/tester.h                |    8 +-
 tools/userchan-tester.c       |    1 -
 44 files changed, 6721 insertions(+), 829 deletions(-)
 create mode 100644 doc/btvirt.rst
 mode change 100644 => 120000 doc/tester.config
 create mode 100644 doc/tester.kvm.config
 create mode 100644 doc/tester.uml.config
 create mode 100644 doc/virtio.rst
 create mode 100644 emulator/timeout.c
 create mode 100644 emulator/timetravel.c
 create mode 100644 emulator/timetravel.h
 create mode 100644 emulator/ttclient.c
 create mode 100644 emulator/ttclient.h
 create mode 100644 emulator/vconsole.c
 create mode 100644 emulator/vconsole.h
 create mode 100644 emulator/vhost.c
 create mode 100644 emulator/vhost.h
 create mode 100644 emulator/virtio.c
 create mode 100644 emulator/virtio.h
 create mode 100644 tools/tester-io.c
 create mode 100644 tools/tester-io.h

-- 
2.56.0


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

end of thread, other threads:[~2026-10-29 18:40 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 15:46 [PATCH BlueZ v1 00/27] Run the testers under User Mode Linux with time travel Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 01/27] tools/test-runner: Do not report filesystems already mounted Luiz Augusto von Dentz
2026-10-22 20:02   ` Run the testers under User Mode Linux with time travel bluez.test.bot
2026-10-22 15:46 ` [PATCH BlueZ v1 02/27] shared/tester: Time out teardown Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 03/27] mgmt-tester: Wait for LL Privacy setup to complete Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 04/27] iso-tester: Fix leaking socket watches Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 05/27] l2cap-tester: Fix race in LE Client - Close socket 2 Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 06/27] iso-tester: Fix busy waiting in PAST tests Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 07/27] doc: Enable IPv6 in tester.config Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 08/27] 6lowpan-tester: Find the interface of the controller Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 09/27] emulator: Remove -T option from btvirt Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 10/27] doc: Add btvirt documentation Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 11/27] emulator: Add vhost-user backend Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 12/27] emulator: Add vhost-user virtio server to btvirt Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 13/27] emulator: Add time travel calendar " Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 14/27] emulator: Add virtio console and time travel client " Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 15/27] tools/test-runner: Add User Mode Linux support Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 16/27] doc: Add virtio documentation Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 17/27] shared/mainloop: Add idle callbacks Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 18/27] shared/timeout: Run timeouts of 0 once idle Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 19/27] shared/tester: Remove GLib dependency Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 20/27] emulator/hciemu: " Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 21/27] tools: Build testers that do not need GLib with the mainloop Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 22/27] shared/mainloop: Add deferred callbacks Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 23/27] tools: Add socket watches for testers without GLib Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 24/27] tools: Run sco-tester, rfcomm-tester and 6lowpan-tester on the mainloop Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 25/27] tools: Run l2cap-tester and iso-tester " Luiz Augusto von Dentz
2026-10-22 15:46 ` [PATCH BlueZ v1 26/27] doc/virtio: Update measurements of the testers Luiz Augusto von Dentz
2026-10-22 15:47 ` [PATCH BlueZ v1 27/27] doc: Split tester.config for QEMU and User Mode Linux Luiz Augusto von Dentz
2026-10-29 18:40 ` [PATCH BlueZ v1 00/27] Run the testers under User Mode Linux with time travel patchwork-bot+bluetooth

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