test suite reviews and discussions
 help / color / mirror / Atom feed
From: "xiao,qimai" <qimaix.xiao@intel.com>
To: dts@dpdk.org
Cc: "xiao,qimai" <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1] update kni for env with single cpu on socket 0
Date: Tue,  2 Jul 2019 17:35:04 +0800	[thread overview]
Message-ID: <1562060104-127705-1-git-send-email-qimaix.xiao@intel.com> (raw)

1.update kni to run on env with single cpu on socket 0
2.add cmd to close firewall on ubuntu

Signed-off-by: xiao,qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_kni.py | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index 6bf388c..a1c07a2 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -263,13 +263,34 @@ class TestKni(TestCase):
 
         out = self.dut.build_dpdk_apps("./examples/kni/")
         self.verify('Error' not in out, "Compilation failed")
+        p0_pci = self.dut.ports_info[0]['pci']
+        numa_node = int(self.dut.send_expect("cat /sys/bus/pci/devices/%s/numa_node"%p0_pci, "# ", 30))
+        socket_id = numa_node if numa_node > 0 else 0
+        if socket_id==0:
+            global default_1_port_cores_config
+            global default_2_port_cores_config
+            global routing_performance_steps
+            global bridge_performance_steps
+            global loopback_performance_steps
+
+            default_1_port_cores_config=default_1_port_cores_config.replace('C{1.','C{0.')
+            default_2_port_cores_config=default_1_port_cores_config.replace('C{1.','C{0.')
+            for i in range(len(routing_performance_steps)):
+                routing_performance_steps[i]['config'] = routing_performance_steps[i]['config'].replace('C{1.','C{0.')
+            for j in range(len(bridge_performance_steps)):
+                bridge_performance_steps[j]['config'] = bridge_performance_steps[j]['config'].replace('C{1.','C{0.')
+            for k in range(len(loopback_performance_steps)):
+                loopback_performance_steps[k]['config'] = loopback_performance_steps[k]['config'].replace('C{1.','C{0.')
 
         self.extract_ports_cores_config(default_1_port_cores_config)
         out = self.start_kni()
         self.verify("Error" not in out, "Error found during kni start")
-
-        self.dut.send_expect("service iptables stop", "# ")
-        self.dut.send_expect("service firewalld stop", "# ")
+        out = self.dut.send_expect("cat /etc/os-release", "# ")
+        if "Ubuntu" in out:
+            self.dut.send_expect("ufw disable", "# ")
+        else:
+            self.dut.send_expect("service iptables stop", "# ")
+            self.dut.send_expect("service firewalld stop", "# ")
 
         # get dts output path
         if self.logger.log_path.startswith(os.sep):
-- 
2.17.1


             reply	other threads:[~2019-07-02  9:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02  9:35 xiao,qimai [this message]
2019-07-03  3:39 ` Yao, BingX Y
2019-07-03  5:40 ` 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=1562060104-127705-1-git-send-email-qimaix.xiao@intel.com \
    --to=qimaix.xiao@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).