From be547ba9a89c8a2c7bce612d8dbaa5b8ed18f849 Mon Sep 17 00:00:00 2001 From: Ahmed Karic Date: Thu, 3 Jul 2025 13:59:55 +0200 Subject: [PATCH 1/2] test: Generate forgotten test-spec - container_host_commands test is missing .adoc and .svg files --- .../container_host_commands/Readme.adoc | 1 + .../container_host_commands.adoc | 29 ++++++++++++++++ .../container_host_commands/topology.svg | 33 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 120000 test/case/infix_containers/container_host_commands/Readme.adoc create mode 100644 test/case/infix_containers/container_host_commands/container_host_commands.adoc create mode 100644 test/case/infix_containers/container_host_commands/topology.svg diff --git a/test/case/infix_containers/container_host_commands/Readme.adoc b/test/case/infix_containers/container_host_commands/Readme.adoc new file mode 120000 index 000000000..8195248ca --- /dev/null +++ b/test/case/infix_containers/container_host_commands/Readme.adoc @@ -0,0 +1 @@ +container_host_commands.adoc \ No newline at end of file diff --git a/test/case/infix_containers/container_host_commands/container_host_commands.adoc b/test/case/infix_containers/container_host_commands/container_host_commands.adoc new file mode 100644 index 000000000..032fd2144 --- /dev/null +++ b/test/case/infix_containers/container_host_commands/container_host_commands.adoc @@ -0,0 +1,29 @@ +=== Host Command Execution from Container +==== Description +This test verifies that a container running on Infix can execute commands +that affect the host system. Specifically, it confirms that the container +can change the hostname of the host. + +==== Topology +ifdef::topdoc[] +image::{topdoc}../../test/case/infix_containers/container_host_commands/topology.svg[Host Command Execution from Container topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::container_host_commands/topology.svg[Host Command Execution from Container topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Host Command Execution from Container topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set initial hostname +. Verify initial hostname in operational +. Include script in OCI image to modify host hostname +. Verify container has started +. Verify the new hostname set by the container + + +<<< + diff --git a/test/case/infix_containers/container_host_commands/topology.svg b/test/case/infix_containers/container_host_commands/topology.svg new file mode 100644 index 000000000..6fc6f47a8 --- /dev/null +++ b/test/case/infix_containers/container_host_commands/topology.svg @@ -0,0 +1,33 @@ + + + + + + +1x1 + + + +host + +host + +mgmt + + + +target + +mgmt + +target + + + +host:mgmt--target:mgmt + + + + From 562fd253c474f3097bd49b8ea6b9e16996ffbf1e Mon Sep 17 00:00:00 2001 From: Ahmed Karic Date: Thu, 3 Jul 2025 14:01:27 +0200 Subject: [PATCH 2/2] test: Update description in speed/duplex test --- .../speed_duplex_copper.adoc | 26 +++++++++++-------- .../speed_duplex_copper/test.py | 26 +++++++++++-------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/test/case/ietf_interfaces/speed_duplex_copper/speed_duplex_copper.adoc b/test/case/ietf_interfaces/speed_duplex_copper/speed_duplex_copper.adoc index 0be4f0cf8..4e8d6c205 100644 --- a/test/case/ietf_interfaces/speed_duplex_copper/speed_duplex_copper.adoc +++ b/test/case/ietf_interfaces/speed_duplex_copper/speed_duplex_copper.adoc @@ -1,6 +1,10 @@ === Interface Speed Duplex (Copper) ==== Description -Verify that auto-negotiation results in expected speed/duplex mode. +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 +2. Auto-negotiation – host advertises selectable modes and the target negotiates + to the highest common speed/duplex. ==== Topology ifdef::topdoc[] @@ -17,17 +21,17 @@ endif::topdoc[] ==== Test sequence . Set up topology and attach to target DUT . Enable target interface -. Set fixed 10/full -. Set fixed 10/half -. Set fixed 100/full -. Set fixed 100/half +. Verify fixed 10/full +. Verify fixed 10/half +. Verify fixed 100/full +. Verify fixed 100/half . Switch to auto-negotiation mode for target and host -. Configure host to advertise 10/Full only -. Configure host to advertise 10/Half only -. Configure host to advertise 100/Full only -. Configure host to advertise 100/Half only -. Configure host to advertise 10/half + 10/full + 100/half -. Configure host to advertise 10/half + 10/full + 100/half + 100/full + 1000/full +. Verify auto-negotiation to 10/Full only +. Verify auto-negotiation to 10/Half only +. Verify auto-negotiation to 100/Full only +. Verify auto-negotiation to 100/Half only +. Verify auto-negotiation to 10/half + 10/full + 100/half +. Verify auto-negotiation to 10/half + 10/full + 100/half + 100/full + 1000/full <<< diff --git a/test/case/ietf_interfaces/speed_duplex_copper/test.py b/test/case/ietf_interfaces/speed_duplex_copper/test.py index 121a2b63e..f6c438aae 100755 --- a/test/case/ietf_interfaces/speed_duplex_copper/test.py +++ b/test/case/ietf_interfaces/speed_duplex_copper/test.py @@ -2,7 +2,11 @@ """ Interface Speed Duplex (Copper) -Verify that auto-negotiation results in expected speed/duplex mode. +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 +2. Auto-negotiation – host advertises selectable modes and the target negotiates + to the highest common speed/duplex. """ import infamy @@ -164,22 +168,22 @@ def cleanup(target, hdata, tdata): ns.addip("10.0.0.1") # Fixed mode tests - with test.step("Set fixed 10/full"): + with test.step("Verify fixed 10/full"): set_host_speed_duplex(hdata, 10, "full") set_target_speed_duplex(target, tdata, 10, "full") verify_speed_duplex(target, ns, tdata, 10, "full") - with test.step("Set fixed 10/half"): + with test.step("Verify fixed 10/half"): set_host_speed_duplex(hdata, 10, "half") set_target_speed_duplex(target, tdata, 10, "half") verify_speed_duplex(target, ns, tdata, 10, "half") - with test.step("Set fixed 100/full"): + with test.step("Verify fixed 100/full"): set_host_speed_duplex(hdata, 100, "full") set_target_speed_duplex(target, tdata, 100, "full") verify_speed_duplex(target, ns, tdata, 100, "full") - with test.step("Set fixed 100/half"): + with test.step("Verify fixed 100/half"): set_host_speed_duplex(hdata, 100, "half") set_target_speed_duplex(target, tdata, 100, "half") verify_speed_duplex(target, ns, tdata, 100, "half") @@ -189,27 +193,27 @@ def cleanup(target, hdata, tdata): enable_host_autoneg(hdata) enable_target_autoneg(target, tdata) - with test.step("Configure host to advertise 10/Full only"): + with test.step("Verify auto-negotiation to 10/Full only"): advertise_host_modes(hdata, ["10full"]) verify_speed_duplex(target, ns, tdata, 10, "full") - with test.step("Configure host to advertise 10/Half only"): + with test.step("Verify auto-negotiation to 10/Half only"): advertise_host_modes(hdata, ["10half"]) verify_speed_duplex(target, ns, tdata, 10, "half") - with test.step("Configure host to advertise 100/Full only"): + with test.step("Verify auto-negotiation to 100/Full only"): advertise_host_modes(hdata, ["100full"]) verify_speed_duplex(target, ns, tdata, 100, "full") - with test.step("Configure host to advertise 100/Half only"): + with test.step("Verify auto-negotiation to 100/Half only"): advertise_host_modes(hdata, ["100half"]) verify_speed_duplex(target, ns, tdata, 100, "half") - with test.step("Configure host to advertise 10/half + 10/full + 100/half"): + with test.step("Verify auto-negotiation to 10/half + 10/full + 100/half"): advertise_host_modes(hdata, ["10half", "10full", "100half"]) verify_speed_duplex(target, ns, tdata, 100, "half") - with test.step("Configure host to advertise 10/half + 10/full + 100/half + 100/full + 1000/full"): + with test.step("Verify auto-negotiation to 10/half + 10/full + 100/half + 100/full + 1000/full"): advertise_host_modes(hdata, ["10half", "10full", "100half", "100full", "1000full"]) verify_speed_duplex(target, ns, tdata, 1000, "full")