Fix a bug in the port stats check test suite that was causing
the DTS doc generation to fail.
Fixes: 8f21210b1d50 ("dts: add port stats check test suite")
Signed-off-by: Dean Marx <[email protected]>
---
dts/tests/TestSuite_port_stats_checks.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/dts/tests/TestSuite_port_stats_checks.py
b/dts/tests/TestSuite_port_stats_checks.py
index 2a3fb06946..491c2263b6 100644
--- a/dts/tests/TestSuite_port_stats_checks.py
+++ b/dts/tests/TestSuite_port_stats_checks.py
@@ -51,10 +51,15 @@ class TestPortStatsChecks(TestSuite):
#: Length of the packet being sent including the IP and frame headers.
total_packet_len: ClassVar[int] = 100
- #: Packet to send during testing.
- send_pkt: ClassVar[Packet] = (
- Ether() / IP() / Raw(b"X" * (total_packet_len - ip_header_len -
ether_header_len))
- )
+
+ @property
+ def send_pkt(self) -> Packet:
+ """Packet to send during testing."""
+ return (
+ Ether()
+ / IP()
+ / Raw(b"X" * (self.total_packet_len - self.ip_header_len -
self.ether_header_len))
+ )
def extract_noise_information(
self, verbose_out: list[TestPmdVerbosePacket]
--
2.49.0