From 3b8a1c7fed80dc9465115888610b82cd2fed1bd0 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Mon, 20 Jan 2014 23:07:55 +0000 Subject: resources-test: Don't send invalid event Even if nothing receives the even, the arguments still need to be valid. The test is sending out event 0 from the wl_display interface, which is the error event. This requires arg 0 to be a valid object and arg 2 to be a non-null string. The test just leaves that undefined, causing intermittent test failures. As it is, the resource destroy test doesn't need to send an event to validate the various resource destroy hooks, so we can just remove the call to wl_resource_post_event() alltogether. Thanks to Matt Turner for pointing out the failure. --- diff --git a/tests/resources-test.c b/tests/resources-test.c index 514c031..a6ce3ae 100644 --- a/tests/resources-test.c +++ b/tests/resources-test.c @@ -107,9 +107,6 @@ TEST(destroy_res_tst) wl_resource_set_implementation(res, NULL, &destroyed, res_destroy_func); wl_resource_add_destroy_listener(res, &destroy_listener); - /* without implementation this should be ignored .. */ - wl_resource_post_event(res, 0); - id = wl_resource_get_id(res); link = wl_resource_get_link(res); assert(link); -- cgit v0.9.0.2-2-gbebe