Skip to content

Better handling of udev_device_get_is_initialized #267

Open
@benzea

Description

@benzea

So, device are initialised if they have (valid?) entries in /run/udev/data/$ID or if a uevent was received. Now, umockdev never creates entries in /run/udev/data/$ID, wo device are considered "not initialised" unless the uevent was processed by the client.

On the one hand, I can abuse this for tests in libusb (though maybe I should not …):
libusb/libusb#1625

On the other hand, this is just broken. umockdev should probably just write out the database file when the ("add") uevent is fired. But, it would be useful if it then also added API to prevent the uevent from being fired so that one can test the enumeration corner case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions