Skip to contentSkip to conversation

selftests: netdevsim: sprinkle more udevadm settle

PATCH Applied Jakub Kicinski 3 participants 3 messages Jan 14, 2024 – Jan 16, 2024

Subsystems (6)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 selftests: netdevsim: sprinkle more udevadm settle

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")

---
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 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(+)
tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh +1 -0
index 922744059aaa..80160579e0cc 100644
@@ -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/
 }
tools/testing/selftests/drivers/net/netdevsim/udp_tunnel_nic.sh +1 -0
index 1b08e042cf94..4855ef597a15 100755
@@ -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
Signature · 1 line
2.43.0
#2 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

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

Quoted 8 lines · 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")

[...]

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!

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