From patchwork Tue Aug 2 16:59:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kleber Sacilotto de Souza X-Patchwork-Id: 1663091 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=QRcMvrIn; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ly1SR4Vy4z9sGR for ; Wed, 3 Aug 2022 02:59:51 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oIvFA-0001dy-5Z; Tue, 02 Aug 2022 16:59:44 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oIvF8-0001cz-Ey for kernel-team@lists.ubuntu.com; Tue, 02 Aug 2022 16:59:42 +0000 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (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-internal-0.canonical.com (Postfix) with ESMTPS id EE67C3F12C for ; Tue, 2 Aug 2022 16:59:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1659459581; bh=ClpZiDuXysf5ioq7iPl9UhfuPtnJMVAH2kO5FKCgsNs=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QRcMvrInrtJRG1GWu/EGCWvz/yICiwCH3KHJGkPuRwNU5tA6NKGPy9mn5x53plVKn 1iv2HpZwGJVHvw5EwZlIPckKQJ2nC4vKOIhqYkLDZ1MKjcwjvHLItlu8z49/vTsCEr ZzKrNwiSugL8WOfJbgjdk7bZUNEf1TNHGUu2ZUnbr2GRVZbd6uu1vANvQ/GsSGaRiA fMZ+rwbYdA9gffVl2Dg85d2BVz/p8e4gkjZh8l1z6VXPgk8KdSuJm1/oB8r/UbZ+ne aGtkKNK7da/qcZ0Wx02vvnRNjqV1t0ZbnenFVlTLOlctg+Pg5CPqlY7/MlcK5HQqKW QFLfXEZ9C2aHw== Received: by mail-ej1-f71.google.com with SMTP id sd24-20020a1709076e1800b0072b582293c2so4386694ejc.0 for ; Tue, 02 Aug 2022 09:59:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ClpZiDuXysf5ioq7iPl9UhfuPtnJMVAH2kO5FKCgsNs=; b=0a2Ibp8xSgl+lbI4Dfggp4s8dMzeVwbltTAZz50uDpfpam9eDaeCMEgPZi8wCWT/9C kcp8OTSYeg0jGOZa3/YwTms/IBPD/72Jlsp67acdEErexehsXMAluK+QjH/8Px6q43l6 zFbPQYjQ1YgRLFYQFdvA6np/Q0XfZcQ6yO2Gwi1IgfEf16JgP09Xqnijrk6S7jzwj9s/ /wUxYUyJ+9UHbeVEvaVqXLTbvH/N94HGfDF2ysOOMRgOl7UJg0rKYZx1v/CRYtwwR9ed hhVLAW7mSxKuHXtEOylOq3E8W+PA3ZNxEdk9t3eXzRdIe+p8Llyp+8awV3gfcLT3LlFy O7zQ== X-Gm-Message-State: AJIora+jr8EspIk6rVN6FS2m6OieXycMT794GRZjAeoXoUf06Vx0uSJr nAsZFtx4Jed+RPX6mFQBfyQlDvbLO3Vbdffs7iSpnurYvoRVQ+Jd6i76hsjIRRlQPICfR6A1HI9 k4aefFeiVnMPv8X+08A63luWqEUHN9LvmLryDjrxfWg== X-Received: by 2002:a17:907:6d86:b0:72b:5ad6:6df1 with SMTP id sb6-20020a1709076d8600b0072b5ad66df1mr18016545ejc.264.1659459581626; Tue, 02 Aug 2022 09:59:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tZz7m4oBwUyr9uIfg9wbg0DSBSut9BvdZNaT5C8SdFYey99MEqDr7Z0u0GBhDCCG7EixNq+Q== X-Received: by 2002:a17:907:6d86:b0:72b:5ad6:6df1 with SMTP id sb6-20020a1709076d8600b0072b5ad66df1mr18016540ejc.264.1659459581425; Tue, 02 Aug 2022 09:59:41 -0700 (PDT) Received: from localhost.localdomain (p579d80fd.dip0.t-ipconnect.de. [87.157.128.253]) by smtp.gmail.com with ESMTPSA id k15-20020a17090632cf00b00730165d7f41sm6492769ejk.13.2022.08.02.09.59.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 09:59:40 -0700 (PDT) From: Kleber Sacilotto de Souza To: kernel-team@lists.ubuntu.com Subject: [SRU][K][PATCH 1/1] selftests: net: fix IOAM test skip return code Date: Tue, 2 Aug 2022 18:59:33 +0200 Message-Id: <20220802165933.328342-3-kleber.souza@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220802165933.328342-1-kleber.souza@canonical.com> References: <20220802165933.328342-1-kleber.souza@canonical.com> 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" BugLink: https://bugs.launchpad.net/bugs/1982930 The ioam6.sh test script exits with an error code (1) when tests are skipped due to lack of support from userspace/kernel or not enough permissions. It should return the kselftests SKIP code instead. Reviewed-by: Justin Iurman Signed-off-by: Kleber Sacilotto de Souza Link: https://lore.kernel.org/r/20220801124615.256416-1-kleber.souza@canonical.com Signed-off-by: Paolo Abeni (cherry picked from commit 1995943c3f2a59d73efe8bf9b33a92d0f1812af3 net-next) Signed-off-by: Kleber Sacilotto de Souza --- tools/testing/selftests/net/ioam6.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/ioam6.sh b/tools/testing/selftests/net/ioam6.sh index a2b9fad5a9a6..4ceb401da1bf 100755 --- a/tools/testing/selftests/net/ioam6.sh +++ b/tools/testing/selftests/net/ioam6.sh @@ -117,6 +117,8 @@ # | Schema Data | | # +-----------------------------------------------------------+ +# Kselftest framework requirement - SKIP code is 4. +ksft_skip=4 ################################################################################ # # @@ -211,7 +213,7 @@ check_kernel_compatibility() echo "SKIP: kernel version probably too old, missing ioam support" ip link del veth0 2>/dev/null || true ip netns del ioam-tmp-node || true - exit 1 + exit $ksft_skip fi ip -netns ioam-tmp-node route add db02::/64 encap ioam6 mode inline \ @@ -227,7 +229,7 @@ check_kernel_compatibility() "without CONFIG_IPV6_IOAM6_LWTUNNEL?" ip link del veth0 2>/dev/null || true ip netns del ioam-tmp-node || true - exit 1 + exit $ksft_skip fi ip link del veth0 2>/dev/null || true @@ -752,20 +754,20 @@ nfailed=0 if [ "$(id -u)" -ne 0 ] then echo "SKIP: Need root privileges" - exit 1 + exit $ksft_skip fi if [ ! -x "$(command -v ip)" ] then echo "SKIP: Could not run test without ip tool" - exit 1 + exit $ksft_skip fi ip ioam &>/dev/null if [ $? = 1 ] then echo "SKIP: iproute2 too old, missing ioam command" - exit 1 + exit $ksft_skip fi check_kernel_compatibility