* [dts] [PATCH] fix queue start/stop case failed
@ 2015-10-23 7:55 xu,huilong
2015-10-23 8:06 ` Liu, Yong
0 siblings, 1 reply; 3+ messages in thread
From: xu,huilong @ 2015-10-23 7:55 UTC (permalink / raw)
To: dts
sometime print can't get received package info, used self.dut.get_session_output() replace
self.dut.send_expect("\n", "testpmd>") get received package info
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_queue_start_stop.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py
index 83504ab..f59333c 100644
--- a/tests/TestSuite_queue_start_stop.py
+++ b/tests/TestSuite_queue_start_stop.py
@@ -164,7 +164,7 @@ class TestQueueStartStop(TestCase):
self.dut.send_expect("port 1 txq 0 stop", "testpmd>")
self.dut.send_expect("start", "testpmd>")
self.check_forwarding([0, 1], self.nic, received=False)
- out = self.dut.send_expect("\n", "testpmd>")
+ out = self.dut.get_session_output()
except Exception, e:
raise IOError("queue start/stop forward failure: %s" % e)
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH] fix queue start/stop case failed
2015-10-23 7:55 [dts] [PATCH] fix queue start/stop case failed xu,huilong
@ 2015-10-23 8:06 ` Liu, Yong
0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2015-10-23 8:06 UTC (permalink / raw)
To: xu,huilong, dts
Applied. Thanks.
On 10/23/2015 03:55 PM, xu,huilong wrote:
> sometime print can't get received package info, used self.dut.get_session_output() replace
> self.dut.send_expect("\n", "testpmd>") get received package info
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
> tests/TestSuite_queue_start_stop.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py
> index 83504ab..f59333c 100644
> --- a/tests/TestSuite_queue_start_stop.py
> +++ b/tests/TestSuite_queue_start_stop.py
> @@ -164,7 +164,7 @@ class TestQueueStartStop(TestCase):
> self.dut.send_expect("port 1 txq 0 stop", "testpmd>")
> self.dut.send_expect("start", "testpmd>")
> self.check_forwarding([0, 1], self.nic, received=False)
> - out = self.dut.send_expect("\n", "testpmd>")
> + out = self.dut.get_session_output()
> except Exception, e:
> raise IOError("queue start/stop forward failure: %s" % e)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device
@ 2015-10-27 6:07 Raslan Darawsheh
2015-10-27 6:07 ` [dts] [PATCH] fix queue start/stop case failed Raslan Darawsheh
0 siblings, 1 reply; 3+ messages in thread
From: Raslan Darawsheh @ 2015-10-27 6:07 UTC (permalink / raw)
To: dts; +Cc: rdarawsheh
From: Raslsn Darawsheh <rdarawsheh@asaltech.com>
Signed-off-by: Raslsn Darawsheh <rdarawsheh@asaltech.com>
---
framework/crb.py | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/framework/crb.py b/framework/crb.py
index fcbd7d9..0acec3b 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -33,7 +33,7 @@ import time
import dts
import re
import os
-from settings import TIMEOUT, IXIA
+from settings import TIMEOUT, IXIA, NICS
"""
CRB (customer reference board) basic functions and handlers
@@ -54,6 +54,9 @@ class Crb(object):
self.skip_setup = False
self.serializer = serializer
self.ports_info = None
+ self.isMellanox = False
+ self.mellanoxPortCount = 0
+ self.mellanoxCardType = None
def send_expect(self, cmds, expected, timeout=TIMEOUT,
alt_session=False, verify=False):
@@ -79,6 +82,19 @@ class Crb(object):
return self.session.send_command(cmds, timeout)
+ def check_Mellanox_pci(self,pci_bus,pci_id):
+ """
+ check if the PCI is Mellanox device or not
+ its used to set a flag to handle Mellanox ports differently
+ """
+ out = self.send_expect("lspci -nn | grep -i " + pci_bus, "# ")
+ if "Mell" in out:
+ self.isMellanox =True
+ if NICS['ConnectX_4'] in out:
+ self.mellanoxCardType = "cx4"
+ else:
+ self.mellanoxCardType = "cx3"
+
def get_session_output(self, timeout=TIMEOUT):
"""
Get session output message before timeout
@@ -196,6 +212,11 @@ class Crb(object):
rexp = r"([\da-f]{2}:[\da-f]{2}.\d{1}) .*Eth.*?ernet .*?([\da-f]{4}:[\da-f]{4})"
pattern = re.compile(rexp)
match = pattern.findall(out)
+ out = self.send_expect(
+ "lspci -nn ", "# ", alt_session=True)
+ rexp = r"([\da-f]{2}:[\da-f]{2}.\d{1}) Network .*?([\da-f]{4}:[\da-f]{4})"
+ pattern = re.compile(rexp)
+ match += pattern.findall(out)
self.pci_devices_info = []
for i in range(len(match)):
self.pci_devices_info.append((match[i][0], match[i][1]))
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH] fix queue start/stop case failed
2015-10-27 6:07 [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device Raslan Darawsheh
@ 2015-10-27 6:07 ` Raslan Darawsheh
0 siblings, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2015-10-27 6:07 UTC (permalink / raw)
To: dts; +Cc: rdarawsheh
From: "xu,huilong" <huilongx.xu@intel.com>
sometime print can't get received package info, used self.dut.get_session_output() replace
self.dut.send_expect("\n", "testpmd>") get received package info
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_queue_start_stop.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py
index 83504ab..f59333c 100644
--- a/tests/TestSuite_queue_start_stop.py
+++ b/tests/TestSuite_queue_start_stop.py
@@ -164,7 +164,7 @@ class TestQueueStartStop(TestCase):
self.dut.send_expect("port 1 txq 0 stop", "testpmd>")
self.dut.send_expect("start", "testpmd>")
self.check_forwarding([0, 1], self.nic, received=False)
- out = self.dut.send_expect("\n", "testpmd>")
+ out = self.dut.get_session_output()
except Exception, e:
raise IOError("queue start/stop forward failure: %s" % e)
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-27 6:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-23 7:55 [dts] [PATCH] fix queue start/stop case failed xu,huilong
2015-10-23 8:06 ` Liu, Yong
2015-10-27 6:07 [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device Raslan Darawsheh
2015-10-27 6:07 ` [dts] [PATCH] fix queue start/stop case failed Raslan Darawsheh
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).