Run the testers under User Mode Linux with time travel
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest27 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/27 | tools/test-runner: Do not report filesystems already mountedtools/ | +4 | 2 replies | |
| 2/27 | shared/tester: Time out teardownsrc/ | +62 | 0 replies | |
| 3/27 | mgmt-tester: Wait for LL Privacy setup to completetools/ | +190 | 0 replies | |
| 4/27 | iso-tester: Fix leaking socket watchestools/ | +16 | 0 replies | |
| 5/27 | l2cap-tester: Fix race in LE Client - Close socket 2tools/ | +13 | 0 replies | |
| 6/27 | iso-tester: Fix busy waiting in PAST teststools/ | +22 | 0 replies | |
| 7/27 | doc: Enable IPv6 in tester.configdoc/ | +1 | 0 replies | |
| 8/27 | 6lowpan-tester: Find the interface of the controllertools/ | +61 | 0 replies | |
| 9/27 | emulator: Remove -T option from btvirtemulator/ | +1 | 0 replies | |
| 10/27 | doc: Add btvirt documentationMakefile.am doc/ | +154 | 0 replies | |
| 11/27 | emulator: Add vhost-user backendMakefile.tools emulator/ emulator/ | +1087 | 0 replies | |
| 12/27 | emulator: Add vhost-user virtio server to btvirtMakefile.tools doc/ emulator/ +2 more | +391 | 0 replies | |
| 13/27 | emulator: Add time travel calendar to btvirtMakefile.tools doc/ emulator/ +4 more | +981 | 0 replies | |
| 14/27 | emulator: Add virtio console and time travel client to btvirtMakefile.tools emulator/ emulator/ +3 more | +1158 | 0 replies | |
| 15/27 | tools/test-runner: Add User Mode Linux supportdoc/ tools/ | +431 | 0 replies | |
| 16/27 | doc: Add virtio documentationMakefile.am doc/ | +407 | 0 replies | |
| 17/27 | shared/mainloop: Add idle callbackssrc/ src/ src/ +1 more | +169 | 0 replies | |
| 18/27 | shared/timeout: Run timeouts of 0 once idlesrc/ src/ | +17 | 0 replies | |
| 19/27 | shared/tester: Remove GLib dependencyMakefile.am src/ | +156 | 0 replies | |
| 20/27 | emulator/hciemu: Remove GLib dependencyemulator/ | +45 | 0 replies | |
| 21/27 | tools: Build testers that do not need GLib with the mainloopMakefile.tools tools/ tools/ +5 more | +27 | 0 replies | |
| 22/27 | shared/mainloop: Add deferred callbackssrc/ src/ src/ +1 more | +45 | 0 replies | |
| 23/27 | tools: Add socket watches for testers without GLibtools/ tools/ | +452 | 0 replies | |
| 24/27 | tools: Run sco-tester, rfcomm-tester and 6lowpan-tester on the mainloopMakefile.tools tools/ tools/ +1 more | +148 | 0 replies | |
| 25/27 | tools: Run l2cap-tester and iso-tester on the mainloopMakefile.tools tools/ tools/ | +355 | 0 replies | |
| 26/27 | doc/virtio: Update measurements of the testersdoc/ | +14 | 0 replies | |
| 27/27 | doc: Split tester.config for QEMU and User Mode Linuxdoc/ doc/ doc/ +2 more | +370 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH BlueZ v1 00/27] Run the testers under User Mode Linux with time travel
From: Luiz Augusto von Dentz <[email protected]>
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
Signature · 1 line
2.56.0