summaryrefslogtreecommitdiffstats
path: root/test/test_ip4.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2016-11-18 07:38:42 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-05 18:44:45 +0000
commit7bb873a4cc068a6cc3c9d0e1d32987c5f8003904 (patch)
tree991f04ba994779140f98bdcf44af09d63d8c69c8 /test/test_ip4.py
parent86fb04db3ec3979f20111bf4dfa945a1fa2275d4 (diff)
make test: fix missing log/packet messages
Change-Id: Idb3119792943664748c4abc3829ad723f4156dfe Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/test_ip4.py')
-rw-r--r--test/test_ip4.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/test_ip4.py b/test/test_ip4.py
index 36a907a66df..d219ec9f981 100644
--- a/test/test_ip4.py
+++ b/test/test_ip4.py
@@ -4,12 +4,12 @@ import unittest
import socket
from framework import VppTestCase, VppTestRunner
-from vpp_interface import VppInterface
from vpp_sub_interface import VppSubInterface, VppDot1QSubint, VppDot1ADSubint
from scapy.packet import Raw
from scapy.layers.l2 import Ether, Dot1Q
from scapy.layers.inet import IP, UDP
+from util import ppp
class TestIPv4(VppTestCase):
@@ -164,16 +164,14 @@ class TestIPv4(VppTestCase):
self.assertEqual(udp.sport, saved_packet[UDP].sport)
self.assertEqual(udp.dport, saved_packet[UDP].dport)
except:
- self.logger.error("Unexpected or invalid packet:")
- self.logger.error(packet.show())
+ self.logger.error(ppp("Unexpected or invalid packet:", packet))
raise
for i in self.interfaces:
remaining_packet = self.get_next_packet_info_for_interface2(
i.sw_if_index, dst_sw_if_index, last_info[i.sw_if_index])
- self.assertTrue(
- remaining_packet is None,
- "Interface %s: Packet expected from interface %s didn't arrive" %
- (dst_if.name, i.name))
+ self.assertTrue(remaining_packet is None,
+ "Interface %s: Packet expected from interface %s "
+ "didn't arrive" % (dst_if.name, i.name))
def test_fib(self):
""" IPv4 FIB test