[mutter] tests/invalid-xdg-shell-actions: Avoid flakyness
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests/invalid-xdg-shell-actions: Avoid flakyness
- Date: Sun, 19 Dec 2021 16:20:09 +0000 (UTC)
commit 7992b46566b3a37dbe1a27fee1cb67eb6dc612ab
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Nov 25 10:21:05 2021 +0100
tests/invalid-xdg-shell-actions: Avoid flakyness
The roundtrip in the handle-configure function could in theory (and in
practice in the future) happen to receive another configure event. If we
send yet another invalid geometry the second time, we log one time too
many in the server, which fails the test. Avoid this by ignoring the
second configure event; it's enough to pass through the error handling
path once.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1993>
src/tests/wayland-test-clients/invalid-xdg-shell-actions.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/tests/wayland-test-clients/invalid-xdg-shell-actions.c
b/src/tests/wayland-test-clients/invalid-xdg-shell-actions.c
index 67ff3671e1..da9a6b9715 100644
--- a/src/tests/wayland-test-clients/invalid-xdg-shell-actions.c
+++ b/src/tests/wayland-test-clients/invalid-xdg-shell-actions.c
@@ -173,10 +173,17 @@ handle_xdg_surface_configure (void *data,
struct xdg_surface *xdg_surface,
uint32_t serial)
{
+ static gboolean sent_invalid_once = FALSE;
+
+ if (sent_invalid_once)
+ return;
+
xdg_surface_set_window_geometry (xdg_surface, 0, 0, 0, 0);
draw_main ();
wl_surface_commit (surface);
+ sent_invalid_once = TRUE;
+
g_assert_cmpint (wl_display_roundtrip (display), !=, -1);
running = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]