test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH 1/1] tests/TestSuite_mac_filter.py Correction in while loop condition.
@ 2019-07-04 16:47 Yash Sharma
  0 siblings, 0 replies; only message in thread
From: Yash Sharma @ 2019-07-04 16:47 UTC (permalink / raw)
  To: dts, yong.liu, lijuan.tu; +Cc: shshaikh, psurana, srane, yash

From: yash <ysharma@marvell.com>

Removing '=' from while loop condition  as i is initialized to 0 and the loop iterates upto 256 resulting in total 257 iterations, as a result of that an extra unwanted invalid mac address is added at the end i.e. "00:01:00:00:00:100",it returns not expected String which doesn't match with the string in verify function, Leading to test failure.

Signed-off-by: yash <ysharma@marvell.com>
---
 tests/TestSuite_mac_filter.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/TestSuite_mac_filter.py b/tests/TestSuite_mac_filter.py
index a28bf9a..7b5eb43 100644
--- a/tests/TestSuite_mac_filter.py
+++ b/tests/TestSuite_mac_filter.py
@@ -168,7 +168,7 @@ class TestMacFilter(TestCase):
         # add 1 address more that max number
         i = 0
         base_addr = "00:01:00:00:00:"
-        while i <= int(self.max_mac_addr):
+        while i < int(self.max_mac_addr):
             new_addr = base_addr + "%0.2X" % i
             out = self.dut.send_expect("mac_addr add %d" % portid + " %s" % new_addr, "testpmd>")
             i = i + 1
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-04 16:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04 16:47 [dts] [PATCH 1/1] tests/TestSuite_mac_filter.py Correction in while loop condition Yash Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).