From: Benjamin Poirier benjamin.poirier@gmail.com
Two small fixes for net selftests.
These patches were carved out of the following RFC series: https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/
I'm planning to send the rest of the series to net-next after it opens up.
Benjamin Poirier (2): selftests: bonding: Change script interpreter selftests: forwarding: Remove executable bits from lib.sh
.../selftests/drivers/net/bonding/mode-1-recovery-updelay.sh | 2 +- .../selftests/drivers/net/bonding/mode-2-recovery-updelay.sh | 2 +- tools/testing/selftests/net/forwarding/lib.sh | 0 3 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 tools/testing/selftests/net/forwarding/lib.sh
The tests changed by this patch, as well as the scripts they source, use features which are not part of POSIX sh (ex. 'source' and 'local'). As a result, these tests fail when /bin/sh is dash such as on Debian. Change the interpreter to bash so that these tests can run successfully.
Fixes: d43eff0b85ae ("selftests: bonding: up/down delay w/ slave link flapping") Tested-by: Hangbin Liu liuhangbin@gmail.com Reviewed-by: Hangbin Liu liuhangbin@gmail.com Reviewed-by: Petr Machata petrm@nvidia.com Signed-off-by: Benjamin Poirier bpoirier@nvidia.com --- .../selftests/drivers/net/bonding/mode-1-recovery-updelay.sh | 2 +- .../selftests/drivers/net/bonding/mode-2-recovery-updelay.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh index ad4c845a4ac7..b76bf5030952 100755 --- a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh +++ b/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: GPL-2.0
# Regression Test: diff --git a/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh index 2330d37453f9..8c2619002147 100755 --- a/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh +++ b/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: GPL-2.0
# Regression Test:
The lib.sh script is meant to be sourced from other scripts, not executed directly. Therefore, remove the executable bits from lib.sh's permissions.
Fixes: fe32dffdcd33 ("selftests: forwarding: add TCPDUMP_EXTRA_FLAGS to lib.sh") Tested-by: Hangbin Liu liuhangbin@gmail.com Reviewed-by: Hangbin Liu liuhangbin@gmail.com Reviewed-by: Vladimir Oltean vladimir.oltean@nxp.com Signed-off-by: Benjamin Poirier bpoirier@nvidia.com --- tools/testing/selftests/net/forwarding/lib.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tools/testing/selftests/net/forwarding/lib.sh
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh old mode 100755 new mode 100644
On Wed, 2024-01-10 at 09:14 -0500, Benjamin Poirier wrote:
The lib.sh script is meant to be sourced from other scripts, not executed directly. Therefore, remove the executable bits from lib.sh's permissions.
LGTM, but there is any special reason to not fix the permissions of other *lib.sh files in the same directory? Could be a follow-up.
Thanks!
Paolo
On 2024-01-16 09:32 +0100, Paolo Abeni wrote:
On Wed, 2024-01-10 at 09:14 -0500, Benjamin Poirier wrote:
The lib.sh script is meant to be sourced from other scripts, not executed directly. Therefore, remove the executable bits from lib.sh's permissions.
LGTM, but there is any special reason to not fix the permissions of other *lib.sh files in the same directory? Could be a follow-up.
I just looked into it and as of dbc153fd3c14 other *lib.sh files under tools/testing/selftests/net/forwarding/ do not have any executable bits. Did I miss something?
tools/testing/selftests/net/setup_loopback.sh has an unneccessary +x, I'll send a patch for that one.
On 1/10/24 15:14, Benjamin Poirier wrote:
From: Benjamin Poirier benjamin.poirier@gmail.com
Two small fixes for net selftests.
These patches were carved out of the following RFC series: https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/
I'm planning to send the rest of the series to net-next after it opens up.
Benjamin Poirier (2): selftests: bonding: Change script interpreter selftests: forwarding: Remove executable bits from lib.sh
.../selftests/drivers/net/bonding/mode-1-recovery-updelay.sh | 2 +- .../selftests/drivers/net/bonding/mode-2-recovery-updelay.sh | 2 +- tools/testing/selftests/net/forwarding/lib.sh | 0 3 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 tools/testing/selftests/net/forwarding/lib.sh
Reviewed-by: Przemek Kitszel przemyslaw.kitszel@intel.com
Hello:
This series was applied to netdev/net.git (main) by David S. Miller davem@davemloft.net:
On Wed, 10 Jan 2024 09:14:34 -0500 you wrote:
From: Benjamin Poirier benjamin.poirier@gmail.com
Two small fixes for net selftests.
These patches were carved out of the following RFC series: https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/
[...]
Here is the summary with links: - [net,1/2] selftests: bonding: Change script interpreter (no matching commit) - [net,2/2] selftests: forwarding: Remove executable bits from lib.sh https://git.kernel.org/netdev/net/c/1ad04b795cc3
You are awesome, thank you!
Hello:
This series was applied to netdev/net.git (main) by Jakub Kicinski kuba@kernel.org:
On Wed, 10 Jan 2024 09:14:34 -0500 you wrote:
From: Benjamin Poirier benjamin.poirier@gmail.com
Two small fixes for net selftests.
These patches were carved out of the following RFC series: https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/
[...]
Here is the summary with links: - [net,1/2] selftests: bonding: Change script interpreter (no matching commit) - [net,2/2] selftests: forwarding: Remove executable bits from lib.sh https://git.kernel.org/netdev/net/c/66cee759ffa3
You are awesome, thank you!
Hello:
This series was applied to netdev/net.git (main) by Paolo Abeni pabeni@redhat.com:
On Wed, 10 Jan 2024 09:14:34 -0500 you wrote:
From: Benjamin Poirier benjamin.poirier@gmail.com
Two small fixes for net selftests.
These patches were carved out of the following RFC series: https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/
[...]
Here is the summary with links: - [net,1/2] selftests: bonding: Change script interpreter https://git.kernel.org/netdev/net/c/c2518da8e6b0 - [net,2/2] selftests: forwarding: Remove executable bits from lib.sh (no matching commit)
You are awesome, thank you!
linux-kselftest-mirror@lists.linaro.org