From patchwork Wed Oct 21 14:29:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 1385567 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CGXtz1pCjz9sSG; Thu, 22 Oct 2020 01:29:31 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kVF7F-0002HX-OM; Wed, 21 Oct 2020 14:29:25 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kVF7D-0002HR-M9 for kernel-team@lists.ubuntu.com; Wed, 21 Oct 2020 14:29:23 +0000 Received: from 1.general.ppisati.uk.vpn ([10.172.193.134] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kVF7D-0005sg-Df for kernel-team@lists.ubuntu.com; Wed, 21 Oct 2020 14:29:23 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [G/master][SRU] [PATCH] UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is not present Date: Wed, 21 Oct 2020 16:29:23 +0200 Message-Id: <20201021142923.66419-1-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Seth Forshee BugLink: https://bugs.launchpad.net/bugs/1900855 BugLink: https://bugs.launchpad.net/bugs/1823407 [Impact] Groovy/linux-aws is carrying this patch: 0deca25e3bb1 UBUNTU: SAUCE: selftests: net: don't fail test_bpf when module is not present since the fix is not AWS specific, (and other kernels/selftests might benefit from it), fold it in generic and make it disappear from linux-aws after next rebase. [Fix] Cherry-pick the above SAUCE patch [Regression potential] It's a seltest fix. Acked-by: Thadeu Lima de Souza Cascardo Acked-by: Po-Hsu Lin Signed-off-by: Seth Forshee (cherry picked from commit 0deca25e3bb1263450abb09af79e48bf80b3946e) Signed-off-by: Paolo Pisati Acked-by: Colin Ian King Acked-by: Stefan Bader --- tools/testing/selftests/net/test_bpf.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/test_bpf.sh b/tools/testing/selftests/net/test_bpf.sh index 65677909c574..fa1ec4aa0ada 100755 --- a/tools/testing/selftests/net/test_bpf.sh +++ b/tools/testing/selftests/net/test_bpf.sh @@ -2,7 +2,10 @@ # SPDX-License-Identifier: GPL-2.0 # Runs bpf test using test_bpf kernel module -if /sbin/modprobe -q test_bpf ; then +# Test whether test_bpf module exists +if ! /sbin/modprobe -q -n test_bpf; then + echo "SKIP: test_bpf module not found" +elif /sbin/modprobe -q test_bpf ; then /sbin/modprobe -q -r test_bpf; echo "test_bpf: ok"; else