Skip to content

Commit de94ec6

Browse files
gshemesh2thisptr-sh
authored andcommitted
What is the motivation for this PR? Fixing Bug sonic-net#20840 (comment) and sonic-net#21071 by override send_and_verify_packets on class IPinIPHashTest to make sure that the verification of the packet arrival will succeed How did you do it? fixed HashTest.check_within_expected_range usage Fixed IPinIP Hash Test by override send_and_verify_packets on class IPinIPHashTest and use no timeout for the packets arrival verification. How did you verify/test it? Ran fib_test::test_hash locally. Conducted a full overnight regression test. Any platform specific information? No Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
1 parent ec65e6e commit de94ec6

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

ansible/roles/test/files/ptftests/py3/hash_test.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,13 @@ class IPinIPHashTest(HashTest):
651651
for IPinIP packet.
652652
'''
653653

654+
def send_and_verify_packets(self, src_port, pkt, masked_exp_pkt, dst_port_lists, is_timeout=False, logs=[]):
655+
"""
656+
@summary: Send an IPinIP encapsulated packet and verify it is received on expected ports.
657+
"""
658+
return super().send_and_verify_packets(src_port, pkt, masked_exp_pkt, dst_port_lists, is_timeout=False,
659+
logs=logs)
660+
654661
def create_packets_logs(
655662
self, src_port, sport, dport, version='IP', pkt=None, ipinip_pkt=None,
656663
vxlan_pkt=None, nvgre_pkt=None, inner_pkt=None, outer_sport=None,
@@ -673,9 +680,9 @@ def create_packets_logs(
673680
next_header_key,
674681
outer_proto,
675682
version,
676-
pkt[version].src,
677-
pkt[version].dst,
678-
pkt[version].proto if version == 'IP' else pkt['IPv6'].nh,
683+
inner_pkt[version].src,
684+
inner_pkt[version].dst,
685+
inner_pkt[version].proto if version == 'IP' else inner_pkt['IPv6'].nh,
679686
sport,
680687
dport,
681688
src_port))

0 commit comments

Comments
 (0)