summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-11-07 13:52:21 +0100
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2019-11-08 13:25:56 +0000
commit770a0deaadfb2d26cbc5da05f84578a7bd92e9d2 (patch)
treedf34de2e51331ab7ae868ecc7f253469f8448981
parent76a36e83e39cbf7828a647d8afadfaef642e1c84 (diff)
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
-rw-r--r--src/plugins/abf/test/test_abf.py6
-rw-r--r--src/plugins/flowprobe/test/test_flowprobe.py2
-rw-r--r--src/plugins/gbp/test/test_gbp.py224
-rw-r--r--src/plugins/igmp/test/test_igmp.py2
-rw-r--r--src/plugins/l3xc/test/test_l3xc.py4
-rw-r--r--src/plugins/svs/test/test_svs.py32
-rw-r--r--test/test_bfd.py6
-rw-r--r--test/test_dvr.py18
-rw-r--r--test/test_ip6.py34
-rw-r--r--test/test_ip_mcast.py4
-rw-r--r--test/test_ipsec_tun_if_esp.py16
-rw-r--r--test/test_l2_flood.py8
-rw-r--r--test/test_mpls.py20
-rw-r--r--test/test_neighbor.py2
-rw-r--r--test/test_p2p_ethernet.py6
-rw-r--r--test/test_pipe.py6
-rw-r--r--test/test_udp.py10
-rw-r--r--test/test_vxlan.py2
-rw-r--r--test/test_vxlan_gbp.py6
19 files changed, 204 insertions, 204 deletions
diff --git a/src/plugins/abf/test/test_abf.py b/src/plugins/abf/test/test_abf.py
index d3500fad2bc..7cffdac74b2 100644
--- a/src/plugins/abf/test/test_abf.py
+++ b/src/plugins/abf/test/test_abf.py
@@ -197,7 +197,7 @@ class TestAbf(VppTestCase):
dst=self.pg0.local_mac) /
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_1*NUM_PKTS, self.pg1)
#
@@ -240,7 +240,7 @@ class TestAbf(VppTestCase):
dst=self.pg1.local_mac) /
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.pg1, p_2 * NUM_PKTS, self.pg3)
#
@@ -318,7 +318,7 @@ class TestAbf(VppTestCase):
dst=self.pg0.local_mac) /
IPv6(src="2001::2", dst="2001::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
#
# packets are dropped because there is no route to the policy's
diff --git a/src/plugins/flowprobe/test/test_flowprobe.py b/src/plugins/flowprobe/test/test_flowprobe.py
index 445ec6d9cae..70b3acbd723 100644
--- a/src/plugins/flowprobe/test/test_flowprobe.py
+++ b/src/plugins/flowprobe/test/test_flowprobe.py
@@ -417,7 +417,7 @@ class Flowprobe(MethodHolder):
src=self.pg7.remote_mac) /
IP(src=self.pg7.remote_ip4, dst="9.0.0.100") /
TCP(sport=1234, dport=4321, flags=80) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
nowUTC = int(time.time())
nowUNIX = nowUTC+2208988800
diff --git a/src/plugins/gbp/test/test_gbp.py b/src/plugins/gbp/test/test_gbp.py
index a06492904e1..315e1667b6e 100644
--- a/src/plugins/gbp/test/test_gbp.py
+++ b/src/plugins/gbp/test/test_gbp.py
@@ -1042,7 +1042,7 @@ class TestGBP(VppTestCase):
src=self.pg0.remote_mac) /
IP(src=eps[0].ip4.address, dst="232.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.vapi.cli("clear trace")
self.pg0.add_stream(pkt_bcast)
@@ -1063,13 +1063,13 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst="10.0.0.99") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkt_inter_epg_222_ip4 = (Ether(src=self.pg0.remote_mac,
dst=str(self.router_mac)) /
IP(src=eps[0].ip4.address,
dst="10.0.1.99") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(self.pg0,
pkt_intra_epg_220_ip4 * NUM_PKTS)
@@ -1079,7 +1079,7 @@ class TestGBP(VppTestCase):
IPv6(src=eps[0].ip6.address,
dst="2001:10::99") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(self.pg0,
pkt_inter_epg_222_ip6 * NUM_PKTS)
@@ -1140,7 +1140,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst="10.0.0.99") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_bridged(eps[0].itf,
pkt_intra_epg_220_to_uplink * NUM_PKTS,
@@ -1154,7 +1154,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst="10.0.0.99") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_bridged(eps[2].itf,
pkt_intra_epg_221_to_uplink * NUM_PKTS,
@@ -1168,7 +1168,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst="10.0.0.99") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_bridged(self.pg4,
pkt_intra_epg_220_from_uplink * NUM_PKTS,
@@ -1183,7 +1183,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst=eps[1].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_bridged(self.pg0,
pkt_intra_epg * NUM_PKTS,
@@ -1198,19 +1198,19 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst=eps[2].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkt_inter_epg_221_to_220 = (Ether(src=self.pg2.remote_mac,
dst=self.pg0.remote_mac) /
IP(src=eps[2].ip4.address,
dst=eps[0].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
pkt_inter_epg_220_to_222 = (Ether(src=self.pg0.remote_mac,
dst=str(self.router_mac)) /
IP(src=eps[0].ip4.address,
dst=eps[3].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(eps[0].itf,
pkt_inter_epg_220_to_221 * NUM_PKTS)
@@ -1383,7 +1383,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
# no policy yet
self.send_and_assert_no_replies(eps[0].itf,
@@ -1420,7 +1420,7 @@ class TestGBP(VppTestCase):
IPv6(src=eps[0].ip6.address,
dst="6001::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_natted6(self.pg0,
pkt_inter_epg_220_to_global * NUM_PKTS,
@@ -1435,7 +1435,7 @@ class TestGBP(VppTestCase):
IP(dst=eps[0].fip4.address,
src="1.1.1.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(
self.pg7, pkt_inter_epg_220_from_global * NUM_PKTS)
@@ -1463,7 +1463,7 @@ class TestGBP(VppTestCase):
IPv6(dst=eps[0].fip6.address,
src="6001::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_unnatted6(
self.pg7,
@@ -1480,7 +1480,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst=eps[1].fip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_double_natted(eps[0].itf,
pkt_intra_epg_220_global * NUM_PKTS,
@@ -1493,7 +1493,7 @@ class TestGBP(VppTestCase):
IPv6(src=eps[0].ip6.address,
dst=eps[1].fip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_double_natted6(
eps[0].itf,
@@ -1663,7 +1663,7 @@ class TestGBP(VppTestCase):
Ether(src=learnt[0]["mac"], dst=ep.mac) /
IP(src=learnt[0]["ip"], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(self.pg2, p)
@@ -1700,7 +1700,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IP(src=l['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, [p], self.pg0)
@@ -1798,7 +1798,7 @@ class TestGBP(VppTestCase):
UDP(sport=1234, dport=48879) /
VXLAN(vni=99, gpid=112, flags=0x88) /
Ether(src=l['mac'], dst=ep.mac) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, [p], self.pg0)
@@ -1843,7 +1843,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IP(src=l['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
@@ -1868,7 +1868,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IP(src=l['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
@@ -1884,7 +1884,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=l['mac']) /
IP(dst=l['ip'], src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 17, self.pg2)
@@ -1920,7 +1920,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IP(src=l['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
@@ -1935,7 +1935,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=l['mac']) /
IP(dst=learnt[0]['ip'], src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(self.pg0, [p])
@@ -1953,7 +1953,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IP(src=l['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
@@ -1985,7 +1985,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=l['mac']) /
IP(dst=l['ip'], src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg0, [p], self.pg2)
@@ -1997,7 +1997,7 @@ class TestGBP(VppTestCase):
p_uu = (Ether(src=ep.mac, dst="00:11:11:11:11:11") /
IP(dst="10.0.0.133", src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(ep.itf, [p_uu], gbd1.uu_fwd)
self.logger.info(self.vapi.cli("sh bridge 1 detail"))
@@ -2005,7 +2005,7 @@ class TestGBP(VppTestCase):
p_bm = (Ether(src=ep.mac, dst="ff:ff:ff:ff:ff:ff") /
IP(dst="10.0.0.133", src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect_only(ep.itf, [p_bm], tun_bm.mcast_itf)
for rx in rxs:
@@ -2054,7 +2054,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IPv6(src=l['ip6'], dst=ep.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
rx = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
@@ -2086,7 +2086,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IPv6(src=l['ip6'], dst=ep.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, p * 1, self.pg0)
rx = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
@@ -2106,7 +2106,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=l['mac']) /
IPv6(dst=l['ip6'], src=ep.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg2)
@@ -2137,7 +2137,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IPv6(src=l['ip6'], dst=ep.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, p * 1, self.pg0)
rx = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
@@ -2160,7 +2160,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=l['mac']) /
IPv6(dst=l['ip6'], src=ep.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg2)
@@ -2296,7 +2296,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst=eps[1].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_bridged(self.pg0,
pkt_intra_epg_220_to_220 * 65,
@@ -2307,7 +2307,7 @@ class TestGBP(VppTestCase):
IPv6(src=eps[0].ip6.address,
dst=eps[1].ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_bridged6(self.pg0,
pkt_intra_epg_220_to_220 * 65,
@@ -2321,7 +2321,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst=eps[2].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(self.pg0, pkt_inter_epg_220_to_221)
@@ -2359,7 +2359,7 @@ class TestGBP(VppTestCase):
IP(src=eps[0].ip4.address,
dst=eps[3].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(eps[0].itf,
pkt_inter_epg_220_to_222 * 65)
@@ -2406,7 +2406,7 @@ class TestGBP(VppTestCase):
IP(src=eps[2].ip4.address,
dst=eps[0].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_bridged(eps[2].itf,
pkt_inter_epg_221_to_220 * 65,
eps[0].itf)
@@ -2415,7 +2415,7 @@ class TestGBP(VppTestCase):
IP(src=eps[2].ip4.address,
dst=eps[0].ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_routed(eps[2].itf,
pkt_inter_epg_221_to_220 * 65,
eps[0].itf,
@@ -2425,7 +2425,7 @@ class TestGBP(VppTestCase):
IPv6(src=eps[2].ip6.address,
dst=eps[0].ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_routed6(eps[2].itf,
pkt_inter_epg_221_to_220 * 65,
eps[0].itf,
@@ -2513,13 +2513,13 @@ class TestGBP(VppTestCase):
p_uu = (Ether(src=ep.mac, dst="00:11:11:11:11:11") /
IP(dst="10.0.0.133", src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(ep.itf, [p_uu])
p_bm = (Ether(src=ep.mac, dst="ff:ff:ff:ff:ff:ff") /
IP(dst="10.0.0.133", src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(ep.itf, [p_bm])
self.pg3.unconfig_ip4()
@@ -2709,7 +2709,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst=ep.mac) /
IP(src=l['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg2, [p], self.pg0)
@@ -2744,7 +2744,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=11) /
IP(dst=l['ip'], src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 17, self.pg3)
@@ -2882,7 +2882,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst="00:00:00:11:11:11") /
IP(src=l['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, [p], self.pg0)
@@ -2906,7 +2906,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IP(dst=l['ip'], src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 1, self.pg2)
@@ -2949,7 +2949,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst="00:00:00:11:11:11") /
IPv6(src=l['ip6'], dst=ep.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, [p], self.pg0)
@@ -2979,7 +2979,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IPv6(dst=l['ip6'], src=ep.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg2)
@@ -3012,7 +3012,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IP(dst="10.0.0.99", src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_assert_no_replies(self.pg0, [p])
@@ -3030,14 +3030,14 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IP(dst=epg_220.bvi_ip4.address, src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg0)
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IPv6(dst=epg_220.bvi_ip6.address, src=ep.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg0)
@@ -3047,7 +3047,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IP(dst="10.0.0.99", src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, [p], self.pg4)
for rx in rxs:
@@ -3078,7 +3078,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst="00:00:00:11:11:11") /
IP(src=l['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, [p], self.pg0)
@@ -3139,7 +3139,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IP(dst=ip, src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg2)
@@ -3174,7 +3174,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IP(src=ep.ip4.address, dst=rep_2.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, [p], self.pg2)
self.assertFalse(find_gbp_endpoint(self, ip=rep_88.ip4.address))
@@ -3182,7 +3182,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IP(src=ep.ip4.address, dst=rep_88.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, [p], self.pg4)
#
@@ -3216,7 +3216,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst="00:00:00:11:11:11") /
IP(src="10.0.1.4", dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg2, p * NUM_PKTS, self.pg0)
self.assertTrue(find_gbp_endpoint(self,
@@ -3228,7 +3228,7 @@ class TestGBP(VppTestCase):
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
IP(dst="10.0.1.4", src=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg2)
# host 2 is the DP learned TEP
@@ -3259,7 +3259,7 @@ class TestGBP(VppTestCase):
Ether(src=l['mac'], dst="00:00:00:11:11:11") /
IP(src=learnt[1]['ip'], dst=ep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rx = self.send_and_expect(self.pg2, [p], self.pg0)
@@ -3449,19 +3449,19 @@ class TestGBP(VppTestCase):
p4 = [(Ether(src=ep1.mac, dst=ep3.mac) /
IP(src=ep1.ip4.address, dst=ep3.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=ep3.mac, dst=ep1.mac) /
IP(src=ep3.ip4.address, dst=ep1.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
p6 = [(Ether(src=ep1.mac, dst=ep3.mac) /
IPv6(src=ep1.ip6.address, dst=ep3.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=ep3.mac, dst=ep1.mac) /
IPv6(src=ep3.ip6.address, dst=ep1.ip6.address) /
UDP(sport=1234, dport=1230) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
# should be dropped since no contract yet
self.send_and_assert_no_replies(self.pg0, [p4[0]])
@@ -3681,19 +3681,19 @@ class TestGBP(VppTestCase):
p4 = [(Ether(src=ep1.mac, dst=str(self.router_mac)) /
IP(src=ep1.ip4.address, dst=ep2.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=ep2.mac, dst=str(self.router_mac)) /
IP(src=ep2.ip4.address, dst=ep1.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
p6 = [(Ether(src=ep1.mac, dst=str(self.router_mac)) /
IPv6(src=ep1.ip6.address, dst=ep2.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=ep2.mac, dst=str(self.router_mac)) /
IPv6(src=ep2.ip6.address, dst=ep1.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
c3 = VppGbpContract(
self, 402, epg_220.sclass, epg_221.sclass, acl_index,
@@ -3760,7 +3760,7 @@ class TestGBP(VppTestCase):
Ether(src="00:22:22:22:22:33", dst=str(self.router_mac)) /
IP(src="10.0.0.88", dst=ep1.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
# unknown remote EP to local EP redirected
rxs = self.send_and_expect(self.pg7, [p], sep1.itf)
@@ -3785,7 +3785,7 @@ class TestGBP(VppTestCase):
Ether(src="00:22:22:22:22:33", dst=str(self.router_mac)) /
IPv6(src="2001:10::88", dst=ep1.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
# unknown remote EP to local EP redirected (ipv6)
rxs = self.send_and_expect(self.pg7, [p], sep3.itf)
@@ -3807,11 +3807,11 @@ class TestGBP(VppTestCase):
p4 = [(Ether(src=ep1.mac, dst=str(self.router_mac)) /
IP(src=ep1.ip4.address, dst="10.0.0.88") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
p6 = [(Ether(src=ep1.mac, dst=str(self.router_mac)) /
IPv6(src=ep1.ip6.address, dst="2001:10::88") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
rxs = self.send_and_expect(self.pg0, p4[0] * 17, sep1.itf)
@@ -3974,12 +3974,12 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.17", dst="10.221.0.65") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=eep1.mac, dst=self.router_mac) /
Dot1Q(vlan=100) /
IPv6(src="10:220::17", dst="10:221::65") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
# packets should be dropped in absence of contract
self.send_and_assert_no_replies(self.pg0, p)
@@ -4104,11 +4104,11 @@ class TestGBP(VppTestCase):
p = [(base /
IP(src="10.0.1.100", dst=ep3.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(base /
IPv6(src="2001:10::100", dst=ep3.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
# unknown remote EP to local EP redirected to known remote SEP
rxs = self.send_and_expect(self.pg7, p, self.pg7)
@@ -4360,19 +4360,19 @@ class TestGBP(VppTestCase):
p4 = [(Ether(src=ep1.mac, dst=str(self.router_mac)) /
IP(src=ep1.ip4.address, dst=ep2.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=ep2.mac, dst=str(self.router_mac)) /
IP(src=ep2.ip4.address, dst=ep1.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
p6 = [(Ether(src=ep1.mac, dst=str(self.router_mac)) /
IPv6(src=ep1.ip6.address, dst=ep2.ip6.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=ep2.mac, dst=str(self.router_mac)) /
IPv6(src=ep2.ip6.address, dst=ep1.ip6.address) /
UDP(sport=1234, dport=1230) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
# should be dropped since no contract yet
self.send_and_assert_no_replies(self.pg0, [p4[0]])
@@ -4535,7 +4535,7 @@ class TestGBP(VppTestCase):
Ether(src=str(self.router_mac), dst=sep1.mac) /
IP(src=ep1.ip4.address, dst=ep2.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg7, [p] * 17, sep1.itf)
@@ -4567,7 +4567,7 @@ class TestGBP(VppTestCase):
p1 = (Ether(src=sep1.mac, dst=self.router_mac) /
IP(src=ep1.ip4.address, dst=ep2.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg3, [p1] * 17, self.pg7)
@@ -4605,7 +4605,7 @@ class TestGBP(VppTestCase):
Ether(src=str(self.router_mac), dst=self.router_mac) /
IP(src=ep1.ip4.address, dst=ep2.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg7, [p2], self.pg1)
@@ -4793,12 +4793,12 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.0.0.1", dst="10.0.0.88") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
p6 = (Ether(src=eep1.mac, dst=str(self.router_mac)) /
Dot1Q(vlan=100) /
IPv6(src="2001:10::1", dst="2001:10::88") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p4 * 1, self.pg7)
@@ -4831,7 +4831,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IP(src="10.0.0.101", dst="10.0.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg7, p * 1, self.pg0)
@@ -5008,7 +5008,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst="10.221.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 1, self.pg0)
@@ -5033,7 +5033,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IP(src="10.0.0.101", dst="10.220.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg7, p * 1, self.pg0)
@@ -5044,7 +5044,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst=rep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 1, self.pg7)
@@ -5115,7 +5115,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst="10.222.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_assert_no_replies(self.pg0, p * 1)
@@ -5142,7 +5142,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst="10.222.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 3, self.pg7)
@@ -5196,12 +5196,12 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst="10.222.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=eep1.mac, dst=str(self.router_mac)) /
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst="10.222.0.1") /
UDP(sport=1222, dport=1235) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
rxs = self.send_and_expect(self.pg0, p, self.pg7)
@@ -5240,12 +5240,12 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IPv6(src="10:220::1", dst="10:222::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=eep1.mac, dst=str(self.router_mac)) /
Dot1Q(vlan=100) /
IPv6(src="10:220::1", dst="10:222::1") /
UDP(sport=7777, dport=8881) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
self.logger.info(self.vapi.cli("sh ip6 fib 10:222::1"))
rxs = self.send_and_expect(self.pg0, p, self.pg7)
@@ -5264,7 +5264,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IP(src="10.222.0.1", dst="10.220.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg7, p * 3, self.pg0)
self.assertFalse(find_gbp_endpoint(self, ip="10.222.0.1"))
@@ -5280,7 +5280,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IP(src="10.222.0.1", dst="10.222.0.2") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_assert_no_replies(self.pg7, p * 3)
@@ -5291,7 +5291,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IPv6(src="10:222::1", dst="10:222::2") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_assert_no_replies(self.pg7, p * 3)
@@ -5311,7 +5311,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=144) /
IP(src=lep1.ip4.address, dst="10.220.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 1, self.pg0)
@@ -5327,7 +5327,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=144) /
IPv6(src=lep1.ip6.address, dst="10:220::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 1, self.pg0)
@@ -5375,12 +5375,12 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=144) /
IPv6(src=lep1.ip6.address, dst="10:20::1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=lep1.mac, dst=str(self.router_mac)) /
Dot1Q(vlan=144) /
IPv6(src=lep1.ip6.address, dst="10:20::1") /
UDP(sport=124, dport=1230) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
rxs = self.send_and_expect(self.pg0, p, self.pg0, 2)
@@ -5392,12 +5392,12 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=144) /
IP(src=lep1.ip4.address, dst="10.20.0.1") /
UDP(sport=1235, dport=1235) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(src=lep1.mac, dst=str(self.router_mac)) /
Dot1Q(vlan=144) /
IP(src=lep1.ip4.address, dst="10.20.0.1") /
UDP(sport=124, dport=1230) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
rxs = self.send_and_expect(self.pg0, p, self.pg0, 2)
@@ -5551,7 +5551,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IP(src=str(rep.ip4), dst="10.0.0.100") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg7, p * 1, self.pg0)
#
@@ -5682,7 +5682,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst="10.221.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 1, self.pg0)
@@ -5707,7 +5707,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IP(src=rep.ip4.address, dst="10.220.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg7, p * 1, self.pg0)
@@ -5718,7 +5718,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst=rep.ip4.address) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 1, self.pg7)
@@ -5790,7 +5790,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst="10.222.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_assert_no_replies(self.pg0, p * 1)
@@ -5817,7 +5817,7 @@ class TestGBP(VppTestCase):
Dot1Q(vlan=100) /
IP(src="10.220.0.1", dst="10.222.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg0, p * 3, self.pg7)
@@ -5851,7 +5851,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IP(src="10.222.0.1", dst="10.220.0.1") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_expect(self.pg7, p * 3, self.pg0)
self.assertFalse(find_gbp_endpoint(self, ip="10.222.0.1"))
@@ -5867,7 +5867,7 @@ class TestGBP(VppTestCase):
Ether(src=self.pg0.remote_mac, dst=str(self.router_mac)) /
IP(src="10.222.0.1", dst="10.222.0.2") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
rxs = self.send_and_assert_no_replies(self.pg7, p * 3)
diff --git a/src/plugins/igmp/test/test_igmp.py b/src/plugins/igmp/test/test_igmp.py
index e90fbfbf775..3f9b99bb5b5 100644
--- a/src/plugins/igmp/test/test_igmp.py
+++ b/src/plugins/igmp/test/test_igmp.py
@@ -202,7 +202,7 @@ class TestIgmp(VppTestCase):
IP(src=self.pg0.remote_ip4, dst='224.0.0.1', tos=0xc0) /
IGMPv3(type="Membership Query", mrcode=100) /
IGMPv3mq(gaddr="0.0.0.0") /
- Raw('\x00' * 10))
+ Raw(b'\x00' * 10))
self.send(self.pg0, p_g)
diff --git a/src/plugins/l3xc/test/test_l3xc.py b/src/plugins/l3xc/test/test_l3xc.py
index 7bdddbc4cd8..add27e718e0 100644
--- a/src/plugins/l3xc/test/test_l3xc.py
+++ b/src/plugins/l3xc/test/test_l3xc.py
@@ -132,7 +132,7 @@ class TestL3xc(VppTestCase):
dst=self.pg0.local_mac) /
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_1*NUM_PKTS, self.pg1)
p_2 = []
@@ -141,7 +141,7 @@ class TestL3xc(VppTestCase):
dst=self.pg0.local_mac) /
IP(src="1.1.1.1", dst="1.1.1.2") /
UDP(sport=1000 + ii, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect_load_balancing(self.pg2, p_2,
[self.pg3, self.pg4, self.pg5])
diff --git a/src/plugins/svs/test/test_svs.py b/src/plugins/svs/test/test_svs.py
index 6d3b72e744d..ec986370895 100644
--- a/src/plugins/svs/test/test_svs.py
+++ b/src/plugins/svs/test/test_svs.py
@@ -70,27 +70,27 @@ class TestSVS(VppTestCase):
pkts_0 = [(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IP(src="1.1.1.1", dst=self.pg1.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IP(src="2.2.2.2", dst=self.pg2.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IP(src="3.3.3.3", dst=self.pg3.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
pkts_1 = [(Ether(dst=self.pg1.local_mac, src=self.pg1.remote_mac) /
IP(src="1.1.1.1", dst=self.pg1.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(dst=self.pg1.local_mac, src=self.pg1.remote_mac) /
IP(src="2.2.2.2", dst=self.pg2.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(dst=self.pg1.local_mac, src=self.pg1.remote_mac) /
IP(src="3.3.3.3", dst=self.pg3.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
#
# before adding the SVS config all these packets are dropped when
@@ -143,13 +143,13 @@ class TestSVS(VppTestCase):
p = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IP(src=self.pg0.remote_ip4, dst=self.pg0.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg0)
p = (Ether(dst=self.pg1.local_mac, src=self.pg1.remote_mac) /
IP(src=self.pg1.remote_ip4, dst=self.pg1.remote_ip4) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg1, p * NUM_PKTS, self.pg1)
#
@@ -197,27 +197,27 @@ class TestSVS(VppTestCase):
pkts_0 = [(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IPv6(src="2001:1::1", dst=self.pg1.remote_ip6) /
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="2001:2::1", dst=self.pg2.remote_ip6) /
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="2001:3::1", dst=self.pg3.remote_ip6) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
pkts_1 = [(Ether(dst=self.pg1.local_mac, src=self.pg1.remote_mac) /
IPv6(src="2001:1::1", dst=self.pg1.remote_ip6) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(dst=self.pg1.local_mac, src=self.pg1.remote_mac) /
IPv6(src="2001:2::1", dst=self.pg2.remote_ip6) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100)),
+ Raw(b'\xa5' * 100)),
(Ether(dst=self.pg1.local_mac, src=self.pg1.remote_mac) /
IPv6(src="2001:3::1", dst=self.pg3.remote_ip6) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
#
# before adding the SVS config all these packets are dropped when
@@ -273,13 +273,13 @@ class TestSVS(VppTestCase):
p = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IPv6(src=self.pg0.remote_ip6, dst=self.pg0.remote_ip6) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg0, p * NUM_PKTS, self.pg0)
p = (Ether(dst=self.pg1.local_mac, src=self.pg1.remote_mac) /
IPv6(src=self.pg1.remote_ip6, dst=self.pg1.remote_ip6) /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))
+ Raw(b'\xa5' * 100))
self.send_and_expect(self.pg1, p * NUM_PKTS, self.pg1)
#
diff --git a/test/test_bfd.py b/test/test_bfd.py
index 7d529767d16..c8bda736b5e 100644
--- a/test/test_bfd.py
+++ b/test/test_bfd.py
@@ -1755,11 +1755,11 @@ class BFDFIBTestCase(VppTestCase):
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 @@ class BFDTunTestCase(VppTestCase):
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 d9bb7ac711f..d5ffd3b1577 100644
--- a/test/test_dvr.py
+++ b/test/test_dvr.py
@@ -75,13 +75,13 @@ class TestDVR(VppTestCase):
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 @@ class TestDVR(VppTestCase):
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 @@ class TestDVR(VppTestCase):
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 @@ class TestDVR(VppTestCase):
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 f5ed09f6683..4cd0828127d 100644
--- a/test/test_ip6.py
+++ b/test/test_ip6.py
@@ -1469,7 +1469,7 @@ class IPv6NDProxyTest(TestIPv6ND):
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 @@ class IPv6NDProxyTest(TestIPv6ND):
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 @@ class TestIPNull(VppTestCase):
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 @@ class TestIPDisabled(VppTestCase):
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 @@ class TestIP6LoadBalance(VppTestCase):
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 @@ class TestIP6LoadBalance(VppTestCase):
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 @@ class TestIP6LoadBalance(VppTestCase):
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 @@ class TestIP6LoadBalance(VppTestCase):
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 @@ class TestIP6Punt(VppTestCase):
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 @@ class TestIPDeag(VppTestCase):
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 @@ class TestIPDeag(VppTestCase):
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 @@ class TestIP6Input(VppTestCase):
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 @@ class TestIP6Input(VppTestCase):
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 @@ class TestIP6Input(VppTestCase):
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 f7a50825d81..d7a8238e35b 100644
--- a/test/test_ip_mcast.py
+++ b/test/test_ip_mcast.py
@@ -100,7 +100,7 @@ class TestIPMcast(VppTestCase):
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 @@ class TestIPMcast(VppTestCase):
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 971ec79fd67..b61e0ef5a62 100644
--- a/test/test_ipsec_tun_if_esp.py
+++ b/test/test_ipsec_tun_if_esp.py
@@ -534,7 +534,7 @@ class TestIpsecGreTebIfEsp(TemplateIpsec,
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 @@ class TestIpsecGreTebIfEsp(TemplateIpsec,
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 @@ class TestIpsecGreIfEsp(TemplateIpsec,
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 @@ class TestIpsecGreIfEsp(TemplateIpsec,
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 @@ class TestIpsec4TunProtectTun(TemplateIpsec,
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 @@ class TestIpsec4TunProtectTun(TemplateIpsec,
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 @@ class TestIpsec6TunProtectTun(TemplateIpsec,
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 @@ class TestIpsec6TunProtectTun(TemplateIpsec,
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 f4d1c07c62c..7f3c57a399d 100644
--- a/test/test_l2_flood.py
+++ b/test/test_l2_flood.py
@@ -80,7 +80,7 @@ class TestL2Flood(VppTestCase):
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 @@ class TestL2Flood(VppTestCase):
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 @@ class TestL2Flood(VppTestCase):
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 f7f634d60bf..ebeea5fb367 100644
--- a/test/test_mpls.py
+++ b/test/test_mpls.py
@@ -1547,7 +1547,7 @@ class TestMPLSDisabled(VppTestCase):
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 @@ class TestMPLSPIC(VppTestCase):
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 @@ class TestMPLSPIC(VppTestCase):
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 @@ class TestMPLSPIC(VppTestCase):
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 @@ class TestMPLSL2(VppTestCase):
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 @@ class TestMPLSL2(VppTestCase):
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 @@ class TestMPLSL2(VppTestCase):
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 7068fd05b04..0b7ffff8bc3 100644
--- a/test/test_neighbor.py
+++ b/test/test_neighbor.py
@@ -946,7 +946,7 @@ class ARPTestCase(VppTestCase):
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 7a8c56092fb..7cc6cdce485 100644
--- a/test/test_p2p_ethernet.py
+++ b/test/test_p2p_ethernet.py
@@ -172,7 +172,7 @@ class P2PEthernetIPV6(VppTestCase):
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 @@ class P2PEthernetIPV6(VppTestCase):
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 @@ class P2PEthernetIPV4(VppTestCase):
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 89ef1f3cadb..6e3edca3c50 100644
--- a/test/test_pipe.py
+++ b/test/test_pipe.py
@@ -114,7 +114,7 @@ class TestPipe(VppTestCase):
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 @@ class TestPipe(VppTestCase):
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 @@ class TestPipe(VppTestCase):
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 40c814774bf..b22ed44e791 100644
--- a/test/test_udp.py
+++ b/test/test_udp.py
@@ -169,7 +169,7 @@ class TestUdpEncap(VppTestCase):
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 @@ class TestUdpEncap(VppTestCase):
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 @@ class TestUdpEncap(VppTestCase):
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 @@ class TestUdpEncap(VppTestCase):
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 @@ class TestUdpEncap(VppTestCase):
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 b292aac4a12..692930eb1f2 100644
--- a/test/test_vxlan.py
+++ b/test/test_vxlan.py
@@ -236,7 +236,7 @@ class TestVxlan(BridgeDomain, VppTestCase):
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 24769337b7c..64e51b016cb 100644
--- a/test/test_vxlan_gbp.py
+++ b/test/test_vxlan_gbp.py
@@ -24,7 +24,7 @@ class TestVxlanGbp(VppTestCase):
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 @@ class TestVxlanGbp(VppTestCase):
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 @@ class TestVxlanGbp(VppTestCase):
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])