From 128ee2c34290a109d425eb7aacd48892bfeb4452 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Sun, 21 Oct 2012 22:30:26 -0400 Subject: [PATCH] test-client: Make sure we process pending eevents before we verify state Since the send-button-state request comes in on one socket and the wayland event we're looking for comes in on another socket, the order that we process the two in is undefined. Thus, button-test fails intermittently, depending on which event we process first. We change wl_display_flush() to wl_display_roundtrip(), to make sure that we deal with all wayland events before handling test protocol requests. --- tests/test-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-client.c b/tests/test-client.c index f7c9f23..168c663 100644 --- a/tests/test-client.c +++ b/tests/test-client.c @@ -355,7 +355,7 @@ send_button_state(int fd, struct display *display) char buf[64]; int len; - wl_display_flush(display->display); + wl_display_roundtrip(display->display); len = snprintf(buf, sizeof buf, "%u\n", display->input->button_mask); assert(write(fd, buf, len) == len); -- 2.7.4