From 58a16a253e9560d7c8ebf80ac393a7b03e1da9ac Mon Sep 17 00:00:00 2001 From: Srivats P Date: Thu, 8 Dec 2016 20:54:38 +0530 Subject: [PATCH] sign: Filter out ICMP packets with sign in test script A limitation of the current design where the sign protocol appears at the end of frame is that such a data packet could potentially trigger a ICMP error containing this packet as payload and for small size packets this ICMP packet itself will appear as a 'sign' packet - so filter out ICMP from the captured packets when verifying against stream stats --- test/streamstatstest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/streamstatstest.py b/test/streamstatstest.py index bbb765b..1fc9ef6 100644 --- a/test/streamstatstest.py +++ b/test/streamstatstest.py @@ -490,7 +490,8 @@ def test_unidir(drone, ports, dut, dut_ports, dut_ip, emul_ports, dgid_list, guid = sign_stream_cfg['guid'][i] if guid < 0: continue - filter='frame[-9:9]==00.00.00.'+format(guid, 'x')+'.61.a1.b2.c3.d4' + filter='frame[-9:9]==00.00.00.'+format(guid, 'x')+'.61.a1.b2.c3.d4'\ + + ' && !icmp && !icmpv6' print(filter) cap_pkts = subprocess.check_output([tshark, '-n', '-r', 'capX.pcap', '-Y', filter]) @@ -530,7 +531,8 @@ def test_unidir(drone, ports, dut, dut_ports, dut_ip, emul_ports, dgid_list, guid = sign_stream_cfg['guid'][i] if guid < 0: continue - filter='frame[-9:9]==00.00.00.'+format(guid, 'x')+'.61.a1.b2.c3.d4' + filter='frame[-9:9]==00.00.00.'+format(guid, 'x')+'.61.a1.b2.c3.d4'\ + + ' && !icmp && !icmpv6' print(filter) cap_pkts = subprocess.check_output([tshark, '-n', '-r', 'capY.pcap', '-Y', filter])