File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
lisa/microsoft/testsuites/dpdk Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -766,8 +766,8 @@ def check_tx_packet_drops(self) -> None:
766766 raise AssertionError (
767767 "Test bug: tx packet data was 0, could not check dropped packets"
768768 )
769- self .dropped_packet_percentage = self .tx_packet_drops / self .tx_total_packets
770- assert_that (self .dropped_packet_percentage ).described_as (
769+ self .packet_drop_rate = self .tx_packet_drops / self .tx_total_packets
770+ assert_that (self .packet_drop_rate ).described_as (
771771 "More than 33% of the tx packets were dropped!"
772772 ).is_close_to (0 , 0.33 )
773773
@@ -776,8 +776,8 @@ def check_rx_packet_drops(self) -> None:
776776 raise AssertionError (
777777 "Test bug: rx packet data was 0 could not check dropped packets."
778778 )
779- self .dropped_packet_percentage = self .rx_packet_drops / self .rx_total_packets
780- assert_that (self .dropped_packet_percentage ).described_as (
779+ self .packet_drop_rate = self .rx_packet_drops / self .rx_total_packets
780+ assert_that (self .packet_drop_rate ).described_as (
781781 "More than 1% of the received packets were dropped!"
782782 ).is_close_to (0 , 0.01 )
783783
Original file line number Diff line number Diff line change @@ -688,10 +688,11 @@ def annotate_packet_drops(
688688 log : Logger , result : Optional [TestResult ], receiver : DpdkTestResources
689689) -> None :
690690 try :
691- if result and hasattr (receiver .testpmd , "dropped_packet_percentage" ):
692- dropped_packets = receiver .testpmd .dropped_packet_percentage
693- result .information ["rx_pkt_drop_percent" ] = int (100 * dropped_packets )
694- log .debug (f"Adding packet drop percentage: { dropped_packets } " )
691+ if result and hasattr (receiver .testpmd , "packet_drop_rate" ):
692+ dropped_packets = receiver .testpmd .packet_drop_rate
693+ result .information ["rx_pkt_drop_rate" ] = f"{ dropped_packets :.2f} "
694+ log .debug ("Adding packet drop percentage: "
695+ f"{ result .information ["rx_pkt_drop_rate" ]} " )
695696 except AssertionError as err :
696697 receiver .node .log .debug (f"Could not add rx packet drop percentage: { str (err )} " )
697698
You can’t perform that action at this time.
0 commit comments