Skip to content

Commit

Permalink
Initialize prev_payload to -1 since this packet doesnt exist
Browse files Browse the repository at this point in the history
We were initializing to 0 i.e. the first packet had been received
before we've even checked for it. This meant a scenario where the first
packet i.e. one with packet ID 0 was absent would be missed from the
both send and receive packet absent list.
  • Loading branch information
Ryangwaite committed Jun 24, 2024
1 parent a4cbabb commit 5056c12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/roles/test/files/ptftests/py3/advanced-reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ def examine_flow(self, filename=None):
self.fails['dut'].clear()
prev_payload = None
if packets:
prev_payload, prev_time = 0, 0
prev_payload, prev_time = -1, 0
sent_payload = 0
received_counter = 0 # Counts packets from dut.
received_but_not_sent_packets = set()
Expand Down

0 comments on commit 5056c12

Please sign in to comment.