From patchwork Fri Dec 2 13:51:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1711417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fZ5wMhRa; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NNvWR392gz23mf for ; Sat, 3 Dec 2022 00:52:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1E35C611B8; Fri, 2 Dec 2022 13:52:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1E35C611B8 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fZ5wMhRa X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jbYBwaywKRN2; Fri, 2 Dec 2022 13:51:58 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 159BC61181; Fri, 2 Dec 2022 13:51:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 159BC61181 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0BD58C0098; Fri, 2 Dec 2022 13:51:47 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id DC162C0033 for ; Fri, 2 Dec 2022 13:51:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 908734016B for ; Fri, 2 Dec 2022 13:51:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 908734016B Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fZ5wMhRa X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L6d4eyGU9SFu for ; Fri, 2 Dec 2022 13:51:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D4D7740260 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id D4D7740260 for ; Fri, 2 Dec 2022 13:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669989099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vehaNUiDVnD+oWk58FhFgFEG2mCZqEituJtxpbN9Dq8=; b=fZ5wMhRauDvMYX65Ohkkxkl59zXRjR/a/ySh1bhbHQqavvhwKBphhMcp8cGtz3NMfK0q6a Q82vzFqQRIZHO+t42IViu7sd8+ws+6XwzDtmqMFPG14QqnVqEtkMA3Y5KKpKeSeqK4CtXC DkQhQVSqvuO6mpN3suzB/h3kQ8JhyVQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-251-mQ2lbGM3Ob-BtnpOMezCyg-1; Fri, 02 Dec 2022 08:51:38 -0500 X-MC-Unique: mQ2lbGM3Ob-BtnpOMezCyg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 87CEA3C0DDCD for ; Fri, 2 Dec 2022 13:51:38 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.ntdv.lab.eng.bos.redhat.com [10.19.188.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 712E4111E3FA; Fri, 2 Dec 2022 13:51:38 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Fri, 2 Dec 2022 08:51:35 -0500 Message-Id: <20221202135137.1728564-11-xsimonar@redhat.com> In-Reply-To: <20221202135137.1728564-1-xsimonar@redhat.com> References: <20221202135137.1728564-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 10/12] tests: Fixed some tests failing on (very) slow systems X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" When running unit tests on a s390x VM with a x86 host, many tests fail due to the very slow speed of the system. Signed-off-by: Xavier Simonart Acked-by: Mark Michelson Acked-by: Ales Musil --- tests/atlocal.in | 3 +++ tests/network-functions.at | 18 ++++++++++++------ tests/ovn.at | 7 ++++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/tests/atlocal.in b/tests/atlocal.in index 0b9a31276..02e9ce9bb 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -166,6 +166,9 @@ fi # Set HAVE_TCPDUMP find_command tcpdump +# Set HAVE_XXD +find_command xxd + # Set HAVE_LFTP find_command lftp diff --git a/tests/network-functions.at b/tests/network-functions.at index c583bc31e..a2481c55c 100644 --- a/tests/network-functions.at +++ b/tests/network-functions.at @@ -128,12 +128,18 @@ OVS_START_SHELL_HELPERS # hex_to_binary HEXDIGITS # # Converts the pairs of HEXDIGITS into bytes and prints them on stdout. -hex_to_binary() { - printf $(while test -n "$1"; do - printf '\\%03o' 0x$(expr "$1" : '\(..\)') - set -- "${1##??}" - done) -} +if test x$HAVE_XXD = xno; then + hex_to_binary() { + printf $(while test -n "$1"; do + printf '\\%03o' 0x$(expr "$1" : '\(..\)') + set -- "${1##??}" + done) + } +else + hex_to_binary() { + echo $1 | xxd -r -p + } +fi # tcpdump_hex TITLE PACKET # diff --git a/tests/ovn.at b/tests/ovn.at index dcc74649e..11f4cf2e6 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -4420,7 +4420,12 @@ for i in 1 2 3; do done # Gracefully terminate daemons -OVN_CLEANUP([hv1],[hv2],[vtep]) + +OVN_CLEANUP_SBOX([hv1]) +OVN_CLEANUP_SBOX([hv2]) +OVS_WAIT_UNTIL([test `as vtep ovs-vsctl list-ports vtep_bfd | wc -l` -eq 0]) +OVN_CLEANUP([vtep]) + OVN_CLEANUP_VSWITCH([hv3]) AT_CLEANUP