[Spice-devel] [PATCH spice-server 1/5] test-display-base: Fix warning message avoidance

Frediano Ziglio fziglio at redhat.com
Sun Nov 11 09:31:28 UTC 2018


test_new function attempts to detect attempts to listen to tcp ports
already in listening state detecting some messages during
spice_server_init. However the check is wrong (broken in recent
34a44d3e940bcc "test-display-base: Avoid spurious errors due to listen
failures") and incomplete (missing message).

To better test this conditions put some of the ports in listening
state (like with a "nc -l 5912 & nc -l 5913 &" command) and run
tests in parallel (like with a "make check -j" command).

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/tests/test-display-base.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/tests/test-display-base.c b/server/tests/test-display-base.c
index f58f76d3..e9f6c54d 100644
--- a/server/tests/test-display-base.c
+++ b/server/tests/test-display-base.c
@@ -905,8 +905,9 @@ static gboolean ignore_in_use_failures(const gchar *log_domain,
     if ((log_level & G_LOG_LEVEL_WARNING) == 0)  {
         return true;
     }
-    if (strstr(message, "reds_init_socket: binding socket to ") == NULL || // bind failure
-        strstr(message, "reds_init_socket: listen: ") == NULL) { // listen failure
+    if (strstr(message, "reds_init_socket: binding socket to ") == NULL && // bind failure
+        strstr(message, "reds_init_socket: listen: ") == NULL && // listen failure
+        strstr(message, "Failed to open SPICE sockets") == NULL) { // global
         g_print("XXX [%s]\n", message);
         return true;
     }
-- 
2.17.2



More information about the Spice-devel mailing list