qtconnectivity/tests
Juha Vuolle 336bd4ff9e Close socket descriptor when QBluetoothSocketBluez is destroyed
There are two private QBluetoothSocket backends on Linux:
- QBluetoothSocketBluez is native linux socket implementation
  It is always used by the linux QBluetoothServer, and by
  QBluetoothSocket if Bluez version is < 5.46
- QBluetoothSocketBluezDbus used by QBluetoothSocket when
  Bluez >= 5.46

Leaving the native socket unclosed leaks the resource and eventually
we may run out of descriptors. This is reproducible by creating and
destroying QBluetoothServer instances in a loop.

As a related drive-by:
- Fix bluetooth socket autotest version check. DBus socket is used
  with bluez 5.46+ (for clarity: DBus lowenergycontroller
  is used with bluez 5.42+). This is needed for the test to pass
  with Bluez < 5.46
- Add a clarifying comment on socket close()

Fixes: QTBUG-103067
Change-Id: Idc38c743be09e559ea82bf09c2f9e44e4b80d666
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 3aafe9d5ce)
2022-05-30 13:27:25 +03:00
..
auto Close socket descriptor when QBluetoothSocketBluez is destroyed 2022-05-30 13:27:25 +03:00
bttestui Enable bttestui to test QBluetoothSocket::bytesWritten() signal 2019-04-01 11:37:34 +00:00
global bic: Add 5.{2,3,4}.0 bic data for QtBluetooth and QtNfc 2015-02-17 06:47:29 +00:00
tests.pro Remove nfctestserver test application 2014-10-01 16:23:48 +02:00