[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231225072109.3835503-1-yujie.liu@intel.com>
Date: Mon, 25 Dec 2023 15:21:09 +0800
From: Yujie Liu <yujie.liu@...el.com>
To: netdev@...r.kernel.org,
Hangbin Liu <liuhangbin@...il.com>
Cc: Paolo Abeni <pabeni@...hat.com>,
David Ahern <dsahern@...nel.org>,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org,
lkp@...el.com,
kernel test robot <oliver.sang@...el.com>
Subject: [PATCH net-next] selftests/net: change the shebang of unicast_extensions.sh to bash
The patch set [1] added a general lib.sh in net selftests, and converted
several test scripts to source the lib.sh.
The shebang of unicast_extensions.sh is /bin/sh 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 suppress the following errors 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
Link: https://lore.kernel.org/all/20231202020110.362433-1-liuhangbin@gmail.com/ [1]
Fixes: 0f4765d0b48d ("selftests/net: convert unicast_extensions.sh to run it in unique namespace")
Reported-by: kernel test robot <oliver.sang@...el.com>
Signed-off-by: Yujie Liu <yujie.liu@...el.com>
---
tools/testing/selftests/net/unicast_extensions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/unicast_extensions.sh b/tools/testing/selftests/net/unicast_extensions.sh
index b7a2cb9e7477..2766990c2b78 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
--
2.34.1
Powered by blists - more mailing lists