tst-bluetooth-device / DeviceTests failing starting with python-dbusmock 0.26.0
Interestingly up until python-dbusmock
0.26.0 all tests pass just fine, but 0.25.0 -> 0.26.0 broke both DeviceTest::testGetIconName()
and DeviceTest::testGetType()
with 0.27.3 -> 0.27.4 also additionally breaking DeviceTest::testIsPaired()
.
Hopefully relevant parts of failing test logs:
QWARN : DeviceTest::testGetIconName() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905886.881 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
FAIL! : DeviceTest::testGetIconName() Compared values are not the same
Actual (m_device->getIconName()) : "image://theme/"
Expected (QString("image://theme/phone-smartphone-symbolic")): "image://theme/phone-smartphone-symbolic"
Loc: [/builddir/lomiri-system-settings-2a907a59e31cce79cd114bc1640b6d38473bea7c/tests/plugins/bluetooth/tst_device.cpp(105)]
...
QWARN : DeviceTest::testGetType() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905887.448 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
FAIL! : DeviceTest::testGetType() Compared values are not the same
Loc: [/builddir/lomiri-system-settings-2a907a59e31cce79cd114bc1640b6d38473bea7c/tests/plugins/bluetooth/tst_device.cpp(110)]
...
QWARN : DeviceTest::testIsPaired() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905888.012 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
FAIL! : DeviceTest::testIsPaired() Compared values are not the same
Actual (m_device->isPaired()): 0
Expected (true) : 1
Loc: [/builddir/lomiri-system-settings-2a907a59e31cce79cd114bc1640b6d38473bea7c/tests/plugins/bluetooth/tst_device.cpp(115)]
Clock to show/hide the full log of tailing tests with python-dbusmock 0.28.4
Start 10: tst-bluetooth-device
10/12 Test #10: tst-bluetooth-device .............***Failed 9.82 sec
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-deathmist'
********* Start testing of DeviceTest *********
Config: Using QtTest library 5.15.5, Qt 5.15.5 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.2.1 20201203), unknown unknown
PASS : DeviceTest::initTestCase()
1664905885.752 AddAdapter "new0" "bluetoothTest"
1664905885.753 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905885.754 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905885.754 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testGetName() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905885.754 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
PASS : DeviceTest::testGetName()
1664905886.315 AddAdapter "new0" "bluetoothTest"
1664905886.315 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905886.315 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905886.316 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testGetAddress() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905886.316 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
PASS : DeviceTest::testGetAddress()
1664905886.880 AddAdapter "new0" "bluetoothTest"
1664905886.880 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905886.880 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905886.881 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testGetIconName() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905886.881 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
FAIL! : DeviceTest::testGetIconName() Compared values are not the same
Actual (m_device->getIconName()) : "image://theme/"
Expected (QString("image://theme/phone-smartphone-symbolic")): "image://theme/phone-smartphone-symbolic"
Loc: [/builddir/lomiri-system-settings-2a907a59e31cce79cd114bc1640b6d38473bea7c/tests/plugins/bluetooth/tst_device.cpp(105)]
1664905887.446 AddAdapter "new0" "bluetoothTest"
1664905887.446 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905887.446 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905887.447 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testGetType() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905887.448 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
FAIL! : DeviceTest::testGetType() Compared values are not the same
Loc: [/builddir/lomiri-system-settings-2a907a59e31cce79cd114bc1640b6d38473bea7c/tests/plugins/bluetooth/tst_device.cpp(110)]
1664905888.011 AddAdapter "new0" "bluetoothTest"
1664905888.011 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905888.011 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905888.012 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testIsPaired() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905888.012 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
FAIL! : DeviceTest::testIsPaired() Compared values are not the same
Actual (m_device->isPaired()): 0
Expected (true) : 1
Loc: [/builddir/lomiri-system-settings-2a907a59e31cce79cd114bc1640b6d38473bea7c/tests/plugins/bluetooth/tst_device.cpp(115)]
1664905888.577 AddAdapter "new0" "bluetoothTest"
1664905888.577 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905888.577 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905888.578 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testIsTrusted() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905888.578 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
1664905889.079 Set /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1.Trusted True
1664905889.079 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Trusted": True} []
PASS : DeviceTest::testIsTrusted()
1664905889.641 AddAdapter "new0" "bluetoothTest"
1664905889.641 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905889.642 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905889.642 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testGetConnection() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905889.643 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
PASS : DeviceTest::testGetConnection()
1664905890.201 AddAdapter "new0" "bluetoothTest"
1664905890.202 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905890.202 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905890.202 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testGetStrength() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905890.203 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
PASS : DeviceTest::testGetStrength()
1664905890.764 AddAdapter "new0" "bluetoothTest"
1664905890.765 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905890.765 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905890.765 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testGetPath() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905890.766 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
PASS : DeviceTest::testGetPath()
1664905891.324 AddAdapter "new0" "bluetoothTest"
1664905891.324 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905891.324 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905891.325 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testMakeTrusted() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905891.325 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
1664905891.826 Set /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1.Trusted True
1664905891.826 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Trusted": True} []
1664905892.327 Set /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1.Trusted False
1664905892.327 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Trusted": False} []
PASS : DeviceTest::testMakeTrusted()
1664905892.888 AddAdapter "new0" "bluetoothTest"
1664905892.888 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905892.888 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905892.889 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testConnect() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905892.889 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
1664905893.390 Connect
1664905893.391 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Connected": True} []
1664905893.391 ConnectDevice "new0" "00:00:de:ad:be:ef"
1664905893.391 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Blocked": False, "Connected": True} []
1664905893.391 Set /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1.Trusted True
1664905893.391 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Trusted": True} []
PASS : DeviceTest::testConnect()
1664905893.957 AddAdapter "new0" "bluetoothTest"
1664905893.958 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0" {"org.bluez.Adapter1": {"UUIDs": ["00001200-0000-1000-8000-00805f9b34fb", "00001800-0000-1000-8000-00805f9b34fb", "00001801-0000-1000-8000-00805f9b34fb", "0000110e-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb"], "Discoverable": False, "Discovering": False, "Pairable": True, "Powered": True, "Address": "00:01:02:03:04:05", "AddressType": "public", "Alias": "bluetoothTest", "Modalias": "usb:v1D6Bp0245d050A", "Name": "bluetoothTest", "Class": 268, "DiscoverableTimeout": 180, "PairableTimeout": 0}}
1664905893.958 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664905893.959 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
QWARN : DeviceTest::testDisconnect() Failed to pair mock device: "Invalid arguments: More items found in D-Bus signature than in Python arguments"
1664905893.959 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
1664905894.460 Connect
1664905894.460 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Connected": True} []
1664905894.460 ConnectDevice "new0" "00:00:de:ad:be:ef"
1664905894.460 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Blocked": False, "Connected": True} []
1664905894.460 Set /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1.Trusted True
1664905894.460 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Trusted": True} []
1664905894.961 Disconnect
1664905894.961 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Connected": False} []
1664905894.961 DisconnectDevice "new0" "00:00:de:ad:be:ef"
1664905894.961 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"Connected": False} []
PASS : DeviceTest::testDisconnect()
PASS : DeviceTest::cleanupTestCase()
Totals: 11 passed, 3 failed, 0 skipped, 0 blacklisted, 9771ms
********* Finished testing of DeviceTest *********
For now I've figured out fixing Failed to pair mock device
errors as well as DeviceTest::testIsPaired()
simply required updating tests/plugins/bluetooth/fakebluez.*
with https://github.com/martinpitt/python-dbusmock/commit/4e7998a as a reference; for now the testGetIconName()
and testGetType()
tests are still failing locally for me and with some manually added logging it seems as if our Device
object doesn't get synced with the correct state of the mocked device properties:
1664954972.234 AddDevice "new0" "00:00:de:ad:be:ef" "My Phone"
1664954972.235 emit / org.freedesktop.DBus.ObjectManager.InterfacesAdded "/org/bluez/new0/dev_00_00_DE_AD_BE_EF" {"org.bluez.Device1": {"Address": "00:00:de:ad:be:ef", "AddressType": "public", "Name": "My Phone", "Icon": "", "Class": 0, "Appearance": 0, "UUIDs": [], "Paired": False, "Connected": False, "Trusted": False, "Blocked": False, "WakeAllowed": False, "Alias": "My Phone", "Adapter": "/org/bluez/new0", "LegacyPairing": False, "Modalias": "", "RSSI": -79, "TxPower": 0, "ManufacturerData": [], "ServiceData": [], "ServicesResolved": False, "AdvertisingFlags": [], "AdvertisingData": []}}
1664954972.235 PairDevice "new0" "00:00:de:ad:be:ef" 5898764
1664954972.235 emit /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.freedesktop.DBus.Properties.PropertiesChanged "org.bluez.Device1" {"UUIDs": ["00001105-0000-1000-8000-00805f9b34fb", "0000110a-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb", "00001112-0000-1000-8000-00805f9b34fb", "00001115-0000-1000-8000-00805f9b34fb", "00001116-0000-1000-8000-00805f9b34fb", "0000111f-0000-1000-8000-00805f9b34fb", "0000112f-0000-1000-8000-00805f9b34fb", "00001200-0000-1000-8000-00805f9b34fb"], "Paired": True, "LegacyPairing": True, "Blocked": False, "Modalias": "bluetooth:v000Fp1200d1436", "Class": 5898764, "Icon": "phone"} []
1664954972.235 GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
QINFO : DeviceTest::testGetIconName() Device::initDevice() proceeding to call setProperties()
QINFO : DeviceTest::testGetIconName() Device::setProperties() properties = QMap(("Adapter", QVariant(QDBusObjectPath, ))("Address", QVariant(QString, "00:00:de:ad:be:ef"))("AddressType", QVariant(QString, "public"))("AdvertisingData", QVariant(QDBusArgument, ))("AdvertisingFlags", QVariant(QDBusArgument, ))("Alias", QVariant(QString, "My Phone"))("Appearance", QVariant(ushort, 0))("Blocked", QVariant(bool, false))("Class", QVariant(uint, 0))("Connected", QVariant(bool, false))("Icon", QVariant(QString, ""))("LegacyPairing", QVariant(bool, true))("ManufacturerData", QVariant(QDBusArgument, ))("Modalias", QVariant(QString, ""))("Name", QVariant(QString, "My Phone"))("Paired", QVariant(bool, true))("RSSI", QVariant(short, -79))("ServiceData", QVariant(QDBusArgument, ))("ServicesResolved", QVariant(bool, false))("Trusted", QVariant(bool, false))("TxPower", QVariant(short, 0))("UUIDs", QVariant(QStringList, ("00001105-0000-1000-8000-00805f9b34fb", "0000110a-0000-1000-8000-00805f9b34fb", "0000110c-0000-1000-8000-00805f9b34fb", "00001112-0000-1000-8000-00805f9b34fb", "00001115-0000-1000-8000-00805f9b34fb", "00001116-0000-1000-8000-00805f9b34fb", "0000111f-0000-1000-8000-00805f9b34fb", "0000112f-0000-1000-8000-00805f9b34fb", "00001200-0000-1000-8000-00805f9b34fb")))("WakeAllowed", QVariant(bool, false)))
QINFO : DeviceTest::testGetIconName() Device::updateProperty() updating type from Appearance 0
QINFO : DeviceTest::testGetIconName() Device::updateProperty() updating type from Class 0
QINFO : DeviceTest::testGetIconName() Device::updateProperty() update fallback icon ""
QINFO : DeviceTest::testGetIconName() Device::updateIcon() type = 0
QINFO : DeviceTest::testGetIconName() Device::updateIcon() type is fallback ""
QINFO : DeviceTest::testGetIconName() Device::setIconName() iconName = "image://theme/"
Specifically the problem appears to be Modalias
, Class
and Icon
are not getting updated anymore after m_bluezMock->pairDevice("00:00:de:ad:be:ef");
, or rather after DeviceTest::init() processEvents();
the GetAll /org/bluez/new0/dev_00_00_DE_AD_BE_EF org.bluez.Device1
doesn't appear to possibly return accurate details?
While fixing these we need to remember focal
has python-dbusmock
0.19, so we need either a:
- Way to determine the
python-dbusmock
version from C++ tests - Configure-time flag to toggle the new behavior so all tests can pass with recent (0.27.4+)
python-dbusmock
versions
jammy
has 0.27.5 so the above hacks can be dropped by then at the latest.
Cc. @sunweaver