linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] selftests: net: Small fixes
@ 2024-01-10 14:14 Benjamin Poirier
  2024-01-10 14:14 ` [PATCH net 1/2] selftests: bonding: Change script interpreter Benjamin Poirier
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Benjamin Poirier @ 2024-01-10 14:14 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Andy Gospodarek, Shuah Khan, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Petr Machata,
	Nikolay Aleksandrov, Hangbin Liu, Ido Schimmel, Vladimir Oltean,
	Jonathan Toppins, Joachim Wiberg, linux-kselftest

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

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net 1/2] selftests: bonding: Change script interpreter
  2024-01-10 14:14 [PATCH net 0/2] selftests: net: Small fixes Benjamin Poirier
@ 2024-01-10 14:14 ` Benjamin Poirier
  2024-01-10 14:14 ` [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh Benjamin Poirier
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Benjamin Poirier @ 2024-01-10 14:14 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Andy Gospodarek, Shuah Khan, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Petr Machata,
	Nikolay Aleksandrov, Hangbin Liu, Ido Schimmel, Vladimir Oltean,
	Jonathan Toppins, Joachim Wiberg, linux-kselftest

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:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh
  2024-01-10 14:14 [PATCH net 0/2] selftests: net: Small fixes Benjamin Poirier
  2024-01-10 14:14 ` [PATCH net 1/2] selftests: bonding: Change script interpreter Benjamin Poirier
@ 2024-01-10 14:14 ` Benjamin Poirier
  2024-01-16  8:32   ` Paolo Abeni
  2024-01-11 11:25 ` [PATCH net 0/2] selftests: net: Small fixes Przemek Kitszel
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Benjamin Poirier @ 2024-01-10 14:14 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Andy Gospodarek, Shuah Khan, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Petr Machata,
	Nikolay Aleksandrov, Hangbin Liu, Ido Schimmel, Vladimir Oltean,
	Jonathan Toppins, Joachim Wiberg, linux-kselftest

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
-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] selftests: net: Small fixes
  2024-01-10 14:14 [PATCH net 0/2] selftests: net: Small fixes Benjamin Poirier
  2024-01-10 14:14 ` [PATCH net 1/2] selftests: bonding: Change script interpreter Benjamin Poirier
  2024-01-10 14:14 ` [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh Benjamin Poirier
@ 2024-01-11 11:25 ` Przemek Kitszel
  2024-01-11 19:42 ` patchwork-bot+netdevbpf
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Przemek Kitszel @ 2024-01-11 11:25 UTC (permalink / raw)
  To: Benjamin Poirier, netdev
  Cc: Jay Vosburgh, Andy Gospodarek, Shuah Khan, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Petr Machata,
	Nikolay Aleksandrov, Hangbin Liu, Ido Schimmel, Vladimir Oltean,
	Jonathan Toppins, Joachim Wiberg, linux-kselftest

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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] selftests: net: Small fixes
  2024-01-10 14:14 [PATCH net 0/2] selftests: net: Small fixes Benjamin Poirier
                   ` (2 preceding siblings ...)
  2024-01-11 11:25 ` [PATCH net 0/2] selftests: net: Small fixes Przemek Kitszel
@ 2024-01-11 19:42 ` patchwork-bot+netdevbpf
  2024-01-12  1:00 ` patchwork-bot+netdevbpf
  2024-01-16  8:40 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-11 19:42 UTC (permalink / raw)
  To: Benjamin Poirier
  Cc: netdev, j.vosburgh, andy, shuah, davem, edumazet, kuba, pabeni,
	petrm, razor, liuhangbin, idosch, vladimir.oltean,
	jon.toppins+linux, troglobit, linux-kselftest

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] selftests: net: Small fixes
  2024-01-10 14:14 [PATCH net 0/2] selftests: net: Small fixes Benjamin Poirier
                   ` (3 preceding siblings ...)
  2024-01-11 19:42 ` patchwork-bot+netdevbpf
@ 2024-01-12  1:00 ` patchwork-bot+netdevbpf
  2024-01-16  8:40 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-12  1:00 UTC (permalink / raw)
  To: Benjamin Poirier
  Cc: netdev, j.vosburgh, andy, shuah, davem, edumazet, kuba, pabeni,
	petrm, razor, liuhangbin, idosch, vladimir.oltean,
	jon.toppins+linux, troglobit, linux-kselftest

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh
  2024-01-10 14:14 ` [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh Benjamin Poirier
@ 2024-01-16  8:32   ` Paolo Abeni
  2024-01-19 21:56     ` Benjamin Poirier
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Abeni @ 2024-01-16  8:32 UTC (permalink / raw)
  To: Benjamin Poirier, netdev
  Cc: Jay Vosburgh, Andy Gospodarek, Shuah Khan, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Petr Machata, Nikolay Aleksandrov,
	Hangbin Liu, Ido Schimmel, Vladimir Oltean, Jonathan Toppins,
	Joachim Wiberg, linux-kselftest

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] selftests: net: Small fixes
  2024-01-10 14:14 [PATCH net 0/2] selftests: net: Small fixes Benjamin Poirier
                   ` (4 preceding siblings ...)
  2024-01-12  1:00 ` patchwork-bot+netdevbpf
@ 2024-01-16  8:40 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-16  8:40 UTC (permalink / raw)
  To: Benjamin Poirier
  Cc: netdev, j.vosburgh, andy, shuah, davem, edumazet, kuba, pabeni,
	petrm, razor, liuhangbin, idosch, vladimir.oltean,
	jon.toppins+linux, troglobit, linux-kselftest

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh
  2024-01-16  8:32   ` Paolo Abeni
@ 2024-01-19 21:56     ` Benjamin Poirier
  0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Poirier @ 2024-01-19 21:56 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: netdev, Jay Vosburgh, Andy Gospodarek, Shuah Khan,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Petr Machata,
	Nikolay Aleksandrov, Hangbin Liu, Ido Schimmel, Vladimir Oltean,
	Jonathan Toppins, Joachim Wiberg, linux-kselftest

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-19 21:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10 14:14 [PATCH net 0/2] selftests: net: Small fixes Benjamin Poirier
2024-01-10 14:14 ` [PATCH net 1/2] selftests: bonding: Change script interpreter Benjamin Poirier
2024-01-10 14:14 ` [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh Benjamin Poirier
2024-01-16  8:32   ` Paolo Abeni
2024-01-19 21:56     ` Benjamin Poirier
2024-01-11 11:25 ` [PATCH net 0/2] selftests: net: Small fixes Przemek Kitszel
2024-01-11 19:42 ` patchwork-bot+netdevbpf
2024-01-12  1:00 ` patchwork-bot+netdevbpf
2024-01-16  8:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).