netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] testsuite: Add tests for bareudp tunnels
@ 2020-07-17 14:39 Guillaume Nault
  2020-07-20 20:32 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Nault @ 2020-07-17 14:39 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Martin Varghese

Test the plain MPLS (unicast and multicast) and IP (v4 and v6) modes.
Also test the multiproto option for MPLS and for IP.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
---
 testsuite/tests/ip/link/add_type_bareudp.t | 86 ++++++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100755 testsuite/tests/ip/link/add_type_bareudp.t

diff --git a/testsuite/tests/ip/link/add_type_bareudp.t b/testsuite/tests/ip/link/add_type_bareudp.t
new file mode 100755
index 00000000..8a2a1edf
--- /dev/null
+++ b/testsuite/tests/ip/link/add_type_bareudp.t
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+. lib/generic.sh
+
+ts_log "[Testing Add BareUDP interface (unicast MPLS)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV BareUDP interface (unicast MPLS)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype mpls_uc
+
+ts_ip "$0" "Show $NEW_DEV BareUDP interface (unicast MPLS)" -d link show dev $NEW_DEV
+test_on "$NEW_DEV"
+test_on "dstport 6635"
+test_on "ethertype mpls_uc"
+test_on "nomultiproto"
+
+ts_ip "$0" "Del $NEW_DEV BareUDP interface (unicast MPLS)" link del dev $NEW_DEV
+
+
+ts_log "[Testing Add BareUDP interface (multicast MPLS)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV BareUDP interface (multicast MPLS)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype mpls_mc
+
+ts_ip "$0" "Show $NEW_DEV BareUDP interface (multicast MPLS)" -d link show dev $NEW_DEV
+test_on "$NEW_DEV"
+test_on "dstport 6635"
+test_on "ethertype mpls_mc"
+test_on "nomultiproto"
+
+ts_ip "$0" "Del $NEW_DEV BareUDP interface (multicast MPLS)" link del dev $NEW_DEV
+
+
+ts_log "[Testing Add BareUDP interface (unicast and multicast MPLS)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV BareUDP interface (unicast and multicast MPLS)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype mpls_uc multiproto
+
+ts_ip "$0" "Show $NEW_DEV BareUDP interface (unicast and multicast MPLS)" -d link show dev $NEW_DEV
+test_on "$NEW_DEV"
+test_on "dstport 6635"
+test_on "ethertype mpls_uc"
+test_on "multiproto"
+
+ts_ip "$0" "Del $NEW_DEV BareUDP interface (unicast and multicast MPLS)" link del dev $NEW_DEV
+
+
+ts_log "[Testing Add BareUDP interface (IPv4)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV BareUDP interface (IPv4)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype ipv4
+
+ts_ip "$0" "Show $NEW_DEV BareUDP interface (IPv4)" -d link show dev $NEW_DEV
+test_on "$NEW_DEV"
+test_on "dstport 6635"
+test_on "ethertype ip"
+test_on "nomultiproto"
+
+ts_ip "$0" "Del $NEW_DEV BareUDP interface (IPv4)" link del dev $NEW_DEV
+
+
+ts_log "[Testing Add BareUDP interface (IPv6)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV BareUDP interface (IPv6)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype ipv6
+
+ts_ip "$0" "Show $NEW_DEV BareUDP interface (IPv6)" -d link show dev $NEW_DEV
+test_on "$NEW_DEV"
+test_on "dstport 6635"
+test_on "ethertype ipv6"
+test_on "nomultiproto"
+
+ts_ip "$0" "Del $NEW_DEV BareUDP interface (IPv6)" link del dev $NEW_DEV
+
+
+ts_log "[Testing Add BareUDP interface (IPv4 and IPv6)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV BareUDP interface (IPv4 and IPv6)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype ipv4 multiproto
+
+ts_ip "$0" "Show $NEW_DEV BareUDP interface (IPv4 and IPv6)" -d link show dev $NEW_DEV
+test_on "$NEW_DEV"
+test_on "dstport 6635"
+test_on "ethertype ip"
+test_on "multiproto"
+
+ts_ip "$0" "Del $NEW_DEV BareUDP interface (IPv4 and IPv6)" link del dev $NEW_DEV
-- 
2.21.3


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

* Re: [PATCH iproute2] testsuite: Add tests for bareudp tunnels
  2020-07-17 14:39 [PATCH iproute2] testsuite: Add tests for bareudp tunnels Guillaume Nault
@ 2020-07-20 20:32 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2020-07-20 20:32 UTC (permalink / raw)
  To: Guillaume Nault; +Cc: netdev, Martin Varghese

On Fri, 17 Jul 2020 16:39:46 +0200
Guillaume Nault <gnault@redhat.com> wrote:

> Test the plain MPLS (unicast and multicast) and IP (v4 and v6) modes.
> Also test the multiproto option for MPLS and for IP.
> 
> Signed-off-by: Guillaume Nault <gnault@redhat.com>

Applied, thanks

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

end of thread, other threads:[~2020-07-20 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-17 14:39 [PATCH iproute2] testsuite: Add tests for bareudp tunnels Guillaume Nault
2020-07-20 20:32 ` Stephen Hemminger

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