Skip to content

Commit 0879020

Browse files
committed
selftests: netdevsim: fix the udp_tunnel_nic test
This test is missing a whole bunch of checks for interface renaming and one ifup. Presumably it was only used on a system with renaming disabled and NetworkManager running. Fixes: 91f430b ("selftests: net: add a test for UDP tunnel info infra") Acked-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240123060529.1033912-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 0719b53 commit 0879020

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tools/testing/selftests/drivers/net/netdevsim/udp_tunnel_nic.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ for port in 0 1; do
270270
echo 1 > $NSIM_DEV_SYS/new_port
271271
fi
272272
NSIM_NETDEV=`get_netdev_name old_netdevs`
273+
ifconfig $NSIM_NETDEV up
273274

274275
msg="new NIC device created"
275276
exp0=( 0 0 0 0 )
@@ -431,6 +432,7 @@ for port in 0 1; do
431432
fi
432433

433434
echo $port > $NSIM_DEV_SYS/new_port
435+
NSIM_NETDEV=`get_netdev_name old_netdevs`
434436
ifconfig $NSIM_NETDEV up
435437

436438
overflow_table0 "overflow NIC table"
@@ -488,6 +490,7 @@ for port in 0 1; do
488490
fi
489491

490492
echo $port > $NSIM_DEV_SYS/new_port
493+
NSIM_NETDEV=`get_netdev_name old_netdevs`
491494
ifconfig $NSIM_NETDEV up
492495

493496
overflow_table0 "overflow NIC table"
@@ -544,6 +547,7 @@ for port in 0 1; do
544547
fi
545548

546549
echo $port > $NSIM_DEV_SYS/new_port
550+
NSIM_NETDEV=`get_netdev_name old_netdevs`
547551
ifconfig $NSIM_NETDEV up
548552

549553
overflow_table0 "destroy NIC"
@@ -573,6 +577,7 @@ for port in 0 1; do
573577
fi
574578

575579
echo $port > $NSIM_DEV_SYS/new_port
580+
NSIM_NETDEV=`get_netdev_name old_netdevs`
576581
ifconfig $NSIM_NETDEV up
577582

578583
msg="create VxLANs v6"
@@ -633,6 +638,7 @@ for port in 0 1; do
633638
fi
634639

635640
echo $port > $NSIM_DEV_SYS/new_port
641+
NSIM_NETDEV=`get_netdev_name old_netdevs`
636642
ifconfig $NSIM_NETDEV up
637643

638644
echo 110 > $NSIM_DEV_DFS/ports/$port/udp_ports_inject_error
@@ -688,6 +694,7 @@ for port in 0 1; do
688694
fi
689695

690696
echo $port > $NSIM_DEV_SYS/new_port
697+
NSIM_NETDEV=`get_netdev_name old_netdevs`
691698
ifconfig $NSIM_NETDEV up
692699

693700
msg="create VxLANs v6"
@@ -747,6 +754,7 @@ for port in 0 1; do
747754
fi
748755

749756
echo $port > $NSIM_DEV_SYS/new_port
757+
NSIM_NETDEV=`get_netdev_name old_netdevs`
750758
ifconfig $NSIM_NETDEV up
751759

752760
msg="create VxLANs v6"
@@ -877,6 +885,7 @@ msg="re-add a port"
877885

878886
echo 2 > $NSIM_DEV_SYS/del_port
879887
echo 2 > $NSIM_DEV_SYS/new_port
888+
NSIM_NETDEV=`get_netdev_name old_netdevs`
880889
check_tables
881890

882891
msg="replace VxLAN in overflow table"

0 commit comments

Comments
 (0)