[dts] [PATCH] tests/ipfrag: add method name in error message

Rami Rosen ramirose at gmail.com
Mon Apr 22 15:47:54 CEST 2019


There is no way to know, when getting "failed on forward packet size"
error, whether it is from functional_check_ipv4() or functional_check_ipv6().
This patch adds the method name when in these two method so 
we will be able to track it.

Signed-off-by: Rami Rosen <ramirose at gmail.com>
---
 tests/TestSuite_ipfrag.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py
index 9f47a2c..38a27e9 100644
--- a/tests/TestSuite_ipfrag.py
+++ b/tests/TestSuite_ipfrag.py
@@ -170,7 +170,7 @@ l3fwd_ipv4_route_array[] = {\\\n"
 
             # verify normal packet just by number, verify fragment packet by all elements
             pkts = self.tester.load_tcpdump_sniff_packets(inst)
-            self.verify(len(pkts) == expPkts, "Failed on forward packet size " + str(size))
+            self.verify(len(pkts) == expPkts, "in functional_check_ipv4(): failed on forward packet size " + str(size))
             if flag == 'frag':
                 idx = 1
                 for pkt in pkts:
@@ -220,7 +220,7 @@ l3fwd_ipv4_route_array[] = {\\\n"
 
             # verify normal packet just by number, verify fragment packet by all elements
             pkts = self.tester.load_tcpdump_sniff_packets(inst)
-            self.verify(len(pkts) == expPkts, "Failed on forward packet size " + str(size))
+            self.verify(len(pkts) == expPkts, "In functional_check_ipv6(): failed on forward packet size " + str(size))
             if flag == 'frag':
                 idx = 1
                 for pkt in pkts:
-- 
1.8.3.1



More information about the dts mailing list