qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"Daniel P. Berrange" <berrange@redhat.com>
Subject: [Qemu-devel] [PULL v2 5/5] io: fix check for handshake completion in TLS test
Date: Tue,  5 Sep 2017 13:39:35 +0100	[thread overview]
Message-ID: <20170905123935.26645-6-berrange@redhat.com> (raw)
In-Reply-To: <20170905123935.26645-1-berrange@redhat.com>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-io-channel-tls.c b/tests/test-io-channel-tls.c
index ff96877323..a210d01ba5 100644
--- a/tests/test-io-channel-tls.c
+++ b/tests/test-io-channel-tls.c
@@ -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);
-- 
2.13.5

  parent reply	other threads:[~2017-09-05 12:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 12:39 [Qemu-devel] [PULL v2 0/5] Merge QEMU I/O 2017/09/05 v2 Daniel P. Berrange
2017-09-05 12:39 ` [Qemu-devel] [PULL v2 1/5] io: fix temp directory used by test-io-channel-tls test Daniel P. Berrange
2017-09-05 12:39 ` [Qemu-devel] [PULL v2 2/5] util: remove the obsolete non-blocking connect Daniel P. Berrange
2017-09-05 12:39 ` [Qemu-devel] [PULL v2 3/5] io: fix typo in docs comment for qio_channel_read Daniel P. Berrange
2017-09-05 12:39 ` [Qemu-devel] [PULL v2 4/5] io: add new qio_channel_{readv, writev, read, write}_all functions Daniel P. Berrange
2017-09-05 12:39 ` Daniel P. Berrange [this message]
2017-09-05 14:21 ` [Qemu-devel] [PULL v2 0/5] Merge QEMU I/O 2017/09/05 v2 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170905123935.26645-6-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).