Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp826137rdg; Wed, 11 Oct 2023 06:42:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGe7dvBaqc9Pgxi7q6LKFVz0WPrHDkVkpHX6Bfuz0rsHfA5FmMTSfOGwUCuylbwhf2XFlDz X-Received: by 2002:a17:902:e743:b0:1c9:bf02:6638 with SMTP id p3-20020a170902e74300b001c9bf026638mr4416148plf.51.1697031726942; Wed, 11 Oct 2023 06:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697031726; cv=none; d=google.com; s=arc-20160816; b=ouznhewvWt9joedmQsYhEI9gSP0YR+vE6YdJYqut+r204J3EYmXkOWz4EekJgpGupg Axrb1a2JNIGfcTMwE7diRRjsrQ1MVzaZuwQkdF8yZ1HMNaTIuQUclxpzoP2E1RkCc11c BVHGUjIZGce40849w8osrwNvIxehAo7Gy14+0c34L/QxdCf3QnW7PQOF7qtSmE0EjChd gWekjBYQaN6ez5UoXCr2MKPJPvNVCPkuZf5wnu39tac6SJjb59vDUW4RL4a96C11oPWZ XXQvqXGINv20/kzXZ8ctU1YplQPqwJ84ZNMwRWjuftaKW0zfJzAp9lbLi+Yl6jGPWUZs a+gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=kBo1Q9ZZGOScf2Q/foJ7s3ES0s1m6pzlmqueXFx8NSo=; fh=xY3SGbb1idbM3eggfpCmCK0OKi7EOmyfCbklqs6adrw=; b=ZJw4mV04Fbfb0gNenAqpOROZfo+t4lc9aw7a+y/LQZcJwNEDCuvmSTqFCq1XBkZBcZ U20HEnr1bt+VmLmI39MhAAt+VtQuHcTB6hv+3wN9oXamyB0XiYJIK6g4mNsWUf+HTkqW depiTujDxTZYI50vszutKxI2jKHl+tIbo17RjQJKkki3/gehvFmhlr85rgm6wjIsN+Yg ycsXa9IZApjjBOVd1nFh/w2GXngyA9rVUA7o/1B5fKxzTz1LDuzcT1YREsJ83xEYV9sO dyaR6xA/HyAvVlCNHGpRwEaf1W7PTfGfnIYTh+ClL88LtjnzIj+V8Izkw7klMJCa3QcI zu2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YFiqavXB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id lf4-20020a170902fb4400b001c3a6902ff1si13315792plb.288.2023.10.11.06.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:42:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YFiqavXB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B798E81142F6; Wed, 11 Oct 2023 06:42:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbjJKNlq (ORCPT + 99 others); Wed, 11 Oct 2023 09:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232314AbjJKNlk (ORCPT ); Wed, 11 Oct 2023 09:41:40 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BABA9B0 for ; Wed, 11 Oct 2023 06:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697031650; 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: in-reply-to:in-reply-to:references:references; bh=kBo1Q9ZZGOScf2Q/foJ7s3ES0s1m6pzlmqueXFx8NSo=; b=YFiqavXBRpur84R1pdMdCFAte46+NIUTD1s8hovgY2tLXcRGL+kOVbWjdq9a9wONqd21oK M4lAluWlY7iRv/+t4SdCsOUmY6JQK2+xRSYTqyotREop/cb8wa8H6QvP42b7XkLiama+lh chXK/p4MvS1eiXEORL1Bs3RRAytUgQc= 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-410-6ZWT2-lpM6qY3wHIZZ79Tg-1; Wed, 11 Oct 2023 09:40:42 -0400 X-MC-Unique: 6ZWT2-lpM6qY3wHIZZ79Tg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 668B7946900; Wed, 11 Oct 2023 13:40:42 +0000 (UTC) Received: from RHTPC1VM0NT (unknown [10.22.34.140]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CEA111C060AE; Wed, 11 Oct 2023 13:40:41 +0000 (UTC) From: Aaron Conole To: Paolo Abeni Cc: netdev@vger.kernel.org, dev@openvswitch.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Adrian Moreno , Eelco Chaudron Subject: Re: [PATCH net 1/4] selftests: openvswitch: Add version check for pyroute2 References: <20231006151258.983906-1-aconole@redhat.com> <20231006151258.983906-2-aconole@redhat.com> <96bdb031129cdebfa6e0bdd4342439d9d864518b.camel@redhat.com> Date: Wed, 11 Oct 2023 09:40:41 -0400 In-Reply-To: <96bdb031129cdebfa6e0bdd4342439d9d864518b.camel@redhat.com> (Paolo Abeni's message of "Tue, 10 Oct 2023 12:25:51 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 06:42:03 -0700 (PDT) X-Spam-Level: ** Paolo Abeni writes: > On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote: >> Paolo Abeni reports that on some systems the pyroute2 version isn't >> new enough to run the test suite. Ensure that we support a minimum >> version of 0.6 for all cases (which does include the existing ones). >> The 0.6.1 version was released in May of 2021, so should be >> propagated to most installations at this point. >> >> The alternative that Paolo proposed was to only skip when the >> add-flow is being run. This would be okay for most cases, except >> if a future test case is added that needs to do flow dump without >> an associated add (just guessing). In that case, it could also be >> broken and we would need additional skip logic anyway. Just draw >> a line in the sand now. >> >> Fixes: 25f16c873fb1 ("selftests: add openvswitch selftest suite") >> Reported-by: Paolo Abeni >> Closes: https://lore.kernel.org/lkml/8470c431e0930d2ea204a9363a60937289b7fdbe.camel@redhat.com/ >> Signed-off-by: Aaron Conole >> --- >> tools/testing/selftests/net/openvswitch/openvswitch.sh | 2 +- >> tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 8 ++++++++ >> 2 files changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh >> index 9c2012d70b08e..220c3356901ef 100755 >> --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh >> +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh >> @@ -525,7 +525,7 @@ run_test() { >> fi >> >> if python3 ovs-dpctl.py -h 2>&1 | \ >> - grep "Need to install the python" >/dev/null 2>&1; then >> + grep -E "Need to (install|upgrade) the python" >/dev/null 2>&1; then >> stdbuf -o0 printf "TEST: %-60s [PYLIB]\n" "${tdesc}" >> return $ksft_skip >> fi >> diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py >> index 912dc8c490858..9686ca30d516d 100644 >> --- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py >> +++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py >> @@ -28,6 +28,8 @@ try: >> from pyroute2.netlink import nlmsg_atoms >> from pyroute2.netlink.exceptions import NetlinkError >> from pyroute2.netlink.generic import GenericNetlinkSocket >> + import pyroute2 >> + >> except ModuleNotFoundError: >> print("Need to install the python pyroute2 package.") >> sys.exit(0) >> @@ -1998,6 +2000,12 @@ def main(argv): >> nlmsg_atoms.ovskey = ovskey >> nlmsg_atoms.ovsactions = ovsactions >> >> + # version check for pyroute2 >> + prverscheck = pyroute2.__version__.split(".") >> + if int(prverscheck[0]) == 0 and int(prverscheck[1]) < 6: >> + print("Need to upgrade the python pyroute2 package.") > > I think it would be better to propagate/print also the minimum version > required, so that the user should not have to resort looking at the > self-test sources to learn the required minimum version. ACK - makes sense to me. > Cheers, > > Paolo