From patchwork Wed Aug 30 08:16:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 1827597 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=CReh1Wn3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RbHFY5Cdlz1yfX for ; Wed, 30 Aug 2023 18:16:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 60E606113D; Wed, 30 Aug 2023 08:16:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 60E606113D 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=CReh1Wn3 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 5uBYyXeTOpxQ; Wed, 30 Aug 2023 08:16:46 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id A6A3760E5C; Wed, 30 Aug 2023 08:16:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A6A3760E5C Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5B9CDC0039; Wed, 30 Aug 2023 08:16:45 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5E5EFC0032 for ; Wed, 30 Aug 2023 08:16:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2646E60EA0 for ; Wed, 30 Aug 2023 08:16:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2646E60EA0 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 AqpaR4q_nBdL for ; Wed, 30 Aug 2023 08:16:42 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 57DF760E5C for ; Wed, 30 Aug 2023 08:16:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 57DF760E5C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693383401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Br9mUjpOyIVHsf9HfM77GAn+vsDLnm0KVb7MNSTeJ6M=; b=CReh1Wn3LWgfJlh0Mbn81Q/Hb2D7yduCXV0TcUGieNnlxNvErfoRe6HBPg9b2/tlDCLVo2 A79pk+5chegRd+xQlxA7+x+VOaR2TBgrSE12PPOj9E/5JIV4IbEwB6CLmvVG1qoJWqM5wZ 5N6kKi+AyqbC3PVBBCf32HxmE79F4WU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-422-0QDtLuHiP9WWxsrrdVBV8Q-1; Wed, 30 Aug 2023 04:16:39 -0400 X-MC-Unique: 0QDtLuHiP9WWxsrrdVBV8Q-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 336618028B2 for ; Wed, 30 Aug 2023 08:16:39 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B02F401E63; Wed, 30 Aug 2023 08:16:38 +0000 (UTC) From: David Marchand To: dev@openvswitch.org Date: Wed, 30 Aug 2023 10:16:33 +0200 Message-ID: <20230830081633.2167017-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH] tests/mfex: Don't require python cryptography. 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" Tests using mfex_fuzzy.py will fail on systems lacking the Python cryptography library. cryptography is not required, it is only imported in mfex_fuzzy.py to silence some warnings when scapy tries to load some libraries. Fixes: c3ed0bf34b8a ("tests/mfex: Silence Blowfish/CAST5 deprecation warnings.") Signed-off-by: David Marchand Acked-by: Eelco Chaudron --- tests/mfex_fuzzy.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/mfex_fuzzy.py b/tests/mfex_fuzzy.py index 30028ba7a0..50b9870641 100755 --- a/tests/mfex_fuzzy.py +++ b/tests/mfex_fuzzy.py @@ -3,12 +3,15 @@ import sys import warnings -from cryptography.utils import CryptographyDeprecationWarning -warnings.filterwarnings( - "ignore", - category=CryptographyDeprecationWarning, - message=r"(blowfish|cast5)", -) +try: + from cryptography.utils import CryptographyDeprecationWarning + warnings.filterwarnings( + "ignore", + category=CryptographyDeprecationWarning, + message=r"(blowfish|cast5)", + ) +except ModuleNotFoundError: + pass # flake8: noqa: E402 from scapy.all import RandMAC, RandIP, PcapWriter, RandIP6, RandShort, fuzz