test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: qi.fu@intel.com, Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts] [PATCH V1 2/3] tests/flexible_common:add flexible rxid 22 common
Date: Fri, 27 Nov 2020 11:14:27 +0800	[thread overview]
Message-ID: <1606446868-1725-3-git-send-email-zhiminx.huang@intel.com> (raw)
In-Reply-To: <1606446868-1725-1-git-send-email-zhiminx.huang@intel.com>

*.add rxid 22 case flexible common.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 tests/flexible_common.py | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/tests/flexible_common.py b/tests/flexible_common.py
index fa3c64d..9df62ca 100644
--- a/tests/flexible_common.py
+++ b/tests/flexible_common.py
@@ -32,6 +32,7 @@
 import time
 from packet import Packet
 from pmd_output import PmdOutput
+import re
 
 
 class FlexibleRxdBase(object):
@@ -159,6 +160,21 @@ class FlexibleRxdBase(object):
                 expected_strs
             self.verify(all([e in out for e in _expected_strs]), msg)
 
+    def replace_pkg(self, pkg='comms'):
+        ice_pkg_path = ''.join([self.ddp_dir, "ice.pkg"])
+        if pkg == 'os_default':
+            self.dut.send_expect("cp {} {}".format(self.os_default_pkg, ice_pkg_path), "# ")
+        if pkg == 'comms':
+            self.dut.send_expect("cp {} {}".format(self.comms_pkg, ice_pkg_path), "# ")
+        self.dut.send_expect("echo {0} > /sys/bus/pci/devices/{0}/driver/unbind".format(self.pci), "# ", 60)
+        self.dut.send_expect("echo {} > /sys/bus/pci/drivers/ice/bind".format(self.pci), "# ", 60)
+        self.dut.send_expect("./usertools/dpdk-devbind.py --force --bind=vfio-pci {}".format(self.pci), "# ", 60)
+        dmesg_out = self.dut.send_expect('dmesg | grep Package | tail -1', '#')
+        package_version = re.search('version (.*)', dmesg_out).group(1)
+        self.logger.info("package version:{}".format(package_version))
+        self.verify(package_version in self.os_default_pkg if pkg == 'os_default' else self.comms_pkg,
+                    'replace package failed')
+
     def check_single_VLAN_fields_in_RXD_8021Q(self):
         """
         Check single VLAN fields in RXD (802.1Q)
@@ -481,3 +497,11 @@ class FlexibleRxdBase(object):
             ['Ether(src="{src_mac}", dst="{dst_mac}",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()',
                 'ip_offset=42']]
         self.__verify_common(pkts_list)
+
+    def check_effect_replace_pkg_RXID_22_to_RXID_16(self):
+        self.logger.info("replace ice-1.3.7.0.pkg with RXID 16")
+        self.replace_pkg('os_default')
+        out = self.__pmdout.start_testpmd(cores="1S/4C/1T", param='--rxq=64 --txq=64', eal_param=f"-w {self.__pci}")
+        self.verify("Fail to start port 0" in out, "RXID #16 not support start testpmd")
+        self.__pmdout.execute_cmd("quit", "# ")
+        self.replace_pkg('comms')
-- 
1.8.3.1


  parent reply	other threads:[~2020-11-27  3:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  3:14 [dts] [PATCH V1 0/3] add flexible rxid 22 case Zhimin Huang
2020-11-27  3:14 ` [dts] [PATCH V1 1/3] tests/TestSuite_flexible_rxd:add " Zhimin Huang
2020-11-27  3:14 ` Zhimin Huang [this message]
2020-11-27  3:14 ` [dts] [PATCH V1 3/3] conf/flexible_rxd:add flexible rxid 22 conf Zhimin Huang
2020-11-27  5:25 ` [dts] [PATCH V1 0/3] add flexible rxid 22 case Huang, ZhiminX
2020-12-07  2:28   ` Fu, Qi
2020-12-07  7:19     ` 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=1606446868-1725-3-git-send-email-zhiminx.huang@intel.com \
    --to=zhiminx.huang@intel.com \
    --cc=dts@dpdk.org \
    --cc=qi.fu@intel.com \
    /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).