qt6-bb10/tests/auto/dbus
Ievgenii Meshcheriakov d3860918ea QDBusConnectionPrivate: Close connection after failed q_dbus_bus_register()
The connection should be closed before executing
q_dbus_connection_unref(). Failing to do so results in an assertion
inside libdbus:

    dbus[1573958]: The last reference on a connection was dropped
    without closing the connection. This is a bug in an application.
    See dbus_connection_unref() documentation for details.
    Most likely, the application was supposed to call
    dbus_connection_close(), since this is a private connection.

The q_dbus_bus_register() may fail if maximum number of active
connections for a bus was reached. This can be tested by creating
a custom bus with "max_completed_connections" parameter set to 0.
Add such a test to tst_qdbusconnection.

Fixes: QTBUG-34613
Change-Id: I6ae7df19bf8b6546c2a504931ba852dc15d35f78
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-12-07 23:36:15 +01:00
..
qdbusabstractadaptor tst_qdbusabstractadapter: Don't skip tests 2023-12-04 20:44:36 +01:00
qdbusabstractinterface CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection QDBusConnectionPrivate: Close connection after failed q_dbus_bus_register() 2023-12-07 23:36:15 +01:00
qdbusconnection_delayed CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_no_app CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_no_bus CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_no_libdbus CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_signalorder CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_spyhook Purge empty BLACKLIST files from tests 2023-11-24 18:09:16 +01:00
qdbuscontext CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusinterface CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbuslocalcalls tst_qdbuslocalcalls: Remove casts to int in arguments to QCOMPARE 2023-12-07 17:43:17 +01:00
qdbusmarshall QDBusConnection: output error message from findSlot 2023-11-22 07:18:08 +01:00
qdbusmetaobject CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusmetatype Fix spelling of D-Bus in the source code 2023-07-06 21:51:29 +02:00
qdbuspendingcall CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbuspendingreply CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusreply CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusservicewatcher CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusthreading CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbustype CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusxmlparser tests/auto/: port Q_FOREACH to ranged-for, local const containers 2023-08-19 16:29:25 +03:00
CMakeLists.txt QDBusConnectionPrivate: Fix handling of queued messages 2023-05-11 19:58:12 +02:00