On Mon, Mar 9, 2026 at 4:29 PM Andrew Bailey <[email protected]> wrote:
>
> +
> +@requires_link_topology(LinkTopology.ONE_LINK)
> +class TestSpeedCapabilities(TestSuite):
> +    """Speed capabilities test suite."""
> +
> +    config: Config
> +
> +    def set_up_suite(self):
> +        """Set up the test suite."""
> +        self.test_parameters = self.config.test_parameters
> +
> +    @func_test
> +    def validate_port_speed(self) -> None:
> +        """Validate expected port speed is also the observed port speed.
> +
> +        Steps:
> +            * Show port info for each available port
> +
> +        Verify:
> +            * The resulting link speeds are equal to the configured link 
> speeds
> +        """
> +        with TestPmd() as testpmd:
> +            for k, v in self.test_parameters:

Looks good except you do actually need self.test_parameters.items()
(contrary to what I said yesterday)...

> +                link_speed = testpmd.show_port_info(k).link_speed
> +                verify(
> +                    link_speed == v,
> +                    f"port {k} speed {link_speed} does not match configured 
> '{v}'",
> +                )
> --
> 2.50.1
>

Reply via email to