From patchwork Wed Feb 8 05:02:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Hsu Lin X-Patchwork-Id: 1739281 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=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; 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=fU0vN4tw; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PBSZK1kSjz23y7 for ; Wed, 8 Feb 2023 16:03:35 +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 1pPcc5-0005Fl-DD; Wed, 08 Feb 2023 05:03:21 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-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 1pPcc4-0005FV-02 for kernel-team@lists.ubuntu.com; Wed, 08 Feb 2023 05:03:20 +0000 Received: from localhost.localdomain (1.general.phlin.uk.vpn [10.172.194.38]) (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 E496F3F303 for ; Wed, 8 Feb 2023 05:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1675832599; bh=M8+17edqlrr+3Jw7MqKwTfZso0DAqo+i7281Q4t1yk8=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fU0vN4twXdwyx9TmkdiL39wutZWTnbht5CNxaXUOMqgvEUNHvXGrVAUxQSlxU7Ux+ /FiUhic7Yh3hTEtinXZMtQ/3RAbjNfzS0iSuoMoWWVjkjMB5UoHjvsgpxVbnjf4Sx4 vcx2JYDaNKUgG+tU7+2NpWrmRt4YVmJmDUy7nSrxOB92LxfsB4RvteUbcOGWaNPE6u kbH4++CouQ/X9Q9ePdLioM5GWk2swM7+iTUymlUWcC2jWksxw9ew+4J61NhNSglnxu kBX0imhop+tFP15q3kY0hxszEx2F9PdQIBQ714HlWOELZsZ1T75ml1pyo6DK8wFlV4 pC2DYhHD6JQ/Q== From: Po-Hsu Lin To: kernel-team@lists.ubuntu.com Subject: [OEM-5.17][K][SRU][PATCH 1/1] selftests: net: return non-zero for failures reported in arp_ndisc_evict_nocarrier Date: Wed, 8 Feb 2023 13:02:46 +0800 Message-Id: <20230208050246.108005-2-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230208050246.108005-1-po-hsu.lin@canonical.com> References: <20230208050246.108005-1-po-hsu.lin@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/2006546 Return non-zero return value if there is any failure reported in this script during the test. Otherwise it can only reflect the status of the last command. Fixes: f86ca07eb531 ("selftests: net: add arp_ndisc_evict_nocarrier") Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller (cherry picked from commit 1856628baa17032531916984808d1bdfd62700d4) Signed-off-by: Po-Hsu Lin --- tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh b/tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh index b5af08a..b1ebdd1 100755 --- a/tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh +++ b/tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh @@ -18,6 +18,7 @@ readonly V4_ADDR1=10.0.10.2 readonly V6_ADDR0=2001:db8:91::1 readonly V6_ADDR1=2001:db8:91::2 nsid=100 +ret=0 cleanup_v6() { @@ -61,7 +62,7 @@ setup_v6() { if [ $? -ne 0 ]; then cleanup_v6 echo "failed" - exit + exit 1 fi # Set veth2 down, which will put veth1 in NOCARRIER state @@ -88,7 +89,7 @@ setup_v4() { if [ $? -ne 0 ]; then cleanup_v4 echo "failed" - exit + exit 1 fi # Set veth1 down, which will put veth0 in NOCARRIER state @@ -115,6 +116,7 @@ run_arp_evict_nocarrier_enabled() { if [ $? -eq 0 ];then echo "failed" + ret=1 else echo "ok" fi @@ -134,6 +136,7 @@ run_arp_evict_nocarrier_disabled() { echo "ok" else echo "failed" + ret=1 fi cleanup_v4 @@ -164,6 +167,7 @@ run_ndisc_evict_nocarrier_enabled() { if [ $? -eq 0 ];then echo "failed" + ret=1 else echo "ok" fi @@ -182,6 +186,7 @@ run_ndisc_evict_nocarrier_disabled() { echo "ok" else echo "failed" + ret=1 fi cleanup_v6 @@ -198,6 +203,7 @@ run_ndisc_evict_nocarrier_disabled_all() { echo "ok" else echo "failed" + ret=1 fi cleanup_v6 @@ -218,3 +224,4 @@ if [ "$(id -u)" -ne 0 ];then fi run_all_tests +exit $ret