carlwgeorge / rpms / qemu

Forked from rpms/qemu a year ago
Clone
a8c6008
From: "Daniel P. Berrange" <berrange@redhat.com>
a8c6008
Date: Tue, 29 Aug 2017 17:04:52 +0100
a8c6008
Subject: [PATCH] io: fix check for handshake completion in TLS test
a8c6008
a8c6008
The TLS I/O channel test had mistakenly used && instead
a8c6008
of || when checking for handshake completion. As a
a8c6008
result it could terminate the handshake process before
a8c6008
it had actually completed. This was harmless before but
a8c6008
changes in GNUTLS 3.6.0 exposed this bug and caused the
a8c6008
test suite to fail.
a8c6008
a8c6008
Reviewed-by: Eric Blake <eblake@redhat.com>
a8c6008
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
a8c6008
---
a8c6008
 tests/test-io-channel-tls.c | 2 +-
a8c6008
 1 file changed, 1 insertion(+), 1 deletion(-)
a8c6008
a8c6008
diff --git a/tests/test-io-channel-tls.c b/tests/test-io-channel-tls.c
59eb7ad
index 8eaa208e1b..e7c80f46cf 100644
a8c6008
--- a/tests/test-io-channel-tls.c
a8c6008
+++ b/tests/test-io-channel-tls.c
a8c6008
@@ -218,7 +218,7 @@ static void test_io_channel_tls(const void *opaque)
a8c6008
     mainloop = g_main_context_default();
a8c6008
     do {
a8c6008
         g_main_context_iteration(mainloop, TRUE);
a8c6008
-    } while (!clientHandshake.finished &&
a8c6008
+    } while (!clientHandshake.finished ||
a8c6008
              !serverHandshake.finished);
a8c6008
 
a8c6008
     g_assert(clientHandshake.failed == data->expectClientFail);