[PATCH 1/3] dts: add boolean to adjust addresses
Jeremy Spewock
jspewock at iol.unh.edu
Wed Jun 26 17:49:25 CEST 2024
This is funny because I actually ended up trying to solve the same
problem when writing the dynamic queue test suite. We ended up taking
different approaches, so we should probably have a discussion about
the best way to handle this. Now that we have a few use cases for why
this fix is needed, it will probably make the discussion easier since
there is less speculation.
On Fri, Jun 21, 2024 at 1:22 PM Nicholas Pratte <npratte at iol.unh.edu> wrote:
>
> Various test cases in the mac filter test suite called for granular
> manipulation of destination mac addresses to properly test mac address
> filtering functionality. To compensate, there is now an
> adjust_addresses boolean which the user can toggle if they wish to send
> their own addressing; the boolean is true by default.
>
> Bugzilla ID: 1454
> Signed-off-by: Nicholas Pratte <npratte at iol.unh.edu>
> ---
> dts/framework/test_suite.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py
> index 694b2eba65..5044d5f9bb 100644
> --- a/dts/framework/test_suite.py
> +++ b/dts/framework/test_suite.py
> @@ -185,6 +185,7 @@ def send_packet_and_capture(
> packet: Packet,
> filter_config: PacketFilteringConfig = PacketFilteringConfig(),
> duration: float = 1,
> + adjust_addresses: bool = True,
This should probably get added to the Args section of this doc-string
since it's a public method.
> ) -> list[Packet]:
> """Send and receive `packet` using the associated TG.
>
> @@ -199,7 +200,8 @@ def send_packet_and_capture(
> Returns:
> A list of received packets.
> """
> - packet = self._adjust_addresses(packet)
> + if adjust_addresses:
> + packet = self._adjust_addresses(packet)
> return self.tg_node.send_packet_and_capture(
> packet,
> self._tg_port_egress,
> --
> 2.44.0
>
More information about the dev
mailing list