Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4949761rdb; Fri, 29 Dec 2023 22:30:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+snuhDrtt2dbauvwJPeLUndtEWifRgNA9/kHArtHn389ZUN0yFTcHJ6uJwjZZuB9axYY5 X-Received: by 2002:a17:906:5358:b0:a26:86af:f1bd with SMTP id j24-20020a170906535800b00a2686aff1bdmr3147971ejo.29.1703917826621; Fri, 29 Dec 2023 22:30:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703917826; cv=none; d=google.com; s=arc-20160816; b=NaVwXkD/n2oEjs5T6OH3+NlTjPgpGVvXRisfb3fcRFVnNVWgXSjlZZUyBRDp7SIjJv HDtT7bGM0BkjoO9xAFOJGjlhWrbklDrPluKkCvbflF3cDgUw83w2gcvzsMALP7oPl85P dO7OXtUWd0P9+jLVmOjR7CVoWej16I00xDfXIwOCCq3efZHeZ3LQ28BOJmRguiup8WCZ GNhC+FJyNREwp+QsmJyC2RFZx44WLXP7mOSB6lS7wb8aN9+bDx0Zaf8R4tClFVqAjceQ htJ6QkZ5tlZLjhvaVtKMR1A4Bgd6oALEePY6DAFLIApZ9IapHhoevVoKYH9kgeKR6PBx 6MWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=WsuLmSror0Lvu2kkdurPxL/GDVWZINwqB244Q2KlG5U=; fh=idI1yXbc75rahKm3wZb/W1C6rSmYJsc5+rhq8S1Jbas=; b=VNxNiwUpAVVp6hKD/TWBWmyw/ttU96px6Hm/AqUyMsa8u5U0YEprLUTiZ69mOC+HJQ 3cc69FWc7FTsMJG0/stbZybPJxupsmCTE2AA4/QwkNpmU87toeW3CTtiM3En3eH0KLfo gLYOHPlYaJymqWgMh56IgXATMyMchewYbsNCk+1++945f2N0Yq/gzJQ4wntkk62MYjQ+ sqCkYHdTuIDeVKmNr0k0QmRhH3LurXuVvcYOY05I2KqhPFagYj+Q+iYlTG45OxiQNdwr cvOy7hdLut8eRGuifYJ8WcDFv9oXbT+gA7WjYvC8xrmmiEwepmdIXzVwgewQSs+uFKe/ 9+2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=wxPHgnG3; spf=pass (google.com: domain of linux-kernel+bounces-13342-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j21-20020a170906255500b00a26dc926ee2si5434222ejb.874.2023.12.29.22.30.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 22:30:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13342-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=wxPHgnG3; spf=pass (google.com: domain of linux-kernel+bounces-13342-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 63AB81F21E67 for ; Sat, 30 Dec 2023 06:30:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A1562569; Sat, 30 Dec 2023 06:30:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="wxPHgnG3" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8441879D8; Sat, 30 Dec 2023 06:30:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703917811; bh=Jadexy0SMnKker8eqnZd2xRLk+xbpxqZD/9apBM550c=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=wxPHgnG3RNBUxzlhzKz1SQdqneucuudlcmMHHIo4rxRFYRKs5Y79+4o/wyl6f3vpp TZLZdWwualNEHKglUZ0M97A7IuDAh1gK1AKlEJw+xpMi+A0KmV/dSgUZEx5qDxJ8sx WmSasXaVlXAZJzZyGMLqY9srQRvQnadQiSIKxxJVpvixzP1sviSsBDtG9pbll6k4ld 4f5LG6sOvecfO4IQCFmMSqjMn6XSJlhsBJnIWcOsSQGsT5B4VAtQRFPrQGmam0loFW CmoKJzZNpJGGANWKBIxvwWzTY/aeSkdL/3x+QXtEL0VOhT6nEAOJvVUsPiyhYQZgVX PKFqNGcMKGFxQ== Received: from [100.96.234.34] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id E9C28378105A; Sat, 30 Dec 2023 06:30:07 +0000 (UTC) Message-ID: <3e98be92-8507-410b-bfa2-dfdd42829764@collabora.com> Date: Sat, 30 Dec 2023 11:30:04 +0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , Paolo Abeni , David Ahern , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, lkp@intel.com, kernel test robot Subject: Re: [PATCH v2 net-next] selftests/net: change shebang to bash to support "source" To: Yujie Liu , netdev@vger.kernel.org, Hangbin Liu References: <20231229131931.3961150-1-yujie.liu@intel.com> Content-Language: en-US From: Muhammad Usama Anjum In-Reply-To: <20231229131931.3961150-1-yujie.liu@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/29/23 6:19 PM, Yujie Liu wrote: > The patch set [1] added a general lib.sh in net selftests, and converted > several test scripts to source the lib.sh. > > unicast_extensions.sh (converted in [1]) and pmtu.sh (converted in [2]) > have a /bin/sh shebang which may point to various shells in different > distributions, but "source" is only available in some of them. For > example, "source" is a built-it function in bash, but it cannot be > used in dash. > > Refer to other scripts that were converted together, simply change the > shebang to bash to fix the following issues when the default /bin/sh > points to other shells. > > # selftests: net: unicast_extensions.sh > # ./unicast_extensions.sh: 31: source: not found > # ########################################################################### > # Unicast address extensions tests (behavior of reserved IPv4 addresses) > # ########################################################################### > # TEST: assign and ping within 240/4 (1 of 2) (is allowed) [FAIL] > # TEST: assign and ping within 240/4 (2 of 2) (is allowed) [FAIL] > # TEST: assign and ping within 0/8 (1 of 2) (is allowed) [FAIL] > # TEST: assign and ping within 0/8 (2 of 2) (is allowed) [FAIL] > # TEST: assign and ping inside 255.255/16 (is allowed) [FAIL] > # TEST: assign and ping inside 255.255.255/24 (is allowed) [FAIL] > # TEST: route between 240.5.6/24 and 255.1.2/24 (is allowed) [FAIL] > # TEST: route between 0.200/16 and 245.99/16 (is allowed) [FAIL] > # TEST: assign and ping lowest address (/24) [FAIL] > # TEST: assign and ping lowest address (/26) [FAIL] > # TEST: routing using lowest address [FAIL] > # TEST: assigning 0.0.0.0 (is forbidden) [ OK ] > # TEST: assigning 255.255.255.255 (is forbidden) [ OK ] > # TEST: assign and ping inside 127/8 (is forbidden) [ OK ] > # TEST: assign and ping class D address (is forbidden) [ OK ] > # TEST: routing using class D (is forbidden) [ OK ] > # TEST: routing using 127/8 (is forbidden) [ OK ] > not ok 51 selftests: net: unicast_extensions.sh # exit=1 > > v1 -> v2: > - Fix pmtu.sh which has the same issue as unicast_extensions.sh, > suggested by Hangbin > - Change the style of the "source" line to be consistent with other > tests, suggested by Hangbin > > Link: https://lore.kernel.org/all/20231202020110.362433-1-liuhangbin@gmail.com/ [1] > Link: https://lore.kernel.org/all/20231219094856.1740079-1-liuhangbin@gmail.com/ [2] > Reported-by: kernel test robot > Signed-off-by: Yujie Liu Reviewed-by: Muhammad Usama Anjum > --- > tools/testing/selftests/net/pmtu.sh | 4 ++-- > tools/testing/selftests/net/unicast_extensions.sh | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh > index 175d3d1d773b..f10879788f61 100755 > --- a/tools/testing/selftests/net/pmtu.sh > +++ b/tools/testing/selftests/net/pmtu.sh > @@ -1,4 +1,4 @@ > -#!/bin/sh > +#!/bin/bash > # SPDX-License-Identifier: GPL-2.0 > # > # Check that route PMTU values match expectations, and that initial device MTU > @@ -198,7 +198,7 @@ > # - pmtu_ipv6_route_change > # Same as above but with IPv6 > > -source ./lib.sh > +source lib.sh > > PAUSE_ON_FAIL=no > VERBOSE=0 > diff --git a/tools/testing/selftests/net/unicast_extensions.sh b/tools/testing/selftests/net/unicast_extensions.sh > index b7a2cb9e7477..f52aa5f7da52 100755 > --- a/tools/testing/selftests/net/unicast_extensions.sh > +++ b/tools/testing/selftests/net/unicast_extensions.sh > @@ -1,4 +1,4 @@ > -#!/bin/sh > +#!/bin/bash > # SPDX-License-Identifier: GPL-2.0 > # > # By Seth Schoen (c) 2021, for the IPv4 Unicast Extensions Project > @@ -28,7 +28,7 @@ > # These tests provide an easy way to flip the expected result of any > # of these behaviors for testing kernel patches that change them. > > -source ./lib.sh > +source lib.sh > > # nettest can be run from PATH or from same directory as this selftest > if ! which nettest >/dev/null; then > > base-commit: cd4d7263d58ab98fd4dee876776e4da6c328faa3 -- BR, Muhammad Usama Anjum