Skip to content

Commit 11bb6d9

Browse files
gshemesh2Anirudh-nokia
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: ayya <anirudh.ayya@nokia.com>
1 parent b95c072 commit 11bb6d9

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
@@ -648,6 +648,13 @@ class IPinIPHashTest(HashTest):
648648
for IPinIP packet.
649649
'''
650650

651+
def send_and_verify_packets(self, src_port, pkt, masked_exp_pkt, dst_port_lists, is_timeout=False, logs=[]):
652+
"""
653+
@summary: Send an IPinIP encapsulated packet and verify it is received on expected ports.
654+
"""
655+
return super().send_and_verify_packets(src_port, pkt, masked_exp_pkt, dst_port_lists, is_timeout=False,
656+
logs=logs)
657+
651658
def create_packets_logs(
652659
self, src_port, sport, dport, version='IP', pkt=None, ipinip_pkt=None,
653660
vxlan_pkt=None, nvgre_pkt=None, inner_pkt=None, outer_sport=None,
@@ -665,9 +672,9 @@ def create_packets_logs(
665672
ipinip_pkt['IP'].dst,
666673
ipinip_pkt['IP'].proto,
667674
version,
668-
pkt[version].src,
669-
pkt[version].dst,
670-
pkt[version].proto if version == 'IP' else pkt['IPv6'].nh,
675+
inner_pkt[version].src,
676+
inner_pkt[version].dst,
677+
inner_pkt[version].proto if version == 'IP' else inner_pkt['IPv6'].nh,
671678
sport,
672679
dport,
673680
src_port))

0 commit comments

Comments
 (0)