[Spice-devel] [PATCH spice-server 1/5] test-display-base: Fix warning message avoidance
Eduardo Lima (Etrunko)
etrunko at redhat.com
Fri Nov 16 16:33:23 UTC 2018
On 11/11/18 7:31 AM, Frediano Ziglio wrote:
> 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;
> }
>
Acked-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
--
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com
More information about the Spice-devel
mailing list