Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4539041rdb; Fri, 29 Dec 2023 05:26:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHILqzXOHMv36z098SpGs7TBud0os3splrSy8NJ0N4DGZUgDuErF4N7suCpAuy0TgLyo5gj X-Received: by 2002:ac8:5dd3:0:b0:423:8b1a:67e7 with SMTP id e19-20020ac85dd3000000b004238b1a67e7mr16072092qtx.42.1703856372075; Fri, 29 Dec 2023 05:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703856372; cv=none; d=google.com; s=arc-20160816; b=H1xDybj0n5kaJxWD9i9d9X7K3N5OHIwxpjBlko7w0tRcOHNYy2gTIVIG2sD2kJKGz7 yofOts3g/AclLweZ5Z2BEsbXJ1prFLKuWXScta8n2qct1hhvh9+E+WrfvA2DHkvgl/G5 HqYWlStzSoeb1rjpXcHXL/fbO7UNxpfaPvLGc+Ws9pNfXtOtqGmIzp+lSEC5ngRytKTN fjeCZOVNJauMFVqcrMOhSe2OIYRnjTJrmkEhJONmxOrRhHJWNHKBnopeDOHc7E/qDPud XzSDgl53jyFabp9HJn+NJ6gy/ufTbYyHqKy/zF2B8Xo5diB9UaZ4XtNK1IkNeqCKGzw5 BG3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=nTSv6gqcK55VnDg3KG6BJhR0WhMbkN2WarCQ1T/a15s=; fh=TZhwMpNV33zBgBIlKa2loarRnbLqufj+D7TRcVNNMzc=; b=XAQBag3CAibN5yH30EbRHkagHzv33ttXBGyEKrbNbTOQl8Hpc/E7n0jTMLNZACFu8j CWXWzube4B96OTVWxFP3wAsVUQNk9au8V+AKOBhG+03p25xHK+mKsbym8gth2ez4LJny uKq7M8jNU1WkQ5CCUSlN43Rll26+zxzGWXF+K52eHXx1LmgCVgXcv7jvYG2upW2SYkZv //n5Y+g9KcGf4MHEmo96Lvb5MuOCt2yqWTUnCjinqjphLrne/Zfh47CELlIwI3PO1b53 yTh06a4M3DNgpFjggSkM0/uz2pvXu2J9spGv0MTK6iUtw0l98BCwO8cBBi747wSk+Kn/ Yi9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EloIf3Iu; spf=pass (google.com: domain of linux-kernel+bounces-13098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h5-20020ac85845000000b00417f4c0115asi19504355qth.509.2023.12.29.05.26.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 05:26:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EloIf3Iu; spf=pass (google.com: domain of linux-kernel+bounces-13098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BE6001C21818 for ; Fri, 29 Dec 2023 13:25:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32B9611715; Fri, 29 Dec 2023 13:25:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EloIf3Iu" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 7101A11702; Fri, 29 Dec 2023 13:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703856324; x=1735392324; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VoKVzeNYvXYdu0nGsITJ3pkd4dyqg9TLeqCKzyy8vGA=; b=EloIf3IuP8/CHejNs9jU8kAr0XPWeToOYZpmXxe0qRUjy/eQwioOUXVa y/4TdWxmQVKHN8Qtj5BoYfE0OgW/AmJqRT8sXkzVQiAKOY0Z5hd/0UcPt PjqZo4qOppiqK8a7VHMu+Qx/+ULJFNKYY5EnNBhVubM7lKMmi2pFt/V/5 qIno+I50YEU2VN+Bs7MR9KVoOYfEOB+OOUCKPQ17CFmB6SQBlP6GsQt+z vSonOhy77cfp0SpWdb1wOYHaTyoD18dpZvhieUF8NL6AZgnrDWBLG7XgX WpNPybioCS3S5C4Wix9pVRNvzDIPfHdiFcCRZij9GaEnuP3dYcuW+irDI w==; X-IronPort-AV: E=McAfee;i="6600,9927,10937"; a="3949087" X-IronPort-AV: E=Sophos;i="6.04,315,1695711600"; d="scan'208";a="3949087" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2023 05:23:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10937"; a="755032593" X-IronPort-AV: E=Sophos;i="6.04,315,1695711600"; d="scan'208";a="755032593" Received: from yujie-x299.sh.intel.com ([10.239.159.77]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2023 05:23:49 -0800 From: Yujie Liu To: netdev@vger.kernel.org, Hangbin Liu Cc: Paolo Abeni , David Ahern , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, lkp@intel.com, kernel test robot Subject: [PATCH v2 net-next] selftests/net: change shebang to bash to support "source" Date: Fri, 29 Dec 2023 21:19:31 +0800 Message-Id: <20231229131931.3961150-1-yujie.liu@intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 -- 2.34.1