test suite reviews and discussions
 help / color / mirror / Atom feed
From: hanyingya <yingyax.han@intel.com>
To: dts@dpdk.org
Cc: hanyingya <yingyax.han@intel.com>
Subject: [dts] [PATCH V1]tests/link_flowctrl: add the verification of Niantic card
Date: Thu, 10 Sep 2020 15:47:24 +0800	[thread overview]
Message-ID: <20200910074724.64291-1-yingyax.han@intel.com> (raw)

add the verification of Niantic card.
fix incorrect verification that only enabling rx link flow control.

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 tests/TestSuite_link_flowctrl.py | 44 ++++++++++++++++++++++----------
 1 file changed, 30 insertions(+), 14 deletions(-)

diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flowctrl.py
index 45b0654..9e608ba 100644
--- a/tests/TestSuite_link_flowctrl.py
+++ b/tests/TestSuite_link_flowctrl.py
@@ -455,9 +455,12 @@ class TestLinkFlowctrl(TestCase):
                                             pause_frame_fwd='off')
 
         self.logger.info("Packet loss: %.3f" % result)
-
-        self.verify(result <= 0.01,
-                    "Link flow control fail, the loss percent is more than 1%")
+        if self.nic == "niantic":
+            self.verify(result >= 0.3,
+                        "Link flow control fail, the loss percent is less than 30%")
+        else:
+            self.verify(result >= 0.5,
+                        "Link flow control fail, the loss percent is less than 50%")
 
     def test_perf_flowctrl_off_pause_fwd_on(self):
         """
@@ -469,9 +472,12 @@ class TestLinkFlowctrl(TestCase):
                                             pause_frame_fwd='on')
 
         self.logger.info("Packet loss: %.3f" % result)
-
-        self.verify(result >= 0.5,
-                    "Link flow control fail, the loss percent is less than 50%")
+        if self.nic == "niantic":
+            self.verify(result >= 0.3,
+                        "Link flow control fail, the loss percent is less than 30%")
+        else:
+            self.verify(result >= 0.5,
+                        "Link flow control fail, the loss percent is less than 50%")
 
     def test_perf_flowctrl_off_pause_fwd_off(self):
         """
@@ -483,9 +489,12 @@ class TestLinkFlowctrl(TestCase):
                                             pause_frame_fwd='off')
 
         self.logger.info("Packet loss: %.3f" % result)
-
-        self.verify(result >= 0.5,
-                    "Link flow control fail, the loss percent is less than 50%")
+        if self.nic == "niantic":
+            self.verify(result >= 0.3,
+                        "Link flow control fail, the loss percent is less than 30%")
+        else:
+            self.verify(result >= 0.5,
+                        "Link flow control fail, the loss percent is less than 50%")
 
     def test_perf_flowctrl_tx_on(self):
         """
@@ -533,9 +542,12 @@ class TestLinkFlowctrl(TestCase):
                            pause_frame_fwd='off')
         result = self.start_traffic(tgenInput)
         self.logger.info("Packet loss: %.3f" % result)
-        self.verify(result >= 0.5,
-                    "Link flow control fail after port stop/start, the loss percent is more than 50%")
-
+        if self.nic == "niantic":
+            self.verify(result >= 0.3,
+                        "Link flow control fail, the loss percent is less than 30%")
+        else:
+            self.verify(result >= 0.5,
+                        "Link flow control fail, the loss percent is less than 50%")
         # test again after port Stop/start
         self.dut.send_expect("stop", "testpmd> ")
         self.dut.send_expect("port stop 0", "testpmd> ")
@@ -543,8 +555,12 @@ class TestLinkFlowctrl(TestCase):
         self.dut.send_expect("start", "testpmd> ", 60)
         result = self.start_traffic(tgenInput)
         self.logger.info("Packet loss: %.3f" % result)
-        self.verify(result >= 0.5,
-                    "Link flow control fail after port stop/start, the loss percent is more than 50%")
+        if self.nic == "niantic":
+            self.verify(result >= 0.3,
+                        "Link flow control fail, the loss percent is less than 30%")
+        else:
+            self.verify(result >= 0.5,
+                        "Link flow control fail, the loss percent is less than 50%")
         self.dut.send_expect("stop", "testpmd> ")
 
     def tear_down_all(self):
-- 
2.17.1


             reply	other threads:[~2020-09-10  7:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  7:47 hanyingya [this message]
2020-09-15  8:34 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200910074724.64291-1-yingyax.han@intel.com \
    --to=yingyax.han@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).