Skip to content

Commit 514520b

Browse files
pmachatakuba-moo
authored andcommitted
selftests: forwarding: vxlan_bridge_1q_mc_ul: Drop useless sleeping
After fixing traffic matching in the previous patch, the test does not need to use the sleep anymore. So drop vx_wait() altogether, migrate all callers of vx{10,20}_create_wait() to the corresponding _create(), and drop the now unused _create_wait() helpers. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/eabfe4fa12ae788cf3b8c5c876a989de81dfc3d3.1765289566.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 0c8b9a6 commit 514520b

File tree

1 file changed

+22
-41
lines changed

1 file changed

+22
-41
lines changed

tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,6 @@ vx_create()
253253
}
254254
export -f vx_create
255255

256-
vx_wait()
257-
{
258-
# Wait for all the ARP, IGMP etc. noise to settle down so that the
259-
# tunnel is clear for measurements.
260-
sleep 10
261-
}
262-
263256
vx10_create()
264257
{
265258
vx_create vx10 10 id 1000 "$@"
@@ -272,18 +265,6 @@ vx20_create()
272265
}
273266
export -f vx20_create
274267

275-
vx10_create_wait()
276-
{
277-
vx10_create "$@"
278-
vx_wait
279-
}
280-
281-
vx20_create_wait()
282-
{
283-
vx20_create "$@"
284-
vx_wait
285-
}
286-
287268
ns_init_common()
288269
{
289270
local ns=$1; shift
@@ -559,15 +540,15 @@ ipv4_nomcroute()
559540
# Install a misleading (S,G) rule to attempt to trick the system into
560541
# pushing the packets elsewhere.
561542
adf_install_broken_sg
562-
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$swp2"
543+
vx10_create local 192.0.2.100 group "$GROUP4" dev "$swp2"
563544
do_test 4 10 0 "IPv4 nomcroute"
564545
}
565546

566547
ipv6_nomcroute()
567548
{
568549
# Like for IPv4, install a misleading (S,G).
569550
adf_install_broken_sg
570-
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$swp2"
551+
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$swp2"
571552
do_test 6 10 0 "IPv6 nomcroute"
572553
}
573554

@@ -586,35 +567,35 @@ ipv6_nomcroute_rx()
586567
ipv4_mcroute()
587568
{
588569
adf_install_sg
589-
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
570+
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
590571
do_test 4 10 10 "IPv4 mcroute"
591572
}
592573

593574
ipv6_mcroute()
594575
{
595576
adf_install_sg
596-
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
577+
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
597578
do_test 6 10 10 "IPv6 mcroute"
598579
}
599580

600581
ipv4_mcroute_rx()
601582
{
602583
adf_install_sg
603-
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
584+
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
604585
ipv4_do_test_rx 0 "IPv4 mcroute ping"
605586
}
606587

607588
ipv6_mcroute_rx()
608589
{
609590
adf_install_sg
610-
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
591+
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
611592
ipv6_do_test_rx 0 "IPv6 mcroute ping"
612593
}
613594

614595
ipv4_mcroute_changelink()
615596
{
616597
adf_install_sg
617-
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR"
598+
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR"
618599
ip link set dev vx10 type vxlan mcroute
619600
sleep 1
620601
do_test 4 10 10 "IPv4 mcroute changelink"
@@ -623,7 +604,7 @@ ipv4_mcroute_changelink()
623604
ipv6_mcroute_changelink()
624605
{
625606
adf_install_sg
626-
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
607+
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
627608
ip link set dev vx20 type vxlan mcroute
628609
sleep 1
629610
do_test 6 10 10 "IPv6 mcroute changelink"
@@ -632,47 +613,47 @@ ipv6_mcroute_changelink()
632613
ipv4_mcroute_starg()
633614
{
634615
adf_install_starg
635-
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
616+
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
636617
do_test 4 10 10 "IPv4 mcroute (*,G)"
637618
}
638619

639620
ipv6_mcroute_starg()
640621
{
641622
adf_install_starg
642-
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
623+
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
643624
do_test 6 10 10 "IPv6 mcroute (*,G)"
644625
}
645626

646627
ipv4_mcroute_starg_rx()
647628
{
648629
adf_install_starg
649-
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
630+
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
650631
ipv4_do_test_rx 0 "IPv4 mcroute (*,G) ping"
651632
}
652633

653634
ipv6_mcroute_starg_rx()
654635
{
655636
adf_install_starg
656-
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
637+
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
657638
ipv6_do_test_rx 0 "IPv6 mcroute (*,G) ping"
658639
}
659640

660641
ipv4_mcroute_noroute()
661642
{
662-
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
643+
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
663644
do_test 4 0 0 "IPv4 mcroute, no route"
664645
}
665646

666647
ipv6_mcroute_noroute()
667648
{
668-
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
649+
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
669650
do_test 6 0 0 "IPv6 mcroute, no route"
670651
}
671652

672653
ipv4_mcroute_fdb()
673654
{
674655
adf_install_sg
675-
vx10_create_wait local 192.0.2.100 dev "$IPMR" mcroute
656+
vx10_create local 192.0.2.100 dev "$IPMR" mcroute
676657
bridge fdb add dev vx10 \
677658
00:00:00:00:00:00 self static dst "$GROUP4" via "$IPMR"
678659
do_test 4 10 10 "IPv4 mcroute FDB"
@@ -681,7 +662,7 @@ ipv4_mcroute_fdb()
681662
ipv6_mcroute_fdb()
682663
{
683664
adf_install_sg
684-
vx20_create_wait local 2001:db8:4::1 dev "$IPMR" mcroute
665+
vx20_create local 2001:db8:4::1 dev "$IPMR" mcroute
685666
bridge -6 fdb add dev vx20 \
686667
00:00:00:00:00:00 self static dst "$GROUP6" via "$IPMR"
687668
do_test 6 10 10 "IPv6 mcroute FDB"
@@ -691,7 +672,7 @@ ipv6_mcroute_fdb()
691672
ipv4_mcroute_fdb_oif0()
692673
{
693674
adf_install_sg
694-
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
675+
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
695676
bridge fdb del dev vx10 00:00:00:00:00:00
696677
bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
697678
do_test 4 10 10 "IPv4 mcroute oif=0"
@@ -708,7 +689,7 @@ ipv6_mcroute_fdb_oif0()
708689
defer ip -6 route del table local multicast "$GROUP6/128" dev "$IPMR"
709690

710691
adf_install_sg
711-
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
692+
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
712693
bridge -6 fdb del dev vx20 00:00:00:00:00:00
713694
bridge -6 fdb add dev vx20 00:00:00:00:00:00 self static dst "$GROUP6"
714695
do_test 6 10 10 "IPv6 mcroute oif=0"
@@ -721,7 +702,7 @@ ipv4_mcroute_fdb_oif0_sep()
721702
adf_install_sg_sep
722703

723704
adf_ip_addr_add lo 192.0.2.120/28
724-
vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
705+
vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
725706
bridge fdb del dev vx10 00:00:00:00:00:00
726707
bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
727708
do_test 4 10 10 "IPv4 mcroute TX!=RX oif=0"
@@ -732,7 +713,7 @@ ipv4_mcroute_fdb_oif0_sep_rx()
732713
adf_install_sg_sep_rx lo
733714

734715
adf_ip_addr_add lo 192.0.2.120/28
735-
vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
716+
vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
736717
bridge fdb del dev vx10 00:00:00:00:00:00
737718
bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
738719
ipv4_do_test_rx 0 "IPv4 mcroute TX!=RX oif=0 ping"
@@ -743,7 +724,7 @@ ipv4_mcroute_fdb_sep_rx()
743724
adf_install_sg_sep_rx lo
744725

745726
adf_ip_addr_add lo 192.0.2.120/28
746-
vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
727+
vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
747728
bridge fdb del dev vx10 00:00:00:00:00:00
748729
bridge fdb add \
749730
dev vx10 00:00:00:00:00:00 self static dst "$GROUP4" via lo
@@ -755,7 +736,7 @@ ipv6_mcroute_fdb_sep_rx()
755736
adf_install_sg_sep_rx "X$IPMR"
756737

757738
adf_ip_addr_add "X$IPMR" 2001:db8:5::1/64
758-
vx20_create_wait local 2001:db8:5::1 group "$GROUP6" dev "$IPMR" mcroute
739+
vx20_create local 2001:db8:5::1 group "$GROUP6" dev "$IPMR" mcroute
759740
bridge -6 fdb del dev vx20 00:00:00:00:00:00
760741
bridge -6 fdb add dev vx20 00:00:00:00:00:00 \
761742
self static dst "$GROUP6" via "X$IPMR"

0 commit comments

Comments
 (0)