aboutsummaryrefslogtreecommitdiffstats
path: root/resources/traffic_scripts
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2016-02-23 15:03:13 +0100
committerStefan Kobza <skobza@cisco.com>2016-03-07 18:40:42 +0100
commitda8aebf2e722f2c441a03b300de71f9143d010a3 (patch)
tree386aa3af6c6050df29b4b0e850b1098d60b4c7f1 /resources/traffic_scripts
parent8120dcdc84da7ff1dee097240bc1ecf18914397c (diff)
Modify sweep ping test cases
- Write separate sweep ping test cases for jumbo frames - Compute sweep ping end size from reported MTU on DUT interface - Set MTU on TG according to MTU on DUT interface - Log VPP packet traces on IPv4 and IPv6 tests failure - Remove VM_ENV tag from sweep ping test cases for jumbo frames Change-Id: I47aa7977bcff9c4366c67578aef542924a1d055b Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'resources/traffic_scripts')
-rwxr-xr-xresources/traffic_scripts/ipv4_sweep_ping.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/resources/traffic_scripts/ipv4_sweep_ping.py b/resources/traffic_scripts/ipv4_sweep_ping.py
index cd332d0391..7f6759724c 100755
--- a/resources/traffic_scripts/ipv4_sweep_ping.py
+++ b/resources/traffic_scripts/ipv4_sweep_ping.py
@@ -20,7 +20,7 @@ import logging
import os
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from resources.libraries.python.PacketVerifier import RxQueue, TxQueue,\
- auto_pad, create_gratuitous_arp_request, checksum_equal
+ create_gratuitous_arp_request, checksum_equal
from resources.libraries.python.TrafficScriptArg import TrafficScriptArg
from scapy.layers.inet import IP, ICMP
from scapy.all import Ether, Raw
@@ -55,10 +55,10 @@ def main():
# send ICMP echo request with incremented data length and receive ICMP
# echo reply
for echo_seq in range(start_size, end_size+1, step):
- pkt_send = auto_pad(Ether(src=src_mac, dst=dst_mac) /
- IP(src=src_ip, dst=dst_ip) /
- ICMP(id=echo_id, seq=echo_seq) /
- Raw(load=data[0:echo_seq]))
+ pkt_send = (Ether(src=src_mac, dst=dst_mac) /
+ IP(src=src_ip, dst=dst_ip) /
+ ICMP(id=echo_id, seq=echo_seq) /
+ Raw(load=data[0:echo_seq]))
sent_packets.append(pkt_send)
txq.send(pkt_send)
@@ -97,7 +97,7 @@ def main():
if 'Raw' in icmpv4:
load = icmpv4['Raw'].load
else:
- load = []
+ load = ""
if load != data[0:echo_seq]:
raise RuntimeError(
'Received ICMP payload does not match sent payload')