[Spice-commits] 2 commits - server/tests

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 16 16:38:53 UTC 2018


 server/tests/test-display-base.c |    5 +++--
 server/tests/test-leaks.c        |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 96160ae50c6de08d5f68ebf7a522814af73c3358
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat Nov 10 10:50:52 2018 +0000

    test-leaks: Avoid clashing with test-display-base ports
    
    Is possible that port 5913 is already in use as tests that uses
    test_new will attempt to use ports from 5912 to 5921 so use a port
    not in that range.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>

diff --git a/server/tests/test-leaks.c b/server/tests/test-leaks.c
index 41734c57..64130c22 100644
--- a/server/tests/test-leaks.c
+++ b/server/tests/test-leaks.c
@@ -50,7 +50,7 @@ static void server_leaks(void)
     core = basic_event_loop_init();
     g_assert_nonnull(core);
 
-    result = spice_server_set_tls(server, 5913,
+    result = spice_server_set_tls(server, 5922,
                                   PKI_DIR "ca-cert.pem",
                                   PKI_DIR "server-cert.pem",
                                   PKI_DIR "server-key.pem",
commit 1bad26b663c36b4fbd984e8d46d5fdaebe1d32ce
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat Nov 10 10:56:07 2018 +0000

    test-display-base: Fix warning message avoidance
    
    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>
    Acked-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>

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;
     }


More information about the Spice-commits mailing list