tests: python3 use byte strings in raw()
Raw('\xaf) and Raw(b'\xaf) are two quite different things in python 2 versus 3.
In most cases this didn't make a difference, apart from those cases where length
of payload actually mattered.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I3cba5c1486e436a3ca8aa10a7b393da75aa9f6b9
diff --git a/test/test_bfd.py b/test/test_bfd.py
index 7d52976..c8bda73 100644
--- a/test/test_bfd.py
+++ b/test/test_bfd.py
@@ -1755,11 +1755,11 @@
p = [(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IPv6(src="3001::1", dst="2001::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IPv6(src="3001::1", dst="2002::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
# A recursive and a non-recursive route via a next-hop that
# will have a BFD session
@@ -1884,7 +1884,7 @@
p = [(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IP(src=self.pg0.remote_ip4, dst=gre_if.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
# session is up - traffic passes
bfd_session_up(self)
diff --git a/test/test_dvr.py b/test/test_dvr.py
index d9bb7ac..d5ffd3b 100644
--- a/test/test_dvr.py
+++ b/test/test_dvr.py
@@ -75,13 +75,13 @@
IP(src=any_src_addr,
dst=ip_non_tag_bridged) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkt_tag = (Ether(src=self.pg0.remote_mac,
dst=self.loop0.local_mac) /
IP(src=any_src_addr,
dst=ip_tag_bridged) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# Two sub-interfaces so we can test VLAN tag push/pop
@@ -158,7 +158,7 @@
IP(src=any_src_addr,
dst=ip_tag_bridged) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2,
pkt_tag_to_tag * NUM_PKTS,
@@ -175,7 +175,7 @@
IP(src=any_src_addr,
dst=ip_non_tag_bridged) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2,
pkt_tag_to_non_tag * NUM_PKTS,
@@ -270,33 +270,33 @@
IP(src="2.2.2.2",
dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkt_to_tag = (Ether(src=self.pg0.remote_mac,
dst=self.pg2.remote_mac) /
IP(src="2.2.2.2",
dst="1.1.1.2") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkt_from_tag = (Ether(src=self.pg3.remote_mac,
dst=self.pg2.remote_mac) /
Dot1Q(vlan=93) /
IP(src="2.2.2.2",
dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkt_from_to_tag = (Ether(src=self.pg3.remote_mac,
dst=self.pg2.remote_mac) /
Dot1Q(vlan=93) /
IP(src="2.2.2.2",
dst="1.1.1.2") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkt_bcast = (Ether(src=self.pg0.remote_mac,
dst="ff:ff:ff:ff:ff:ff") /
IP(src="2.2.2.2",
dst="255.255.255.255") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# A couple of sub-interfaces for tags
diff --git a/test/test_ip6.py b/test/test_ip6.py
index f5ed09f..4cd0828 100644
--- a/test/test_ip6.py
+++ b/test/test_ip6.py
@@ -1469,7 +1469,7 @@
IPv6(dst=self.pg0._remote_hosts[2].ip6,
src=self.pg0.remote_ip6) /
inet6.UDP(sport=10000, dport=20000) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.pg0.add_stream(t)
self.pg_enable_capture(self.pg_interfaces)
@@ -1531,7 +1531,7 @@
IPv6(dst=self.pg0._remote_hosts[2].ip6,
src=self.pg0._remote_hosts[3].ip6) /
inet6.UDP(sport=10000, dport=20000) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.pg2.add_stream(t2)
self.pg_enable_capture(self.pg_interfaces)
@@ -1619,7 +1619,7 @@
dst=self.pg0.local_mac) /
IPv6(src=self.pg0.remote_ip6, dst="2001::1") /
inet6.UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# A route via IP NULL that will reply with ICMP unreachables
@@ -1718,12 +1718,12 @@
dst=self.pg1.local_mac) /
IPv6(src="2001::1", dst=self.pg0.remote_ip6) /
inet6.UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pm = (Ether(src=self.pg1.remote_mac,
dst=self.pg1.local_mac) /
IPv6(src="2001::1", dst="ffef::1") /
inet6.UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# PG1 does not forward IP traffic
@@ -1834,7 +1834,7 @@
port_ip_hdr = (
IPv6(dst="3000::1", src="3000:1::1") /
inet6.UDP(sport=1234, dport=1234 + ii) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
port_ip_pkts.append((Ether(src=self.pg0.remote_mac,
dst=self.pg0.local_mac) /
port_ip_hdr))
@@ -1856,7 +1856,7 @@
src_ip_hdr = (
IPv6(dst="3000::1", src="3000:1::%d" % ii) /
inet6.UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
src_ip_pkts.append((Ether(src=self.pg0.remote_mac,
dst=self.pg0.local_mac) /
src_ip_hdr))
@@ -1954,13 +1954,13 @@
src="4000:1::1") /
inet6.UDP(sport=1234,
dport=1234 + ii) /
- Raw('\xa5' * 100)))
+ Raw(b'\xa5' * 100)))
src_pkts.append((Ether(src=self.pg0.remote_mac,
dst=self.pg0.local_mac) /
IPv6(dst="4000::1",
src="4000:1::%d" % ii) /
inet6.UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)))
+ Raw(b'\xa5' * 100)))
route_3000_2 = VppIpRoute(self, "3000::2", 128,
[VppRoutePath(self.pg3.remote_ip6,
@@ -2000,7 +2000,7 @@
src="6000:1::1") /
inet6.UDP(sport=1234,
dport=1234 + ii) /
- Raw('\xa5' * 100)))
+ Raw(b'\xa5' * 100)))
route_5000_2 = VppIpRoute(self, "5000::2", 128,
[VppRoutePath(self.pg3.remote_ip6,
@@ -2054,7 +2054,7 @@
IPv6(src=self.pg0.remote_ip6,
dst=self.pg0.local_ip6) /
inet6.TCP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkts = p * 1025
@@ -2221,12 +2221,12 @@
dst=self.pg0.local_mac) /
IPv6(src="5::5", dst="1::1") /
inet6.TCP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
p_src = (Ether(src=self.pg0.remote_mac,
dst=self.pg0.local_mac) /
IPv6(src="2::2", dst="1::2") /
inet6.TCP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkts_dst = p_dst * 257
pkts_src = p_src * 257
@@ -2268,7 +2268,7 @@
dst=self.pg0.local_mac) /
IPv6(src="3::4", dst="3::3") /
inet6.TCP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(self.pg0, p_l * 257,
"IP lookup loop")
@@ -2312,7 +2312,7 @@
dst=self.pg1.remote_ip6,
hlim=1) /
inet6.UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg0, p_version * NUM_PKTS, self.pg0)
rx = rx[0]
@@ -2351,7 +2351,7 @@
dst=dst or self.pg1.remote_ip6,
version=3) /
l4 /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(self.pg0, p_version * NUM_PKTS,
remark=msg or "",
@@ -2365,7 +2365,7 @@
IPv6(src=self.pg0.remote_ip6, dst=self.pg0.local_ip6) /
IPv6ExtHdrHopByHop() /
inet6.UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.pg0.add_stream(p)
self.pg_enable_capture(self.pg_interfaces)
diff --git a/test/test_ip_mcast.py b/test/test_ip_mcast.py
index f7a5082..d7a8238 100644
--- a/test/test_ip_mcast.py
+++ b/test/test_ip_mcast.py
@@ -100,7 +100,7 @@
UDP(sport=1234, dport=1234))
if not payload_size:
payload_size = 64 - len(p)
- p = p / Raw('\xa5' * payload_size)
+ p = p / Raw(b'\xa5' * payload_size)
for i in range(0, N_PKTS_IN_STREAM):
pkts.append(p)
@@ -847,7 +847,7 @@
GRE() /
IP(src="1.1.1.1", dst="232.2.2.2") /
UDP(sport=1234, dport=1234) /
- Raw('\a5' * 64)) * 63
+ Raw(b'\a5' * 64)) * 63
self.vapi.cli("clear trace")
self.pg1.add_stream(tx)
diff --git a/test/test_ipsec_tun_if_esp.py b/test/test_ipsec_tun_if_esp.py
index 971ec79..b61e0ef 100644
--- a/test/test_ipsec_tun_if_esp.py
+++ b/test/test_ipsec_tun_if_esp.py
@@ -534,7 +534,7 @@
Ether(dst=self.omac) /
IP(src="1.1.1.1", dst="1.1.1.2") /
UDP(sport=1144, dport=2233) /
- Raw('X' * payload_size))
+ Raw(b'X' * payload_size))
for i in range(count)]
def gen_pkts(self, sw_intf, src, dst, count=1,
@@ -542,7 +542,7 @@
return [Ether(dst=self.omac) /
IP(src="1.1.1.1", dst="1.1.1.2") /
UDP(sport=1144, dport=2233) /
- Raw('X' * payload_size)
+ Raw(b'X' * payload_size)
for i in range(count)]
def verify_decrypted(self, p, rxs):
@@ -640,7 +640,7 @@
IP(src=self.pg1.local_ip4,
dst=self.pg1.remote_ip4) /
UDP(sport=1144, dport=2233) /
- Raw('X' * payload_size))
+ Raw(b'X' * payload_size))
for i in range(count)]
def gen_pkts(self, sw_intf, src, dst, count=1,
@@ -648,7 +648,7 @@
return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
IP(src="1.1.1.1", dst="1.1.1.2") /
UDP(sport=1144, dport=2233) /
- Raw('X' * payload_size)
+ Raw(b'X' * payload_size)
for i in range(count)]
def verify_decrypted(self, p, rxs):
@@ -935,7 +935,7 @@
dst=sw_intf.local_ip4) /
IP(src=src, dst=dst) /
UDP(sport=1144, dport=2233) /
- Raw('X' * payload_size))
+ Raw(b'X' * payload_size))
for i in range(count)]
def gen_pkts(self, sw_intf, src, dst, count=1,
@@ -943,7 +943,7 @@
return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
IP(src=src, dst=dst) /
UDP(sport=1144, dport=2233) /
- Raw('X' * payload_size)
+ Raw(b'X' * payload_size)
for i in range(count)]
def verify_decrypted(self, p, rxs):
@@ -1230,7 +1230,7 @@
dst=sw_intf.local_ip6) /
IPv6(src=src, dst=dst) /
UDP(sport=1166, dport=2233) /
- Raw('X' * payload_size))
+ Raw(b'X' * payload_size))
for i in range(count)]
def gen_pkts6(self, sw_intf, src, dst, count=1,
@@ -1238,7 +1238,7 @@
return [Ether(src=sw_intf.remote_mac, dst=sw_intf.local_mac) /
IPv6(src=src, dst=dst) /
UDP(sport=1166, dport=2233) /
- Raw('X' * payload_size)
+ Raw(b'X' * payload_size)
for i in range(count)]
def verify_decrypted6(self, p, rxs):
diff --git a/test/test_l2_flood.py b/test/test_l2_flood.py
index f4d1c07..7f3c57a 100644
--- a/test/test_l2_flood.py
+++ b/test/test_l2_flood.py
@@ -80,7 +80,7 @@
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# input on pg0 expect copies on pg1->11
@@ -180,7 +180,7 @@
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# input on pg0 expect copies on pg1
@@ -217,12 +217,12 @@
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
p_bm = (Ether(dst="ff:ff:ff:ff:ff:ff",
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# input on pg0, expected copies on pg1->4
diff --git a/test/test_mpls.py b/test/test_mpls.py
index f7f634d..ebeea5f 100644
--- a/test/test_mpls.py
+++ b/test/test_mpls.py
@@ -1547,7 +1547,7 @@
MPLS(label=32, ttl=64) /
IPv6(src="2001::1", dst=self.pg0.remote_ip6) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# A simple MPLS xconnect - eos label in label out
@@ -1703,7 +1703,7 @@
src=self.pg2.remote_mac) /
IP(src=self.pg2.remote_ip4, dst=dst) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# Send the packet stream (one pkt to each VPN route)
@@ -1825,7 +1825,7 @@
MPLS(label=local_label, ttl=64) /
IP(src=self.pg0.remote_ip4, dst=dst) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# Send the packet stream (one pkt to each VPN route)
@@ -1947,7 +1947,7 @@
MPLS(label=local_label, ttl=64) /
IPv6(src=self.pg0.remote_ip6, dst=dst) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.logger.info(self.vapi.cli("sh ip6 fib %s" % dst))
self.pg0.add_stream(pkts)
@@ -2130,7 +2130,7 @@
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="11.11.11.11") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
tx0 = pcore * NUM_PKTS
rx0 = self.send_and_expect(self.pg0, tx0, self.pg1)
@@ -2215,12 +2215,12 @@
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="11.11.11.11") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
p_cust2 = (Ether(dst="00:00:de:ad:ba:b2",
src="00:00:de:ad:be:ef") /
IP(src="10.10.10.10", dst="11.11.11.12") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
p_core1 = (Ether(dst=self.pg0.local_mac,
src=self.pg0.remote_mac) /
MPLS(label=55, ttl=64) /
@@ -2228,16 +2228,16 @@
dst="00:00:de:ad:be:ef") /
IP(dst="10.10.10.10", src="11.11.11.11") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
p_core2 = (Ether(dst=self.pg0.local_mac,
src=self.pg0.remote_mac) /
MPLS(label=56, ttl=64) /
- Raw('\x01' * 4) / # PW CW
+ Raw(b'\x01' * 4) / # PW CW
Ether(src="00:00:de:ad:ba:b2",
dst="00:00:de:ad:be:ef") /
IP(dst="10.10.10.10", src="11.11.11.12") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# The BD is learning, so send in one of each packet to learn
diff --git a/test/test_neighbor.py b/test/test_neighbor.py
index 7068fd0..0b7ffff 100644
--- a/test/test_neighbor.py
+++ b/test/test_neighbor.py
@@ -946,7 +946,7 @@
dst=self.pg0.local_mac) /
IP(src=self.pg0.remote_ip4, dst="10.0.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.pg0.add_stream(p)
self.pg_enable_capture(self.pg_interfaces)
diff --git a/test/test_p2p_ethernet.py b/test/test_p2p_ethernet.py
index 7a8c560..7cc6cdc 100644
--- a/test/test_p2p_ethernet.py
+++ b/test/test_p2p_ethernet.py
@@ -172,7 +172,7 @@
pkt_size = random.choice(self.pg_if_packet_sizes)
p = Ether(src=src_mac, dst=dst_mac)
p /= IPv6(src=src_ip, dst=dst_ip)
- p /= (UDP(sport=1234, dport=4321) / Raw('\xa5' * 20))
+ p /= (UDP(sport=1234, dport=4321) / Raw(b'\xa5' * 20))
self.extend_packet(p, pkt_size)
return p
@@ -199,7 +199,7 @@
src=self.pg1.remote_mac) /
IPv6(src="3001::1", dst="8000::100") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
self.send_packets(self.pg1, self.pg0)
self.logger.info("FFP_TEST_FINISH_0001")
@@ -375,7 +375,7 @@
pkt_size = random.choice(self.pg_if_packet_sizes)
p = Ether(src=src_mac, dst=dst_mac)
p /= IP(src=src_ip, dst=dst_ip)
- p /= (UDP(sport=1234, dport=4321) / Raw('\xa5' * 20))
+ p /= (UDP(sport=1234, dport=4321) / Raw(b'\xa5' * 20))
self.extend_packet(p, pkt_size)
return p
diff --git a/test/test_pipe.py b/test/test_pipe.py
index 89ef1f3..6e3edca 100644
--- a/test/test_pipe.py
+++ b/test/test_pipe.py
@@ -114,7 +114,7 @@
IP(src="1.1.1.1",
dst="1.1.1.2") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg1)
self.send_and_expect(self.pg1, p * NUM_PKTS, self.pg0)
@@ -200,7 +200,7 @@
IP(src="1.1.1.2",
dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
# bind the pipe ends to the correct tables
self.vapi.sw_interface_set_table(pipes[1].west, 0, 2)
@@ -221,7 +221,7 @@
IP(src="1.1.1.1",
dst="1.1.1.2") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg3, p_west * NUM_PKTS, self.pg2)
#
diff --git a/test/test_udp.py b/test/test_udp.py
index 40c8147..b22ed44 100644
--- a/test/test_udp.py
+++ b/test/test_udp.py
@@ -169,7 +169,7 @@
dst=self.pg0.local_mac) /
IP(src="2.2.2.2", dst="1.1.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg0, p_4o4*NUM_PKTS, self.pg0)
for p in rx:
self.validate_outer4(p, udp_encap_0)
@@ -184,7 +184,7 @@
dst=self.pg0.local_mac) /
IP(src="2.2.2.2", dst="1.1.2.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg0, p_4o6*NUM_PKTS, self.pg2)
for p in rx:
self.validate_outer6(p, udp_encap_2)
@@ -199,7 +199,7 @@
dst=self.pg0.local_mac) /
IPv6(src="2001::100", dst="2001::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg0, p_6o4*NUM_PKTS, self.pg1)
for p in rx:
self.validate_outer4(p, udp_encap_1)
@@ -214,7 +214,7 @@
dst=self.pg0.local_mac) /
IPv6(src="2001::100", dst="2001::3") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg0, p_6o6*NUM_PKTS, self.pg3)
for p in rx:
self.validate_outer6(p, udp_encap_3)
@@ -239,7 +239,7 @@
dst=self.pg0.local_mac) /
IP(src="2.2.2.2", dst="1.1.2.22") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg0, p_4omo4*NUM_PKTS, self.pg1)
for p in rx:
self.validate_outer4(p, udp_encap_1)
diff --git a/test/test_vxlan.py b/test/test_vxlan.py
index b292aac..692930e 100644
--- a/test/test_vxlan.py
+++ b/test/test_vxlan.py
@@ -236,7 +236,7 @@
frame = (Ether(src='00:00:00:00:00:02', dst='00:00:00:00:00:01') /
IP(src='4.3.2.1', dst='1.2.3.4') /
UDP(sport=20000, dport=10000) /
- Raw('\xa5' * 1450))
+ Raw(b'\xa5' * 1450))
self.pg1.add_stream([frame])
diff --git a/test/test_vxlan_gbp.py b/test/test_vxlan_gbp.py
index 2476933..64e51b0 100644
--- a/test/test_vxlan_gbp.py
+++ b/test/test_vxlan_gbp.py
@@ -24,7 +24,7 @@
return (Ether(src='00:00:00:00:00:01', dst='00:00:00:00:00:02') /
IP(src='1.2.3.4', dst='4.3.2.1') /
UDP(sport=10000, dport=20000) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
@property
def frame_reply(self):
@@ -32,7 +32,7 @@
return (Ether(src='00:00:00:00:00:02', dst='00:00:00:00:00:01') /
IP(src='4.3.2.1', dst='1.2.3.4') /
UDP(sport=20000, dport=10000) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
def encapsulate(self, pkt, vni):
"""
@@ -258,7 +258,7 @@
frame = (Ether(src='00:00:00:00:00:02', dst='00:00:00:00:00:01') /
IP(src='4.3.2.1', dst='1.2.3.4') /
UDP(sport=20000, dport=10000) /
- Raw('\xa5' * 1450))
+ Raw(b'\xa5' * 1450))
self.pg1.add_stream([frame])