From patchwork Tue Mar 6 11:17:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin-Gabriel Serdean X-Patchwork-Id: 882000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zwZ4V5qhBz9shP for ; Tue, 6 Mar 2018 22:17:30 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 32FD1E06; Tue, 6 Mar 2018 11:17:28 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 00C8DE03 for ; Tue, 6 Mar 2018 11:17:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 766265EB for ; Tue, 6 Mar 2018 11:17:26 +0000 (UTC) X-Originating-IP: 85.186.139.13 Received: from localhost.localdomain (unknown [85.186.139.13]) (Authenticated sender: aserdean@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 47958C5A93; Tue, 6 Mar 2018 12:17:23 +0100 (CET) From: Alin Gabriel Serdean To: dev@openvswitch.org Date: Tue, 6 Mar 2018 13:17:12 +0200 Message-Id: <20180306111712.3484-1-aserdean@ovn.org> X-Mailer: git-send-email 2.16.1.windows.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Alin Gabriel Serdean Subject: [ovs-dev] [PATCH] tests-windows: Fix SSL ovsdb test which is hanging X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The test: `1827. ovsdb-server.at:490: testing SSL db: implementation ...` is hanging on Windows because the returned in the case the client failed to connect is "Unknown error" vs the normal "Protocol error". Update the test to accommodate for this. Signed-off-by: Alin Gabriel Serdean --- tests/ovsdb-server.at | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at index 968356781..7d94e1c71 100644 --- a/tests/ovsdb-server.at +++ b/tests/ovsdb-server.at @@ -569,11 +569,19 @@ AT_CHECK( [stderr], [test ! -e pid || kill `cat pid`]) cat stderr > output -AT_CHECK_UNQUOTED( - [grep "failed to connect" output], [0], - [ovsdb-client: failed to connect to "ssl:127.0.0.1:$SSL_PORT" (Protocol error) -], - [ignore], [test ! -e pid || kill `cat pid`]) +if test "$IS_WIN32" = "yes"; then + AT_CHECK_UNQUOTED( + [grep "failed to connect" output], [0], + [ovsdb-client: failed to connect to "ssl:127.0.0.1:$SSL_PORT" (Unknown error) +], + [ignore], [test ! -e pid || kill `cat pid`]) +else + AT_CHECK_UNQUOTED( + [grep "failed to connect" output], [0], + [ovsdb-client: failed to connect to "ssl:127.0.0.1:$SSL_PORT" (Protocol error) +], + [ignore], [test ! -e pid || kill `cat pid`]) +fi # Check that when ciphers are not compatible, that a negotiation # failure occurs. AT_CHECK( @@ -593,11 +601,19 @@ AT_CHECK( [stderr], [test ! -e pid || kill `cat pid`]) cat stderr > output -AT_CHECK_UNQUOTED( - [grep "failed to connect" output], [0], - [ovsdb-client: failed to connect to "ssl:127.0.0.1:$SSL_PORT" (Protocol error) -], - [ignore], [test ! -e pid || kill `cat pid`]) +if test "$IS_WIN32" = "yes"; then + AT_CHECK_UNQUOTED( + [grep "failed to connect" output], [0], + [ovsdb-client: failed to connect to "ssl:127.0.0.1:$SSL_PORT" (Unknown error) +], + [ignore], [test ! -e pid || kill `cat pid`]) +else + AT_CHECK_UNQUOTED( + [grep "failed to connect" output], [0], + [ovsdb-client: failed to connect to "ssl:127.0.0.1:$SSL_PORT" (Protocol error) +], + [ignore], [test ! -e pid || kill `cat pid`]) +fi # The error message for being unable to negotiate a shared ciphersuite # is 'sslv3 alert handshake failure'. This is not the clearest message. AT_CHECK_UNQUOTED(