Skip to content
Snippets Groups Projects
Commit f49438b6 authored by Philip Withnall's avatar Philip Withnall Committed by Sjoerd Simons
Browse files

bluez: Port Bluetooth tests to use BlueZ 5


This is effectively a complete rewrite of the tests. Some of the common
functionality has been split out to apertis_tests_lib. The external
interfaces and behaviour of the tests should have remained unchanged.

The tests needed to change considerably in structure because of the
difference between how BlueZ 4 and BlueZ 5 handle device objects. BlueZ
4 only creates a device object if an adapter is paired with that device.
BlueZ 5 creates it as soon as a device is discovered.

Apart from that, the main differences between the two APIs are in the
shift to standard D-Bus interfaces (Properties and ObjectManager) in
BlueZ 5.

While rewriting the tests, a lot of multi-second sleep() calls have been
removed in favour of waiting for the relevant completion signals from
the D-Bus API. This means some potentially unbounded waits if the
Bluetooth daemon misbehaves or ends up in a state the unit test does not
expect. But otherwise it means faster test execution and no failures due
to races between the sleep() and the Bluetooth daemon completing an
operation.

[ Small updates for review  comments ]

Reviewed-by: default avatarPhilip Withnall <philip.withnall@collabora.co.uk>
Signed-off-by: default avatarSjoerd Simons <sjoerd.simons@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D971
parent f0980f6d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment