Merge pull request #1135 from kernelkit/test-fixes

Test fixes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2025-09-15 16:21:23 +02:00
committed by GitHub
280 changed files with 2282 additions and 2291 deletions
+4 -9
View File
@@ -39,7 +39,7 @@ env:
jobs:
test:
name: Regression Test ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
runs-on: [ self-hosted, regression ]
runs-on: [self-hosted, regression]
steps:
- name: Checkout infix repo
uses: actions/checkout@v4
@@ -87,7 +87,7 @@ jobs:
fi
make test
- name: Publish Test Result for ${{ env.TARGET }}
- name: Publish Test Result for ${{ env.TARGET }}
# Ensure this runs even if Regression Test fails
if: always()
run: cat $TEST_PATH/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
@@ -96,15 +96,10 @@ jobs:
# Ensure this runs even if Regression Test fails
if: always()
run: |
asciidoctor-pdf \
--theme $TEST_PATH/9pm/report/theme.yml \
-a pdf-fontsdir=$TEST_PATH/9pm/report/fonts \
$TEST_PATH/.log/last/report.adoc \
-o $TEST_PATH/.log/last/report.pdf
make test-dir="$(pwd)/$TEST_PATH" test-report
- name: Upload Test Report as Artifact
uses: actions/upload-artifact@v4
with:
name: test-report
path: ${{ env.TEST_PATH }}/.log/last/report.pdf
path: output/images/test-report.pdf
+2 -2
View File
@@ -83,7 +83,7 @@ genboot()
{
if [ -d "$bootdata" ]; then
bootimg=$(cat <<EOF
image efi-part.vfat {
image $BINARIES_DIR/efi-part.vfat {
size = $bootsize
vfat {
file EFI {
@@ -98,7 +98,7 @@ EOF
offset = $bootoffs
partition-type-uuid = U
bootable = true
image = efi-part.vfat
image = $BINARIES_DIR/efi-part.vfat
}
EOF
)
+20 -21
View File
@@ -14,38 +14,37 @@
infamy:
specification: False
- name: Misc tests
suite: misc/misc.yaml
- name: ietf-system
suite: ietf_system/ietf_system.yaml
suite: misc/all.yaml
# Upgrade may leave wrong boot order
- case: meta/bootorder.py
infamy:
specification: False
- name: ietf-syslog
suite: ietf_syslog/ietf_syslog.yaml
- name: "IETF System"
suite: ietf_system/all.yaml
- name: ietf-interfaces
suite: ietf_interfaces/ietf_interfaces.yaml
- name: "IETF Syslog"
suite: ietf_syslog/all.yaml
- name: ietf-routing
suite: ietf_routing/ietf_routing.yaml
- name: "IETF Interfaces"
suite: ietf_interfaces/all.yaml
- name: infix-containers
suite: infix_containers/infix_containers.yaml
- name: "IETF Routing"
suite: ietf_routing/all.yaml
- name: infix-dhcp
suite: infix_dhcp/infix_dhcp.yaml
- name: "Infix Containers"
suite: infix_containers/all.yaml
- name: ietf-hardware
suite: ietf_hardware/ietf_hardware.yaml
- name: "Infix DHCP"
suite: infix_dhcp/all.yaml
- name: infix-services
suite: infix_services/infix_services.yaml
- name: "IETF Hardware"
suite: ietf_hardware/all.yaml
- name: use-cases
suite: use_case/use_case.yml
- name: "Infix Services"
suite: infix_services/all.yaml
- name: "Use Case Tests"
suite: use_case/all.yaml
+4 -1
View File
@@ -1,7 +1,10 @@
:testgroup:
== ietf-hardware
<<<
Tests verifying IETF standard hardware monitoring and management:
- USB device detection and enumeration
- Multiple USB port management and device handling
include::usb/Readme.adoc[]
+6
View File
@@ -0,0 +1,6 @@
---
- name: USB configuration
case: usb/test.py
- name: USB configuration with two USB ports
case: usb_two_ports/test.py
@@ -1,6 +0,0 @@
---
- name: usb
case: usb/test.py
- name: usb_two_ports
case: usb_two_ports/test.py
+1 -1
View File
@@ -1 +1 @@
usb.adoc
test.adoc
@@ -1,5 +1,9 @@
=== USB configuration
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_hardware/usb]
==== Description
This test checks if the configuration is consistent with hardware state,
and verifies whether the USB ports are correctly _locked_ (restricted from
use) and _unlocked_ (available for use) when they should. It also verifies
@@ -11,18 +15,11 @@ If this pass you can be certain that the configuration of the USB
port is handled correctly.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_hardware/usb/topology.svg[USB configuration topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::usb/topology.svg[USB configuration topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[USB configuration topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[USB configuration topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Unlock all USB ports
. Verify that all USB ports are unlocked
@@ -36,5 +33,3 @@ endif::topdoc[]
. Verify USB port remain unlocked after reboot
<<<
@@ -1 +1 @@
usb_two_ports.adoc
test.adoc
@@ -1,21 +1,18 @@
=== USB configuration with two USB ports
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_hardware/usb_two_ports]
==== Description
Test that the USB locked/unlocked configuration is consistent
when having two USB ports.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_hardware/usb_two_ports/topology.svg[USB configuration with two USB ports topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::usb_two_ports/topology.svg[USB configuration with two USB ports topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[USB configuration with two USB ports topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[USB configuration with two USB ports topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Lock the first USB port and unlock the second USB port
. Verify that the correct port is locked and the correct one is unlocked
@@ -23,5 +20,3 @@ endif::topdoc[]
. Verify that the correct port is locked and the correct one is unlocked
<<<
+68 -1
View File
@@ -1,60 +1,127 @@
:testgroup:
== ietf-interfaces
<<<
Tests verifying IETF standard interface configuration and management:
- VLAN interface configuration and connectivity
- IPv4 and IPv6 address assignment and management
- IPv4 address auto-configuration mechanisms
- Interface aliases and physical address configuration
- Basic routing table configuration and operation
- Linux bridge creation, STP, and VLAN handling
- Link aggregation (LAG) setup and failover behavior
- IGMP multicast group management and forwarding
- QoS traffic classification and priority handling
- Interface enable/disable state management
- Virtual Ethernet (VETH) pair lifecycle management
- GRE tunneling configuration and data plane operation
include::vlan_ping/Readme.adoc[]
<<<
include::ipv4_address/Readme.adoc[]
<<<
include::ipv6_address/Readme.adoc[]
<<<
include::ipv4_autoconf/Readme.adoc[]
<<<
include::ifalias/Readme.adoc[]
<<<
include::iface_phys_address/Readme.adoc[]
<<<
include::routing_basic/Readme.adoc[]
<<<
include::bridge_basic/Readme.adoc[]
<<<
include::bridge_fwd_dual_dut/Readme.adoc[]
<<<
include::bridge_fwd_sgl_dut/Readme.adoc[]
<<<
include::bridge_stp_basic/Readme.adoc[]
<<<
include::bridge_veth/Readme.adoc[]
<<<
include::bridge_vlan/Readme.adoc[]
<<<
include::speed_duplex_copper/Readme.adoc[]
<<<
include::bridge_vlan_separation/Readme.adoc[]
<<<
include::dual_bridge/Readme.adoc[]
<<<
include::lag_basic/Readme.adoc[]
<<<
include::lag_failure/Readme.adoc[]
<<<
include::igmp_basic/Readme.adoc[]
<<<
include::igmp_vlan/Readme.adoc[]
<<<
include::static_multicast_filters/Readme.adoc[]
<<<
include::vlan_qos/Readme.adoc[]
<<<
include::verify_all_interface_types/Readme.adoc[]
<<<
include::iface_enable_disable/Readme.adoc[]
<<<
include::veth_delete/Readme.adoc[]
<<<
include::vlan_iface_termination/Readme.adoc[]
<<<
include::tunnel_basic/Readme.adoc[]
<<<
include::tunnel_bridged/Readme.adoc[]
+51
View File
@@ -0,0 +1,51 @@
---
- name: VLAN ping connectivity
case: vlan_ping/test.py
- name: Interface with IPv4
case: ipv4_address/test.py
- name: Interface IPv6 autoconf for bridges
case: ipv6_address/test.py
- name: Interface Description (ifAlias)
case: ifalias/test.py
- name: Custom MAC address on interface
case: iface_phys_address/test.py
- name: Routing basic
case: routing_basic/test.py
- name: VLAN Interface Ingress/Egress QoS
case: vlan_qos/test.py
- name: Interface Speed Duplex (Copper)
case: speed_duplex_copper/test.py
- name: Verify that all interface types can be created
case: verify_all_interface_types/test.py
- name: Interface status
case: iface_enable_disable/test.py
- name: VLAN Interface Termination
case: vlan_iface_termination/test.py
- name: Verify that VETH pairs can be deleted
case: veth_delete/test.py
- name: IPv4 link-local
case: ipv4_autoconf/test.py
- name: Bridge interface tests
suite: bridge.yaml
- name: Link aggregation tests
suite: lag.yaml
- name: Layer-2 multicast filtering tests
suite: igmp.yaml
- name: Layer-2/3 tunnel tests
suite: tunnels.yaml
+10 -7
View File
@@ -1,22 +1,25 @@
---
- name: bridge_fwd_sgl_dut
- name: Bridge forwarding single DUTs
case: bridge_fwd_sgl_dut/test.py
- name: bridge_fwd_dual_dut
- name: Bridge forwarding dual DUTs
case: bridge_fwd_dual_dut/test.py
- name: bridge_stp_basic
- name: Bridge STP Basic
case: bridge_stp_basic/test.py
- name: bridge_vlan_separation
- name: Bridge VLAN separation
case: bridge_vlan_separation/test.py
- name: bridge_basic
- name: Bridge basic
case: bridge_basic/test.py
- name: bridge_veth
- name: Dual bridges on one device
case: dual_bridge/test.py
- name: Bridge with a physical port and a veth
case: bridge_veth/test.py
- name: bridge_vlan
- name: Bridge VLAN
case: bridge_vlan/test.py
@@ -1 +1 @@
bridge_basic.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Bridge basic
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_basic]
==== Description
Test basic connectivity to a bridge
....
@@ -11,22 +15,13 @@ Test basic connectivity to a bridge
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/bridge_basic/topology.svg[Bridge basic topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::bridge_basic/topology.svg[Bridge basic topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Bridge basic topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Bridge basic topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure single bridge with a single physical port, bridge @ IP 10.0.0.2
. Verify ping 10.0.0.2 is possible from host:data
<<<
@@ -1 +1 @@
bridge_fwd_dual_dut.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Bridge forwarding dual DUTs
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_fwd_dual_dut]
==== Description
Ping through two bridges on two different DUTs.
....
@@ -23,22 +27,13 @@ Ping through two bridges on two different DUTs.
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Bridge forwarding dual DUTs topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Bridge forwarding dual DUTs topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure a bridge with triple physical port
. Verify ping 10.0.0.3 and 10.0.0.4 from host:data11
<<<
@@ -1 +1 @@
bridge_fwd_sgl_dut.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Bridge forwarding single DUTs
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_fwd_sgl_dut]
==== Description
Tests forwarding through a DUT with two bridged interfaces on one DUT.
....
@@ -23,22 +27,13 @@ Tests forwarding through a DUT with two bridged interfaces on one DUT.
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Bridge forwarding single DUTs topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Bridge forwarding single DUTs topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure a bridge with dual physical port
. Verify ping from host:data1 to 10.0.0.2
<<<
@@ -1 +1 @@
bridge_stp_basic.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Bridge STP Basic
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_stp_basic]
==== Description
First, verify that a fully connected mesh of 4 DUTs is pruned to a
spanning tree.
@@ -12,18 +16,11 @@ that a spanning tree rooted at A is formed, with B, C, and D all
directly connected to A.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/bridge_stp_basic/topology.svg[Bridge STP Basic topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::bridge_stp_basic/topology.svg[Bridge STP Basic topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Bridge STP Basic topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Bridge STP Basic topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure a bridge with spanning tree eneabled on dut a, b, c, and d
. Add an IP address to each host interface in the 10.0.0.0/24 subnet
@@ -35,5 +32,3 @@ endif::topdoc[]
. Verify that host:a can reach host:{b,c,d}
<<<
@@ -1 +1 @@
bridge_veth.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Bridge with a physical port and a veth
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_veth]
==== Description
This tests the possibility to add software added interfaces, in this case
VETH and bridge it with a physical interface
@@ -13,22 +17,13 @@ PING --> br0
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/bridge_veth/topology.svg[Bridge with a physical port and a veth topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::bridge_veth/topology.svg[Bridge with a physical port and a veth topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Bridge with a physical port and a veth topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Bridge with a physical port and a veth topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure bridged eth port and veth pair with IP 10.0.0.2
. Verify ping from host:data to 10.0.0.2
<<<
@@ -1 +1 @@
bridge_vlan.adoc
test.adoc
@@ -1,38 +0,0 @@
=== Bridge VLAN
==== Description
Verify VLAN filtering bridge, with a VLAN trunk to a neighboring device,
which in turn untags one VLAN outisde a non-VLAN filtering bridge.
.Logical network setup
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/bridge_vlan/bridge-vlan.svg[]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::bridge_vlan/bridge-vlan.svg[]
endif::testgroup[]
ifndef::testgroup[]
image::bridge-vlan.svg[]
endif::testgroup[]
endif::topdoc[]
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/bridge_vlan/topology.svg[Bridge VLAN topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::bridge_vlan/topology.svg[Bridge VLAN topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Bridge VLAN topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUT
. Configure DUTs
. Verify ping from host:data to 10.0.0.2 and 10.0.0.3
<<<
@@ -0,0 +1,23 @@
=== Bridge VLAN
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_vlan]
==== Description
Verify VLAN filtering bridge, with a VLAN trunk to a neighboring device,
which in turn untags one VLAN outisde a non-VLAN filtering bridge.
.Logical network setup
image::bridge-vlan.svg[align=center, scaledwidth=75%]
==== Topology
image::topology.svg[Bridge VLAN topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure DUTs
. Verify ping from host:data to 10.0.0.2 and 10.0.0.3
@@ -6,7 +6,7 @@ Verify VLAN filtering bridge, with a VLAN trunk to a neighboring device,
which in turn untags one VLAN outisde a non-VLAN filtering bridge.
.Logical network setup
image::bridge-vlan.svg[]
image::bridge-vlan.svg[align=center, scaledwidth=75%]
"""
import infamy
@@ -1 +1 @@
bridge_vlan_separation.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Bridge VLAN separation
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/bridge_vlan_separation]
==== Description
Test that two VLANs are correctly separated in the bridge
....
@@ -22,18 +26,11 @@ Test that two VLANs are correctly separated in the bridge
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/bridge_vlan_separation/topology.svg[Bridge VLAN separation topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::bridge_vlan_separation/topology.svg[Bridge VLAN separation topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Bridge VLAN separation topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Bridge VLAN separation topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure DUTs
. Verify ping 10.0.0.3 from host:data10
@@ -45,5 +42,3 @@ endif::topdoc[]
. Verify broadcast is NOT received on host:data11 and host:data21
<<<
@@ -1 +1 @@
dual_bridge.adoc
test.adoc
@@ -1,30 +0,0 @@
=== Dual bridges on one device
==== Description
Verify that it is possible to ping through a bridge to another bridge via VETH interfaces.
....
PING --> br0 br1 10.0.0.2
/ \ /
PC - target:data veth0a - veth0b
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/dual_bridge/topology.svg[Dual bridges on one device topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::dual_bridge/topology.svg[Dual bridges on one device topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Dual bridges on one device topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUTs
. Configure two bridges linked and a veth pair
. Verify ping from host:data to 10.0.0.2
<<<
@@ -0,0 +1,26 @@
=== Dual bridges on one device
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/dual_bridge]
==== Description
Verify that it is possible to ping through a bridge to another bridge
via a VETH pair connected to both.
....
PING --> br0 br1 10.0.0.2
/ \ /
PC - target:data veth0a - veth0b
....
==== Topology
image::topology.svg[Dual bridges on one device topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure two bridges linked and a veth pair
. Verify ping from host:data to 10.0.0.2
@@ -1,16 +1,15 @@
#!/usr/bin/env python3
#
"""Dual bridges on one device
"""
Dual bridges on one device
Verify that it is possible to ping through a bridge to another bridge via VETH interfaces.
Verify that it is possible to ping through a bridge to another bridge
via a VETH pair connected to both.
....
PING --> br0 br1 10.0.0.2
/ \\ /
PC - target:data veth0a - veth0b
....
"""
import infamy
@@ -1,51 +0,0 @@
---
- name: vlan_ping
case: vlan_ping/test.py
- name: ipv4_address
case: ipv4_address/test.py
- name: ipv6_address
case: ipv6_address/test.py
- name: ifalias
case: ifalias/test.py
- name: iface_phys_address
case: iface_phys_address/test.py
- name: routing_basic
case: routing_basic/test.py
- name: vlan_qos
case: vlan_qos/test.py
- name: speed_duplex_copper
case: speed_duplex_copper/test.py
- name: verify_all_interface_types
case: verify_all_interface_types/test.py
- name: iface_enable_disable
case: iface_enable_disable/test.py
- name: vlan_iface_termination
case: vlan_iface_termination/test.py
- name: veth_delete
case: veth_delete/test.py
- name: ipv4_autoconf
case: ipv4_autoconf/test.py
- name: bridge
suite: bridge.yaml
- name: link_aggregation
suite: lag.yaml
- name: igmp
suite: igmp.yaml
- name: tunnels
suite: tunnels.yaml
@@ -1 +1 @@
iface_enable_disable.adoc
test.adoc
@@ -1,23 +1,20 @@
=== Interface status
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/iface_enable_disable]
==== Description
Verify interface status properly propagate changes when an interface
is disabled and then re-enabled.
Both admin-status and oper-status are verified.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/iface_enable_disable/topology.svg[Interface status topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::iface_enable_disable/topology.svg[Interface status topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Interface status topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Interface status topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure bridge and associated interfaces in target1
. Disable interface in target2
@@ -27,5 +24,3 @@ endif::topdoc[]
. Verify it is possible to ping the interface
<<<
@@ -1 +1 @@
iface_phys_address.adoc
test.adoc
@@ -1,22 +1,19 @@
=== Custom MAC address on interface
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/iface_phys_address]
==== Description
Verify support for setting and removing a custom MAC address on interfaces.
Both static MAC address and derived from the chassis MAC with, or without,
an offset applied.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/iface_phys_address/topology.svg[Custom MAC address on interface topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::iface_phys_address/topology.svg[Custom MAC address on interface topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Custom MAC address on interface topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Custom MAC address on interface topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Set target:data static MAC address '02:01:00:c0:ff:ee'
. Verify target:data has MAC address '02:01:00:c0:ff:ee'
@@ -30,5 +27,3 @@ endif::topdoc[]
. Verify target:data MAC address is reset to default
<<<
@@ -1 +1 @@
ifalias.adoc
test.adoc
@@ -1,25 +0,0 @@
=== Interface Description (ifAlias)
==== Description
Verify interface description (ifAlias) can be set on an interface and
then be read back from the operational datastore.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/ifalias/topology.svg[Interface Description (ifAlias) topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::ifalias/topology.svg[Interface Description (ifAlias) topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Interface Description (ifAlias) topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUT
. Set up interface target:data with description
. Verify description can be read back from operational
<<<
@@ -0,0 +1,20 @@
=== Interface Description (ifAlias)
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/ifalias]
==== Description
Verify interface description (ifAlias) can be set on an interface and
then be read back from the operational datastore.
==== Topology
image::topology.svg[Interface Description (ifAlias) topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Set up interface target:data with description
. Verify description can be read back from operational
+3 -3
View File
@@ -1,9 +1,9 @@
---
- name: igmp_basic
- name: IGMP basic
case: igmp_basic/test.py
- name: igmp_vlan
- name: IGMP VLAN
case: igmp_vlan/test.py
- name: static_multicast_filters
- name: Static multicast filters
case: static_multicast_filters/test.py
@@ -1 +1 @@
igmp_basic.adoc
test.adoc
@@ -1,5 +1,9 @@
=== IGMP basic
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/igmp_basic]
==== Description
Verify that all multicast get flooded when no IGMP join exists in the system and
the flooding stops as soon a join arrives
@@ -17,18 +21,11 @@ the flooding stops as soon a join arrives
HOST
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/igmp_basic/topology.svg[IGMP basic topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::igmp_basic/topology.svg[IGMP basic topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[IGMP basic topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[IGMP basic topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure device
. Start multicast sender on host:data0, group 224.1.1.1
@@ -38,5 +35,3 @@ endif::topdoc[]
. Verify that the group 224.1.1.1 is no longer received on host:data3
<<<
@@ -1 +1 @@
igmp_vlan.adoc
test.adoc
@@ -1,5 +1,9 @@
=== IGMP VLAN
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/igmp_vlan]
==== Description
Test tagged IGMP control traffic and that VLAN separation is respected for multicast
....
@@ -20,18 +24,11 @@ Test tagged IGMP control traffic and that VLAN separation is respected for multi
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/igmp_vlan/topology.svg[IGMP VLAN topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::igmp_vlan/topology.svg[IGMP VLAN topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[IGMP VLAN topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[IGMP VLAN topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure device
. Start multicast sender on host:data11, group 224.2.2.2
@@ -45,5 +42,3 @@ endif::topdoc[]
. Verify group 224.1.1.1 is forwarded to host:data12
<<<
@@ -1 +1 @@
ipv4_address.adoc
test.adoc
@@ -1,20 +1,17 @@
=== Interface with IPv4
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/ipv4_address]
==== Description
Test that it is possible to set and remove the IPv4 address on an interface
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/ipv4_address/topology.svg[Interface with IPv4 topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::ipv4_address/topology.svg[Interface with IPv4 topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Interface with IPv4 topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Interface with IPv4 topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure IPv4 address 10.10.10.20/24 on target:mgmt
. Verify '10.10.10.20/24' exists on target:mgmt
@@ -22,5 +19,3 @@ endif::topdoc[]
. Verify target:mgmt no longer has the address 10.10.10.20
<<<
@@ -1 +1 @@
ipv4_autoconf.adoc
test.adoc
@@ -1,22 +1,19 @@
=== IPv4 link-local
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/ipv4_autoconf]
==== Description
Verifies that link-local (IPv4LL/ZeroConf) address assignment work as
expected. Checks random address, the request-address setting, and
address removal on autoconf disable.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/ipv4_autoconf/topology.svg[IPv4 link-local topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::ipv4_autoconf/topology.svg[IPv4 link-local topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[IPv4 link-local topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[IPv4 link-local topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure interface target:data with IPv4 ZeroConf IP
. Verify link-local address exist on target:data
@@ -26,5 +23,3 @@ endif::topdoc[]
. Verify link-local addresses has been removed from target:data
<<<
@@ -1 +1 @@
ipv6_address.adoc
test.adoc
@@ -1,25 +1,20 @@
=== Interface IPv6 autoconf for bridges
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/ipv6_address]
==== Description
Verify IPv6 autoconf on a bridge is properly set up for global prefix.
See issue #473 for details.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/ipv6_address/topology.svg[Interface IPv6 autoconf for bridges topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::ipv6_address/topology.svg[Interface IPv6 autoconf for bridges topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Interface IPv6 autoconf for bridges topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Interface IPv6 autoconf for bridges topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Setting up bridge with IPv6 SLAAC for global prefix on target:data
. Verify using sysctl that 'net.ipv6.conf.br0.autoconf' is 1 on target
<<<
+2 -2
View File
@@ -1,5 +1,5 @@
---
- name: lag_basic
- name: Ling Aggregation Basic
case: lag_basic/test.py
- name: lag_failure
- name: LACP Aggregate w/ Degraded Link
case: lag_failure/test.py
@@ -1 +1 @@
lag_basic.adoc
test.adoc
@@ -1,43 +0,0 @@
=== Ling Aggregation Basic
==== Description
Verify communication over a link aggregate in static and LACP operating
modes during basic failure scenarios.
.Internal network setup, PC verifies connectivity with dut2 via dut1
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/lag_basic/lag-basic.svg[Internal networks]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::lag_basic/lag-basic.svg[Internal networks]
endif::testgroup[]
ifndef::testgroup[]
image::lag-basic.svg[Internal networks]
endif::testgroup[]
endif::topdoc[]
The host verifies connectivity with dut2 via dut1 over the aggregate for
each test step using the `mon` interface.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/lag_basic/topology.svg[Ling Aggregation Basic topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::lag_basic/topology.svg[Ling Aggregation Basic topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Ling Aggregation Basic topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUTs
. Set up LACP link aggregate, lag0, on dut1 and dut2
. Verify failure modes for lacp mode
. Set up static link aggregate, lag0, on dut1 and dut2
. Verify failure modes for static mode
<<<
@@ -0,0 +1,28 @@
=== Ling Aggregation Basic
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/lag_basic]
==== Description
Verify communication over a link aggregate in static and LACP operating
modes during basic failure scenarios.
.Internal network setup, PC verifies connectivity with dut2 via dut1
image::lag-basic.svg[align=center, scaledwidth=75%]
The host verifies connectivity with dut2 via dut1 over the aggregate for
each test step using the `mon` interface.
==== Topology
image::topology.svg[Ling Aggregation Basic topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Set up LACP link aggregate, lag0, on dut1 and dut2
. Verify failure modes for lacp mode
. Set up static link aggregate, lag0, on dut1 and dut2
. Verify failure modes for static mode
+1 -1
View File
@@ -5,7 +5,7 @@ Verify communication over a link aggregate in static and LACP operating
modes during basic failure scenarios.
.Internal network setup, PC verifies connectivity with dut2 via dut1
image::lag-basic.svg[Internal networks]
image::lag-basic.svg[align=center, scaledwidth=75%]
The host verifies connectivity with dut2 via dut1 over the aggregate for
each test step using the `mon` interface.
@@ -1 +1 @@
lag_failure.adoc
test.adoc
@@ -1,42 +0,0 @@
=== LACP Aggregate w/ Degraded Link
==== Description
Verify communication over an LACP link aggregate when individual member
links stop forwarding traffic, without carrier loss.
.Logical network setup, link breakers (lb1 & lb2) here managed by host PC
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/lag_failure/lag-failure.svg[]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::lag_failure/lag-failure.svg[]
endif::testgroup[]
ifndef::testgroup[]
image::lag-failure.svg[]
endif::testgroup[]
endif::topdoc[]
The host verifies connectivity with dut2 via dut1 over the aggregate for
each failure mode step using the `mon` interface.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/lag_failure/topology.svg[LACP Aggregate w/ Degraded Link topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::lag_failure/topology.svg[LACP Aggregate w/ Degraded Link topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[LACP Aggregate w/ Degraded Link topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUTs
. Set up link aggregate, lag0, between dut1 and dut2
. Initial connectivity check ...
. Verify failure modes
<<<
@@ -0,0 +1,27 @@
=== LACP Aggregate w/ Degraded Link
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/lag_failure]
==== Description
Verify communication over an LACP link aggregate when individual member
links stop forwarding traffic, without carrier loss.
.Logical network setup, link breakers (lb1 & lb2) here managed by host PC
image::lag-failure.svg[align=center, scaledwidth=75%]
The host verifies connectivity with dut2 via dut1 over the aggregate for
each failure mode step using the `mon` interface.
==== Topology
image::topology.svg[LACP Aggregate w/ Degraded Link topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Set up link aggregate, lag0, between dut1 and dut2
. Initial connectivity check ...
. Verify failure modes
@@ -5,7 +5,7 @@ Verify communication over an LACP link aggregate when individual member
links stop forwarding traffic, without carrier loss.
.Logical network setup, link breakers (lb1 & lb2) here managed by host PC
image::lag-failure.svg[]
image::lag-failure.svg[align=center, scaledwidth=75%]
The host verifies connectivity with dut2 via dut1 over the aggregate for
each failure mode step using the `mon` interface.
@@ -1 +1 @@
routing_basic.adoc
test.adoc
@@ -1,21 +1,18 @@
=== Routing basic
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/routing_basic]
==== Description
Verify routing between interfaces is possible. That enable/disable routing
in configuration has the expected result.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/routing_basic/topology.svg[Routing basic topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::routing_basic/topology.svg[Routing basic topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Routing basic topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Routing basic topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Setup host
. Enable forwarding on target:data1 and target:data2
@@ -25,5 +22,3 @@ endif::topdoc[]
. Verify ping does not work host:data1 to 10.0.0.10 and host:data2 to 192.168.0.10
<<<
@@ -1 +1 @@
speed_duplex_copper.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Interface Speed Duplex (Copper)
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/speed_duplex_copper]
==== Description
Verify that the interface operates at the expected speed/duplex in two scenarios:
1. Fixed configuration host and target are both manually set to a specific speed/duplex
@@ -7,18 +11,11 @@ Verify that the interface operates at the expected speed/duplex in two scenarios
to the highest common speed/duplex.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/speed_duplex_copper/topology.svg[Interface Speed Duplex (Copper) topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::speed_duplex_copper/topology.svg[Interface Speed Duplex (Copper) topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Interface Speed Duplex (Copper) topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Interface Speed Duplex (Copper) topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Enable target interface
. Verify fixed 10/full
@@ -34,5 +31,3 @@ endif::topdoc[]
. Verify auto-negotiation to 10/half + 10/full + 100/half + 100/full + 1000/full
<<<
@@ -1 +1 @@
static_multicast_filters.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Static multicast filters
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/static_multicast_filters]
==== Description
Verify that static multicast filters work (remember that snooping needs to
enabled when using static multicast filters)
@@ -19,18 +23,11 @@ enabled when using static multicast filters)
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/static_multicast_filters/topology.svg[Static multicast filters topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::static_multicast_filters/topology.svg[Static multicast filters topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Static multicast filters topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Static multicast filters topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure device without static filter
. Start multicast sender on host:data1, group 224.1.1.1
@@ -45,5 +42,3 @@ endif::topdoc[]
. Verify that the MAC group is no longer forwarded to host:data3
<<<
@@ -1,6 +1,10 @@
include::gre_basic.adoc[]
include::gre.adoc[]
include::gretap_basic.adoc[]
<<<
include::vxlan_basic.adoc[]
include::gretap.adoc[]
<<<
include::vxlan.adoc[]
@@ -0,0 +1,26 @@
=== GRE point-to-point
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/tunnel_basic]
==== Description
Set up a tunnel between two DUTs, host connected to the first DUT. Enable
IP forwarding on first DUT's interface to host and the tunnel interface to
the second DUT. On host, add route to IP network of second DUT and verify
connectivity with the second DUT through the tunnel.
- Tunnel types: GRE, GRETAP, and VxLAN
- Connectivity: IPv4 and IPv6
==== Topology
image::topology.svg[GRE point-to-point topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure DUTs with tunnel gre
. Verify connectivity host:data to 10.0.0.2
. Verify connectivity host:data to 2001:db8::c0a8:0a02
+1
View File
@@ -0,0 +1 @@
test.py
@@ -1,26 +0,0 @@
=== GRE point-to-point
==== Description
Test setting up gre tunnels using IPv4 and IPv6,
and ends with a connectivity test.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/tunnel_basic/topology.svg[GRE point-to-point topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::tunnel_basic/topology.svg[GRE point-to-point topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[GRE point-to-point topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUTs
. Configure DUTs
. Verify connectivity host:data to 10.0.0.2
. Verify connectivity host:data to 2001:db8::c0a8:0a02
<<<
@@ -0,0 +1,26 @@
=== GRETAP point-to-point
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/tunnel_basic]
==== Description
Set up a tunnel between two DUTs, host connected to the first DUT. Enable
IP forwarding on first DUT's interface to host and the tunnel interface to
the second DUT. On host, add route to IP network of second DUT and verify
connectivity with the second DUT through the tunnel.
- Tunnel types: GRE, GRETAP, and VxLAN
- Connectivity: IPv4 and IPv6
==== Topology
image::topology.svg[GRETAP point-to-point topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure DUTs with tunnel gretap
. Verify connectivity host:data to 10.0.0.2
. Verify connectivity host:data to 2001:db8::c0a8:0a02
+1
View File
@@ -0,0 +1 @@
test.py
@@ -1,26 +0,0 @@
=== GRETAP point-to-point
==== Description
Test setting up gretap tunnels using IPv4 and IPv6,
and ends with a connectivity test.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/tunnel_basic/topology.svg[GRETAP point-to-point topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::tunnel_basic/topology.svg[GRETAP point-to-point topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[GRETAP point-to-point topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUTs
. Configure DUTs
. Verify connectivity host:data to 10.0.0.2
. Verify connectivity host:data to 2001:db8::c0a8:0a02
<<<
+43 -43
View File
@@ -2,27 +2,34 @@
"""
Basic tunnel connectivity test
Test setting up {type} tunnels using IPv4 and IPv6,
and ends with a connectivity test.
Set up a tunnel between two DUTs, host connected to the first DUT. Enable
IP forwarding on first DUT's interface to host and the tunnel interface to
the second DUT. On host, add route to IP network of second DUT and verify
connectivity with the second DUT through the tunnel.
- Tunnel types: GRE, GRETAP, and VxLAN
- Connectivity: IPv4 and IPv6
"""
import infamy
class ArgumentParser(infamy.ArgumentParser):
def __init__(self):
super().__init__()
self.add_argument("--type")
self.add_argument("--tunnel")
with infamy.Test() as test:
with test.step("Set up topology and attach to target DUTs"):
args=ArgumentParser()
env = infamy.Env(args=args)
type = env.args.type
arg = ArgumentParser()
env = infamy.Env(args=arg)
tunnel = env.args.tunnel
left = env.attach("left", "mgmt")
right = env.attach("right", "mgmt")
with test.step("Configure DUTs"):
container_left4 = {
with test.step("Configure DUTs with tunnel {tunnel}"):
container_left4 = {
"local": "192.168.50.1",
"remote": "192.168.50.2"
}
@@ -30,7 +37,7 @@ with infamy.Test() as test:
"local": "2001:db8:3c4d:50::1",
"remote": "2001:db8:3c4d:50::2",
}
container_right4 = {
container_right4 = {
"local": "192.168.50.2",
"remote": "192.168.50.1"
}
@@ -38,10 +45,11 @@ with infamy.Test() as test:
"local": "2001:db8:3c4d:50::2",
"remote": "2001:db8:3c4d:50::1",
}
if type == "gretap" or type == "gre":
container_name = "gre"
if type == "vxlan":
container_name = "vxlan"
if tunnel in ("gretap", "gre"):
CONTAINER_TYPE = "gre"
else:
CONTAINER_TYPE = tunnel
container_left4.update({
"vni": 4
})
@@ -55,11 +63,9 @@ with infamy.Test() as test:
"vni": 6
})
left.put_config_dicts({ "ietf-interfaces": {
left.put_config_dicts({"ietf-interfaces": {
"interfaces": {
"interface": [
{
"interface": [{
"name": left["link"],
"ipv4": {
"address": [{
@@ -75,8 +81,7 @@ with infamy.Test() as test:
}],
"forwarding": True
}
},
{
}, {
"name": left["data"],
"ipv4": {
"address": [{
@@ -92,10 +97,9 @@ with infamy.Test() as test:
}],
"forwarding": True
}
},
{
"name": f"{type}4",
"type": f"infix-if-type:{type}",
}, {
"name": f"{tunnel}4",
"type": f"infix-if-type:{tunnel}",
"ipv4": {
"address": [{
"ip": "192.168.30.1",
@@ -103,28 +107,25 @@ with infamy.Test() as test:
}],
"forwarding": True
},
container_name: container_left4
},
{
"name": f"{type}6",
"type": f"infix-if-type:{type}",
CONTAINER_TYPE: container_left4
}, {
"name": f"{tunnel}6",
"type": f"infix-if-type:{tunnel}",
"ipv6": {
"address": [{
"ip": "2001:db8:3c4d:30::1",
"prefix-length": 64
}]
},
container_name: container_left6
CONTAINER_TYPE: container_left6
}]
}
}
})
}})
right.put_config_dicts({
"ietf-interfaces": {
"interfaces": {
"interface": [
{
"interface": [{
"name": right["link"],
"ipv4": {
"address": [{
@@ -139,10 +140,9 @@ with infamy.Test() as test:
"prefix-length": 64
}]
}
},
{
"name": f"{type}4",
"type": f"infix-if-type:{type}",
}, {
"name": f"{tunnel}4",
"type": f"infix-if-type:{tunnel}",
"ipv4": {
"address": [{
"ip": "192.168.30.2",
@@ -150,18 +150,17 @@ with infamy.Test() as test:
}],
"forwarding": True
},
container_name: container_right4
},
{
"name": f"{type}",
"type": f"infix-if-type:{type}",
CONTAINER_TYPE: container_right4
}, {
"name": f"{tunnel}",
"type": f"infix-if-type:{tunnel}",
"ipv6": {
"address": [{
"ip": "2001:db8:3c4d:30::2",
"prefix-length": 64
}]
},
container_name: container_right6
CONTAINER_TYPE: container_right6
}]
}
},
@@ -194,6 +193,7 @@ with infamy.Test() as test:
}
}
})
_, hport = env.ltop.xlate("host", "data")
with test.step("Verify connectivity host:data to 10.0.0.2"):
with infamy.IsolatedMacVlan(hport) as ns0:
@@ -1,18 +1,15 @@
---
- name: gre_basic
case: test.py
opts: ["--type", "gre"]
infamy:
title: GRE point-to-point
- settings:
test-spec: <case>.adoc
- name: gretap_basic
case: test.py
opts: ["--type", "gretap"]
infamy:
title: GRETAP point-to-point
- name: GRE point-to-point
case: gre.py
opts: ["--tunnel", "gre"]
- name: vxlan_basic
case: test.py
opts: ["--type", "vxlan"]
infamy:
title: VXLAN point-to-point
- name: GRETAP point-to-point
case: gretap.py
opts: ["--tunnel", "gretap"]
- name: VXLAN point-to-point
case: vxlan.py
opts: ["--tunnel", "vxlan"]
@@ -0,0 +1,26 @@
=== VXLAN point-to-point
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/tunnel_basic]
==== Description
Set up a tunnel between two DUTs, host connected to the first DUT. Enable
IP forwarding on first DUT's interface to host and the tunnel interface to
the second DUT. On host, add route to IP network of second DUT and verify
connectivity with the second DUT through the tunnel.
- Tunnel types: GRE, GRETAP, and VxLAN
- Connectivity: IPv4 and IPv6
==== Topology
image::topology.svg[VXLAN point-to-point topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure DUTs with tunnel vxlan
. Verify connectivity host:data to 10.0.0.2
. Verify connectivity host:data to 2001:db8::c0a8:0a02
+1
View File
@@ -0,0 +1 @@
test.py
@@ -1,26 +0,0 @@
=== VXLAN point-to-point
==== Description
Test setting up vxlan tunnels using IPv4 and IPv6,
and ends with a connectivity test.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/tunnel_basic/topology.svg[VXLAN point-to-point topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::tunnel_basic/topology.svg[VXLAN point-to-point topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[VXLAN point-to-point topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUTs
. Configure DUTs
. Verify connectivity host:data to 10.0.0.2
. Verify connectivity host:data to 2001:db8::c0a8:0a02
<<<
@@ -1,4 +1,6 @@
include::gretap_bridged.adoc[]
include::gretap.adoc[]
include::vxlan_bridged.adoc[]
<<<
include::vxlan.adoc[]
@@ -0,0 +1,24 @@
=== GRETAP bridged with physical interface
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/tunnel_bridged]
==== Description
Set up a layer-2 tunnel between two DUTs, host is connected to the first DUT.
Bridge the interface connected to the host and the tunnel interface on the
first DUT. On host, verify connectivity with the second DUT through tunnel.
- Tunnel types: GRETAP, and VxLAN
- Connectivity: IPv4
==== Topology
image::topology.svg[GRETAP bridged with physical interface topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure DUTs with tunnel gretap
. Test connectivity host:data to right:gretap0 at 192.168.10.2
+1
View File
@@ -0,0 +1 @@
test.py
@@ -1,24 +0,0 @@
=== GRETAP bridged with physical interface
==== Description
Test that gretap works as it should and that it possible to bridge it.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/tunnel_bridged/topology.svg[GRETAP bridged with physical interface topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::tunnel_bridged/topology.svg[GRETAP bridged with physical interface topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[GRETAP bridged with physical interface topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUTs
. Configure DUTs
. Test connectivity host:data to right:gretap0 at 192.168.10.2
<<<
@@ -2,36 +2,42 @@
"""
Tunnel interface bridged with physical
Test that {type} works as it should and that it possible to bridge it.
Set up a layer-2 tunnel between two DUTs, host is connected to the first DUT.
Bridge the interface connected to the host and the tunnel interface on the
first DUT. On host, verify connectivity with the second DUT through tunnel.
- Tunnel types: GRETAP, and VxLAN
- Connectivity: IPv4
"""
import infamy
class ArgumentParser(infamy.ArgumentParser):
def __init__(self):
super().__init__()
self.add_argument("--type")
self.add_argument("--tunnel")
with infamy.Test() as test:
with test.step("Set up topology and attach to target DUTs"):
args=ArgumentParser()
env = infamy.Env(args=args)
arg = ArgumentParser()
env = infamy.Env(args=arg)
left = env.attach("left", "mgmt")
right = env.attach("right", "mgmt")
type = env.args.type
tunnel = env.args.tunnel
with test.step("Configure DUTs"):
if type == "gretap":
container_name = "gre"
with test.step("Configure DUTs with tunnel {tunnel}"):
if tunnel == "gretap":
CONTAINER_TYPE = "gre"
else:
container_name = type
CONTAINER_TYPE = tunnel
container_left = {
container_left = {
"local": "192.168.50.1",
"remote": "192.168.50.2"
}
container_right = {
container_right = {
"local": "192.168.50.2",
"remote": "192.168.50.1"
}
@@ -41,10 +47,10 @@ with infamy.Test() as test:
container_right.update({
"vni": 4
})
left.put_config_dicts({ "ietf-interfaces": {
left.put_config_dicts({"ietf-interfaces": {
"interfaces": {
"interface": [
{
"interface": [{
"name": left["link"],
"ipv4": {
"address": [{
@@ -53,36 +59,30 @@ with infamy.Test() as test:
}],
"forwarding": True
}
},
{
}, {
"name": left["data"],
"bridge-port": {
"bridge": "br0"
}
},
{
}, {
"name": "br0",
"type": "infix-if-type:bridge"
},
{
"name": f"{type}0",
"type": f"infix-if-type:{type}",
container_name: container_left,
}, {
"name": f"{tunnel}0",
"type": f"infix-if-type:{tunnel}",
CONTAINER_TYPE: container_left,
"bridge-port": {
"bridge": "br0"
}
}
]
}
}
})
}]
}
}})
right.put_config_dicts({
"ietf-interfaces": {
"interfaces": {
"interface": [
{
"interface": [{
"name": right["link"],
"ipv4": {
"address": [{
@@ -97,10 +97,9 @@ with infamy.Test() as test:
"prefix-length": 64
}]
}
},
{
"name": f"{type}0",
"type": f"infix-if-type:{type}",
}, {
"name": f"{tunnel}0",
"type": f"infix-if-type:{tunnel}",
"ipv4": {
"address": [{
"ip": "192.168.10.2",
@@ -108,13 +107,14 @@ with infamy.Test() as test:
}],
"forwarding": True
},
container_name: container_right,
CONTAINER_TYPE: container_right,
}]
}
}
})
_, hport = env.ltop.xlate("host", "data")
with test.step(f"Test connectivity host:data to right:{type}0 at 192.168.10.2"):
with test.step(f"Test connectivity host:data to right:{tunnel}0 at 192.168.10.2"):
with infamy.IsolatedMacVlan(hport) as ns0:
ns0.addip("192.168.10.1")
ns0.must_reach("192.168.10.2")
@@ -1,12 +1,11 @@
---
- name: gretap_bridged
case: test.py
opts: ["--type", "gretap"]
infamy:
title: GRETAP bridged with physical interface
- settings:
test-spec: <case>.adoc
- name: vxlan_bridged
case: test.py
opts: ["--type", "vxlan"]
infamy:
title: VXLAN bridged with physical interface
- name: GRETAP bridged with physical interface
case: gretap.py
opts: ["--tunnel", "gretap"]
- name: VXLAN bridged with physical interface
case: vxlan.py
opts: ["--tunnel", "vxlan"]
@@ -0,0 +1,24 @@
=== VXLAN bridged with physical interface
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/tunnel_bridged]
==== Description
Set up a layer-2 tunnel between two DUTs, host is connected to the first DUT.
Bridge the interface connected to the host and the tunnel interface on the
first DUT. On host, verify connectivity with the second DUT through tunnel.
- Tunnel types: GRETAP, and VxLAN
- Connectivity: IPv4
==== Topology
image::topology.svg[VXLAN bridged with physical interface topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUTs
. Configure DUTs with tunnel vxlan
. Test connectivity host:data to right:vxlan0 at 192.168.10.2
+1
View File
@@ -0,0 +1 @@
test.py
@@ -1,24 +0,0 @@
=== VXLAN bridged with physical interface
==== Description
Test that vxlan works as it should and that it possible to bridge it.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/tunnel_bridged/topology.svg[VXLAN bridged with physical interface topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::tunnel_bridged/topology.svg[VXLAN bridged with physical interface topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[VXLAN bridged with physical interface topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUTs
. Configure DUTs
. Test connectivity host:data to right:vxlan0 at 192.168.10.2
<<<
+2 -2
View File
@@ -1,6 +1,6 @@
---
- name: tunnel_basic
- name: Basic tunnel connectivity test
suite: tunnel_basic/test.yaml
- name: tunnel_bridged
- name: Tunnel interface bridged with physical
suite: tunnel_bridged/test.yaml
@@ -1 +1 @@
verify_all_interface_types.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Verify that all interface types can be created
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/verify_all_interface_types]
==== Description
This test verifies that all interface types can be created and also
checks the configuration when applied sequentially. This method takes
slightly longer than sending the entire configuration at once.
@@ -15,18 +19,11 @@ slightly longer than sending the entire configuration at once.
....
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/verify_all_interface_types/topology.svg[Verify that all interface types can be created topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::verify_all_interface_types/topology.svg[Verify that all interface types can be created topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Verify that all interface types can be created topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Verify that all interface types can be created topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Configure an empty bridge br-0
. Configure bridge br-X and associated interfaces
@@ -44,5 +41,3 @@ endif::topdoc[]
. Verify VxLAN interfaces 'vxlan-v4' and 'vxlan-v6'
<<<
@@ -1 +1 @@
veth_delete.adoc
test.adoc
@@ -1,5 +1,9 @@
=== Verify that VETH pairs can be deleted
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/veth_delete]
==== Description
```
veth0b veth0a data1 data2
`---------'
@@ -9,18 +13,11 @@ Each test step to create, add address, or delete an interace is distinct
from any other step. This to trigger a new configuration "generation".
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/veth_delete/topology.svg[Verify that VETH pairs can be deleted topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::veth_delete/topology.svg[Verify that VETH pairs can be deleted topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[Verify that VETH pairs can be deleted topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[Verify that VETH pairs can be deleted topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Create VETH pair
. Verify interfaces 'veth0a' and 'veth0b' exist
@@ -31,5 +28,3 @@ endif::topdoc[]
. Verify VETH pair have been removed
<<<
@@ -1 +1 @@
vlan_iface_termination.adoc
test.adoc
@@ -1,5 +1,9 @@
=== VLAN Interface Termination
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/vlan_iface_termination]
==== Description
Verify that VLANs stacked on top of an interfaces that are also
attached to a VLAN filtering bridge are always locally terminated.
@@ -26,18 +30,11 @@ both `data1` and `data2`, _bridging_ of packets from one to the other
must _not_ be allowed.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/vlan_iface_termination/topology.svg[VLAN Interface Termination topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::vlan_iface_termination/topology.svg[VLAN Interface Termination topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[VLAN Interface Termination topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[VLAN Interface Termination topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target
. Configure bridge and VLAN interfaces on target
. Configure IP addresses and VLAN interfaces on host
@@ -47,5 +44,3 @@ endif::topdoc[]
. Verify that host:data2 can reach target on VLAN 10
<<<
@@ -1 +1 @@
vlan_ping.adoc
test.adoc
@@ -1,20 +1,17 @@
=== VLAN ping connectivity
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/vlan_ping]
==== Description
Very basic test if the VLAN interface configuration works.
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/vlan_ping/topology.svg[VLAN ping connectivity topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::vlan_ping/topology.svg[VLAN ping connectivity topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[VLAN ping connectivity topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[VLAN ping connectivity topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Set up VLAN interface on host:data with IP 10.0.0.1
. Configure VLAN 10 interface on target:data with IP 10.0.0.2
@@ -24,5 +21,3 @@ endif::topdoc[]
. Verify that host:data can no longer reach 10.0.0.2
<<<
@@ -1 +1 @@
vlan_qos.adoc
test.adoc
@@ -1,5 +1,9 @@
=== VLAN Interface Ingress/Egress QoS
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/vlan_qos]
==== Description
Inject different packets from the host and verify that the VLAN priority
is handled correctly for traffic ingressing and egressing a VLAN interface.
@@ -15,18 +19,11 @@ correctly to PCP on egress ('from internal priority' or static '0..7').
{ "id": 6, "pcp": 6, "ingress": "from-pcp", "egress": "from-priority", "expect": 6 },
==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/ietf_interfaces/vlan_qos/topology.svg[VLAN Interface Ingress/Egress QoS topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::vlan_qos/topology.svg[VLAN Interface Ingress/Egress QoS topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[VLAN Interface Ingress/Egress QoS topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
image::topology.svg[VLAN Interface Ingress/Egress QoS topology, align=center, scaledwidth=75%]
==== Sequence
. Set up topology and attach to target DUT
. Apply initial config without priority mapping
. Setup host VLANs
@@ -38,5 +35,3 @@ endif::topdoc[]
. Verify that packet with id=6 egressed with pcp=6
<<<

Some files were not shown because too many files have changed in this diff Show More