diff mbox series

[net] selftests: netdevsim: sprinkle more udevadm settle

Message ID 20240114224726.1210532-1-kuba@kernel.org
State Accepted
Commit 2c4ca7977298c6a3d237d7d703df97e043b75c12
Headers show
Series [net] selftests: netdevsim: sprinkle more udevadm settle | expand

Commit Message

Jakub Kicinski Jan. 14, 2024, 10:47 p.m. UTC
Number of tests are failing when netdev renaming is active
on the system. Add udevadm settle in logic determining
the names.

Fixes: 242aaf03dc9b ("selftests: add a test for ethtool pause stats")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: shuah@kernel.org
CC: saeedm@nvidia.com
CC: linux-kselftest@vger.kernel.org
---
 tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh | 1 +
 tools/testing/selftests/drivers/net/netdevsim/udp_tunnel_nic.sh | 1 +
 2 files changed, 2 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 16, 2024, 11:50 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Sun, 14 Jan 2024 14:47:26 -0800 you wrote:
> Number of tests are failing when netdev renaming is active
> on the system. Add udevadm settle in logic determining
> the names.
> 
> Fixes: 242aaf03dc9b ("selftests: add a test for ethtool pause stats")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net] selftests: netdevsim: sprinkle more udevadm settle
    https://git.kernel.org/netdev/net/c/2c4ca7977298

You are awesome, thank you!
diff mbox series

Patch

diff --git a/tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh b/tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh
index 922744059aaa..80160579e0cc 100644
--- a/tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh
+++ b/tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh
@@ -51,6 +51,7 @@  function make_netdev {
     fi
 
     echo $NSIM_ID $@ > /sys/bus/netdevsim/new_device
+    udevadm settle
     # get new device name
     ls /sys/bus/netdevsim/devices/netdevsim${NSIM_ID}/net/
 }
diff --git a/tools/testing/selftests/drivers/net/netdevsim/udp_tunnel_nic.sh b/tools/testing/selftests/drivers/net/netdevsim/udp_tunnel_nic.sh
index 1b08e042cf94..4855ef597a15 100755
--- a/tools/testing/selftests/drivers/net/netdevsim/udp_tunnel_nic.sh
+++ b/tools/testing/selftests/drivers/net/netdevsim/udp_tunnel_nic.sh
@@ -233,6 +233,7 @@  function print_tables {
 function get_netdev_name {
     local -n old=$1
 
+    udevadm settle
     new=$(ls /sys/class/net)
 
     for netdev in $new; do