render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame 0102-io-fix-check-for-handshake-completion-in-TLS-test.patch

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