From patchwork Wed May 24 13:39:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Nordahl X-Patchwork-Id: 1785733 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=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=ryhEEk1x; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 4QRC3l3blpz20Pb for ; Wed, 24 May 2023 23:40:03 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A534F83C35; Wed, 24 May 2023 13:40:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A534F83C35 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=ryhEEk1x X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2MyjFZFcdaG1; Wed, 24 May 2023 13:40:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id D1DB983A9F; Wed, 24 May 2023 13:39:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D1DB983A9F Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 64044C0035; Wed, 24 May 2023 13:39:59 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3E971C002A for ; Wed, 24 May 2023 13:39:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0443A41873 for ; Wed, 24 May 2023 13:39:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0443A41873 Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=ryhEEk1x X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vG4YFQOn-epo for ; Wed, 24 May 2023 13:39:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B44B541869 Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by smtp4.osuosl.org (Postfix) with ESMTPS id B44B541869 for ; Wed, 24 May 2023 13:39:56 +0000 (UTC) Received: from frode-threadripper.. (2.general.frode.uk.vpn [10.172.193.251]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 0ACD73F03B for ; Wed, 24 May 2023 13:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1684935594; bh=N3NsYnCLmHwnDp0vn1f68Y+/OvqibuR9ZbGr8P2g4gE=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=ryhEEk1xPb85ycjD7AxPc5diAFXIkL9UoCIN21dUn7YcMyknstKTY4HF6hGkm6vkv iz/O9Crh4RTBQr9bOzsHtMTI4VxiZ6VVQGSbP36D+DVCPF1wjV7tzBvCoeSUnLUqWC 7BugoSUQTFbElY5RytY7jCjSfa1XlD/fVMMVrHW7w0LkO08/jF295mL5jLrTrErkGs y/jhFyE71MD+JwmdxNTsbRbYjLHXTB3WjOwVW8aE8Yom7sI1VR9hJsmqpAHMeFd41n nDVWcwRJJw+GWIkCKdsCrWs5sP8X+C6DJzGXmnGpx52Jmioh/e2vxJrf9OBoPnXyqf HzOKx0FZ8+0PA== From: Frode Nordahl To: dev@openvswitch.org Date: Wed, 24 May 2023 15:39:53 +0200 Message-Id: <20230524133953.2363437-1-frode.nordahl@canonical.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH] tests: layer3-tunnels: Skip bareudp tests if not supported by kernel. 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" The bareudp tests depend on specific kernel configuration to succeed. Skip the test if the feature is not enabled in the running kernel. Signed-off-by: Frode Nordahl Tested-by: Simon Horman Reviewed-by: Simon Horman --- tests/system-kmod-macros.at | 10 ++++++++++ tests/system-layer3-tunnels.at | 2 ++ tests/system-userspace-macros.at | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at index fb15a5a7c..55e7821ce 100644 --- a/tests/system-kmod-macros.at +++ b/tests/system-kmod-macros.at @@ -237,3 +237,13 @@ m4_define([CHECK_L3L4_CONNTRACK_REASM]) # # The kernel module tests do not use TC offload. m4_define([CHECK_NO_TC_OFFLOAD]) + +# OVS_CHECK_BAREUDP() +# +# The feature needs to be enabled in the kernel configuration (CONFIG_BAREUDP) +# to work. +m4_define([OVS_CHECK_BAREUDP], +[ + AT_SKIP_IF([! ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls_uc 2>&1 >/dev/null]) + AT_CHECK([ip link del dev bareudp0]) +]) diff --git a/tests/system-layer3-tunnels.at b/tests/system-layer3-tunnels.at index c37852b21..5546bc879 100644 --- a/tests/system-layer3-tunnels.at +++ b/tests/system-layer3-tunnels.at @@ -155,6 +155,7 @@ AT_CLEANUP AT_SETUP([layer3 - ping over MPLS Bareudp]) OVS_CHECK_MIN_KERNEL(5, 7) +OVS_CHECK_BAREUDP() OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])]) ADD_NAMESPACES(at_ns0, at_ns1) @@ -203,6 +204,7 @@ AT_CLEANUP AT_SETUP([layer3 - ping over Bareudp]) OVS_CHECK_MIN_KERNEL(5, 7) +OVS_CHECK_BAREUDP() OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])]) ADD_NAMESPACES(at_ns0, at_ns1) diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at index 482079386..1cb67d6f6 100644 --- a/tests/system-userspace-macros.at +++ b/tests/system-userspace-macros.at @@ -336,3 +336,11 @@ m4_define([CHECK_L3L4_CONNTRACK_REASM], # # Userspace tests do not use TC offload. m4_define([CHECK_NO_TC_OFFLOAD]) + +# OVS_CHECK_BAREUDP() +# +# The userspace skips all tests that check kernel configuration. +m4_define([OVS_CHECK_BAREUDP], +[ + AT_SKIP_IF([:]) +])