Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp170830imn; Wed, 27 Jul 2022 03:08:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vrY6SEH0mwXwI0KeUTh+D+PaHRqQ4h/90115v3YSNF3/0m/GDLxdGefqAUjYYHrGAYcRWL X-Received: by 2002:a65:4685:0:b0:416:ce1:8d9b with SMTP id h5-20020a654685000000b004160ce18d9bmr17734294pgr.529.1658916497786; Wed, 27 Jul 2022 03:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658916497; cv=none; d=google.com; s=arc-20160816; b=p/BYMjNjkhZcmfEJnqXOwqGydChUD2ouBG+5Y88k+TsOxrvatP7V/YwOLQaFma0kO9 3rCeEyCcu/FDNM3ROXWqVIhjoKNcESUXKuWWK2AkPyh/8RwFCeIVUbhyP+vH3uVyDe+N 24aimFIv06mqc3UyiN7x6ul+hSLoueV8NpKOrV1yoREBO6FgvyBK5NSyB4JgQcQYQ8hk qlXFJ5GWsvfAl2BXYEUTkQQI7UVe+LkwHtF+6T4symy48PLZ3vjFTWKCESquUlDoKRE7 QZj+LA0NWQkNd94NGGcVa5dz84q4uAJjixTGjv+3hZcfK9a+hTV50YNlci4j09Fnri2w suSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hILhH7/kC6Kccs7jjUf20npcM9l6uxbNnqr7pxtXMH8=; b=Wc2CqLkwpRUcBsZljkPpyyp41hmm0OnbtrtRNrwE4JYFZo2eNZ0dVutBocKDGhxXF1 fVhCv5+1Ger1w1lETB1x7X5nrmoS8a1xNrr5tJUGe7CG3XagDFbGo/Ho6EO6PU3SEB11 6RkVirHHAfKs9CbBFx1TBLTIhr8xqKgIK3lc+GQuvnkY9mkGWpFZKg0zX+eTSp36O/KE R5Q990lhrwUWH2fphi5aHPi4guQC6qNiroZ/4O+dDF5gSuxHFHoqg5odXEFHu1MBmwAc Ory+y2hZLjRD6AU/BQkPA7deDb82a7/dHI5qAG9ryCXnIgPHYa5XOA/AjnbxNmc+d4/g 6QHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=B+qIGBBt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot11-20020a17090b3b4b00b001f2c6fe118dsi1910177pjb.38.2022.07.27.03.07.58; Wed, 27 Jul 2022 03:08:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=B+qIGBBt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231560AbiG0Jhz (ORCPT + 99 others); Wed, 27 Jul 2022 05:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231583AbiG0Jhv (ORCPT ); Wed, 27 Jul 2022 05:37:51 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0281D47BA0 for ; Wed, 27 Jul 2022 02:37:45 -0700 (PDT) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.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-1.canonical.com (Postfix) with ESMTPS id 2590E3F0ED for ; Wed, 27 Jul 2022 09:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1658914664; bh=hILhH7/kC6Kccs7jjUf20npcM9l6uxbNnqr7pxtXMH8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=B+qIGBBtBzJ6obhiob11BqwfBd5/VxIa8s578Gq2cewITr1Y/+j1IuNUbsdIDmbvV FhSy278+3U8VBAZ8JOb0IOdxaUnsYKVd6pqvYZkPPVDbT33I9VYixprajE89rkTMju yp9YcjZ5LwLlSw+oo7/bWXSSh/r3IGgR1q+EtxpqkJ9etajzeaXlyBNQRjcNJj1nBm 4KO7vIG2jmubU/zs60RmQzjE52U3NWsfp/xKJFCU56kuZxKWTqO6lcc7Sc8GKUFJvd oHPhup/8m80gOod7V2ytTH+Op5FTiekIZtKOpYh+tc6g5JgFUQpt7TNBu+J5L0EnYU HgyBle5k+UacA== Received: by mail-ed1-f71.google.com with SMTP id o2-20020a056402438200b0043ccb3ed7dfso30647edc.22 for ; Wed, 27 Jul 2022 02:37:44 -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:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hILhH7/kC6Kccs7jjUf20npcM9l6uxbNnqr7pxtXMH8=; b=M2W7lKYzctJZQb40kgiqbwqsOWtCmbo55imi/OLhfqfQhxVfkYRlU9NuXsD12j4OD/ 5b2EiqjgQZf7jdNK0CgL2MxpzA77l9HVfX1G7cOaEzkdNbqmjqDnqCHG6hzbSRw90ieD WVgjr9soV35G2vsO4MtkR2ZbbHUakopuRHBoX/ADBf8WKPh0tv4DXucnZLGqoxujZLjh AniHn3DJjjfdkammc7BB4DG5q0CMolaaX4afWIAhdtUsgkcs5GXLFhTeKPamjnL3ZY8s YQhKJ/faWI+OTTPz3oz20dlf/8wYO0Sd2eMG+S8DErSg/sBiwbyYQeBeN1TXR/0ROahU QbbQ== X-Gm-Message-State: AJIora9fUZAVSZNPoJQeew51/LyJjslCyxhBTicVrJ0XT9dunp3P3bGO 3QCKnIlrkDI+dMWMwVpWSIbpR4mYpRa9qBysPm6579KtF4MNg0NfGuAMKP4092Efmn1bS03QZXt gL0XM6E8FkDzbECta2NQ6RD8C/XaaDLYDGPLPS7pSmg== X-Received: by 2002:aa7:c784:0:b0:43a:caa8:75b9 with SMTP id n4-20020aa7c784000000b0043acaa875b9mr21256939eds.311.1658914663786; Wed, 27 Jul 2022 02:37:43 -0700 (PDT) X-Received: by 2002:aa7:c784:0:b0:43a:caa8:75b9 with SMTP id n4-20020aa7c784000000b0043acaa875b9mr21256922eds.311.1658914663607; Wed, 27 Jul 2022 02:37:43 -0700 (PDT) Received: from callisto.. (p579d80fd.dip0.t-ipconnect.de. [87.157.128.253]) by smtp.gmail.com with ESMTPSA id g6-20020a17090669c600b0072a815f569bsm7440928ejs.185.2022.07.27.02.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 02:37:43 -0700 (PDT) From: Kleber Sacilotto de Souza To: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Justin Iurman , Jakub Kicinski , "David S . Miller" Subject: [PATCH] selftests: net: fix IOAM test skip return code Date: Wed, 27 Jul 2022 11:37:42 +0200 Message-Id: <20220727093742.115882-1-kleber.souza@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 -- 2.34.1