]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
io: fix check for handshake completion in TLS test
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 29 Aug 2017 16:04:52 +0000 (17:04 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 5 Sep 2017 12:21:58 +0000 (13:21 +0100)
The TLS I/O channel test had mistakenly used && instead
of || when checking for handshake completion. As a
result it could terminate the handshake process before
it had actually completed. This was harmless before but
changes in GNUTLS 3.6.0 exposed this bug and caused the
test suite to fail.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tests/test-io-channel-tls.c

index ff96877323918b5318aa567556205fb5ccad9dc1..a210d01ba538a77a10ab5d8635d3f6072ae19afb 100644 (file)
@@ -218,7 +218,7 @@ static void test_io_channel_tls(const void *opaque)
     mainloop = g_main_context_default();
     do {
         g_main_context_iteration(mainloop, TRUE);
-    } while (!clientHandshake.finished &&
+    } while (!clientHandshake.finished ||
              !serverHandshake.finished);
 
     g_assert(clientHandshake.failed == data->expectClientFail);