From d1e352d15a6c6e1062ee60198795809435d1bb47 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Wed, 20 Feb 2019 22:17:39 +0100 Subject: tests/kms_lease: exercise uevent And make sure we get the LEASE=1 value, indicating a lessee change. v2: Apparently netlink reading can leak EAGAIN out through udev_monitor_receive_device. No idea what's going on there, so let's wrap some duct tape around it. v3: Lyude reported that we might get a few udev events on startup of the test. Drain those first. v4: Use the igt hotplug library functions, they already take care of all the uevent special cases. Cc: Lyude Paul Cc: Keith Packard Reviewed-by: Lyude Paul Signed-off-by: Daniel Vetter --- lib/igt_kms.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/igt_kms.h') diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 679d4e84..5755b160 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -749,6 +749,8 @@ const unsigned char* igt_kms_get_alt_edid(void); struct udev_monitor *igt_watch_hotplug(void); bool igt_hotplug_detected(struct udev_monitor *mon, int timeout_secs); +bool igt_lease_change_detected(struct udev_monitor *mon, + int timeout_secs); void igt_flush_hotplugs(struct udev_monitor *mon); void igt_cleanup_hotplug(struct udev_monitor *mon); -- cgit v1.2.3