Skip to contentSkip to conversation

selftests: net: Small fixes

PATCH Applied Benjamin Poirier 4 participants 9 messages Jan 10, 2024 – Jan 19, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover selftests: net: Small fixes

From: Benjamin Poirier <[email protected]>

Two small fixes for net selftests.

These patches were carved out of the following RFC series:
https://lore.kernel.org/netdev/[email protected]/

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
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 selftests: bonding: Change script interpreter

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")
---
 .../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(-)
tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh +1 -1
index ad4c845a4ac7..b76bf5030952 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
 # Regression Test:
tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh +1 -1
index 2330d37453f9..8c2619002147 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
 # Regression Test:
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/2 selftests: forwarding: Remove executable bits from lib.sh

In reply to Benjamin Poirier

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")
---
 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
tools/testing/selftests/net/forwarding/lib.sh +0 -0
old mode 100755
new mode 100644
Signature · 1 line
2.43.0
maintainer
#3 lore raw

Re: [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh

Quoted 2 lines · Benjamin Poirier

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

#4 lore raw

Re: [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh

Quoted 6 lines · Paolo Abeni
Quoted 2 lines · Benjamin Poirier

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.

Reviewed-by on the v1 series
#5 lore raw
In reply to Benjamin Poirier
Quoted 13 lines · Benjamin Poirier

From: Benjamin Poirier <[email protected]>

Two small fixes for net selftests.

These patches were carved out of the following RFC series:
https://lore.kernel.org/netdev/[email protected]/

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

Quoted 6 lines
  .../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

#6 lore raw
In reply to Benjamin Poirier
This series was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This series was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Wed, 10 Jan 2024 09:14:34 -0500 you wrote:

From: Benjamin Poirier <[email protected]>

Two small fixes for net selftests.

These patches were carved out of the following RFC series:
https://lore.kernel.org/netdev/[email protected]/

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#7 lore raw
In reply to Benjamin Poirier
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 10 Jan 2024 09:14:34 -0500 you wrote:

From: Benjamin Poirier <[email protected]>

Two small fixes for net selftests.

These patches were carved out of the following RFC series:
https://lore.kernel.org/netdev/[email protected]/

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#8 lore raw
In reply to Benjamin Poirier
This series was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Wed, 10 Jan 2024 09:14:34 -0500 you wrote:

From: Benjamin Poirier <[email protected]>

Two small fixes for net selftests.

These patches were carved out of the following RFC series:
https://lore.kernel.org/netdev/[email protected]/

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html