Skip to content

Conversation

@tbzatek
Copy link
Member

@tbzatek tbzatek commented Sep 25, 2025

Trigger uevents sync on the raid devices and their members when available.
This appears to fix some random test failures.

======================================================================
FAIL: test_md_raid_methods (__main__.MDRaid.test_md_raid_methods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tbzatek/devel/udisks/src/tests/integration-test", line 1855, in test_md_raid_methods
    self.assertIsNotNone(block)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^
AssertionError: unexpectedly None
======================================================================
FAIL: test_delete (test_mdraid.RAID0TestCase.test_delete)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tbzatek/devel/udisks/src/tests/dbus-tests/test_mdraid.py", line 278, in test_delete
    self.assertNotIn(path, objects.keys())
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/org/freedesktop/UDisks2/mdraid/4967f324_24ce30d5_3b23f9cf_b7a2669d' unexpectedly found in dict_keys([dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sdd'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/LIO_ORG_udisks_test_dis_5282611e_2e74_4019_8ca5_d8ceb09dfa15'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/LIO_ORG_udisks_test_dis_65541bbc_0ffc_42cb_b639_6ce91a818511'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/vda2'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/vda'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/LIO_ORG_udisks_test_dis_dd927109_b9e7_462c_b95a_ae7878623713'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sdb'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sde'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/VirtIO_Disk'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/LIO_ORG_udisks_test_dis_0604a813_ce79_45fa_a9ff_eaf82188594e'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/vda3'), dbus.ObjectPath('/org/freedesktop/UDisks2/Manager'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sdc'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/vda1'), dbus.ObjectPath('/org/freedesktop/UDisks2/drives/QEMU_HARDDISK_QM00013'), dbus.ObjectPath('/org/freedesktop/UDisks2/mdraid/4967f324_24ce30d5_3b23f9cf_b7a2669d'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/zram0'), dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sda')])

======================================================================
FAIL: test_add_remove_device (test_mdraid.RAID1TestCase.test_add_remove_device)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tbzatek/devel/udisks/src/tests/dbus-tests/test_mdraid.py", line 346, in test_add_remove_device
    self.assertIsNone(member)
    ~~~~~~~~~~~~~~~~~^^^^^^^^
AssertionError: dbus.Struct((dbus.ObjectPath('/org/freedesktop/UDisks2/block_devices/sdc'), dbus.Int32(-1), dbus.Array([dbus.String('spare')], signature=dbus.Signature('s')), dbus.UInt64(0), dbus.Dictionary({}, signature=dbus.Signature('sv'))), signature=None) is not None

----------------------------------------------------------------------

Trigger uevents sync on the raid devices and their members when available.
This appears to fix some random test failures.
Integration tests are missing synchronization mechanisms and waiting
for an object to appear on the bus. Thus for now, add a nasty sleep.

  ======================================================================
  FAIL: test_md_raid_methods (__main__.MDRaid.test_md_raid_methods)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/tbzatek/devel/udisks/src/tests/integration-test", line 1855, in test_md_raid_methods
      self.assertIsNotNone(block)
      ~~~~~~~~~~~~~~~~~~~~^^^^^^^
  AssertionError: unexpectedly None
@packit-as-a-service
Copy link

Cockpit tests failed for commit a6f17e4. @martinpitt, @jelly, @mvollmer please check.

@martinpitt
Copy link
Contributor

@mvollmer This actually breaks something in TestStorageLvm2.testDegradation. Could you please have a look and check more closely what's wrong?

@tbzatek
Copy link
Member Author

tbzatek commented Oct 8, 2025

This may have changed the order D-Bus objects are (dis)appearing, interfaces are updated and signals sent. Depends on how sensitive your tests are. Hopefully the order didn't break other things.

@tbzatek tbzatek added this to the udisks-2.12.0 milestone Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants