summaryrefslogtreecommitdiffstats
path: root/test/test_ip6.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_ip6.py')
-rw-r--r--test/test_ip6.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_ip6.py b/test/test_ip6.py
index 6c959a2712c..7c9df465707 100644
--- a/test/test_ip6.py
+++ b/test/test_ip6.py
@@ -36,6 +36,8 @@ try:
except NameError:
text_type = str
+NUM_PKTS = 67
+
class TestIPv6ND(VppTestCase):
def validate_ra(self, intf, rx, dst_ip=None):
@@ -1308,6 +1310,7 @@ class TestIPv6RDControlPlane(TestIPv6ND):
# check FIB still contains the SLAAC address
addresses = set(self.get_interface_addresses(fib, self.pg0))
new_addresses = addresses.difference(initial_addresses)
+
self.assertEqual(len(new_addresses), 1)
prefix = list(new_addresses)[0][:8] + '\0\0\0\0\0\0\0\0'
self.assertEqual(inet_ntop(AF_INET6, prefix), '1::')
@@ -1760,7 +1763,7 @@ class TestIP6LoadBalance(VppTestCase):
src_ip_pkts = []
src_mpls_pkts = []
- for ii in range(65):
+ for ii in range(NUM_PKTS):
port_ip_hdr = (
IPv6(dst="3000::1", src="3000:1::1") /
inet6.UDP(sport=1234, dport=1234 + ii) /
@@ -2267,7 +2270,7 @@ class TestIP6Input(VppTestCase):
inet6.UDP(sport=1234, dport=1234) /
Raw('\xa5' * 100))
- rx = self.send_and_expect(self.pg0, p_version * 65, self.pg0)
+ rx = self.send_and_expect(self.pg0, p_version * NUM_PKTS, self.pg0)
rx = rx[0]
icmp = rx[ICMPv6TimeExceeded]
@@ -2306,7 +2309,7 @@ class TestIP6Input(VppTestCase):
l4 /
Raw('\xa5' * 100))
- self.send_and_assert_no_replies(self.pg0, p_version * 65,
+ self.send_and_assert_no_replies(self.pg0, p_version * NUM_PKTS,
remark=msg or "",
timeout=timeout)