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
This commit is contained in:
Ole Troan
2019-11-07 13:52:21 +01:00
committed by Paul Vinciguerra
parent 76a36e83e3
commit 770a0deaad
19 changed files with 204 additions and 204 deletions

View File

@ -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