test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to new session
@ 2020-09-21  3:30 Chen Linglix
  2020-09-21  3:36 ` Chen, LingliX
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chen Linglix @ 2020-09-21  3:30 UTC (permalink / raw)
  To: dts; +Cc: Chen Linglix

V2:
 -change tester session to new session
V1:
 -Modify sed command

Signed-off-by: Chen Linglix <linglix.chen@intel.com>
---
 tests/TestSuite_ieee1588.py | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py
index 19f17d1..f737c79 100644
--- a/tests/TestSuite_ieee1588.py
+++ b/tests/TestSuite_ieee1588.py
@@ -56,6 +56,7 @@ class TestIeee1588(TestCase):
         # Change the config file to support IEEE1588 and recompile the package.
         self.dut.send_expect(
             "sed -i -e 's/IEEE1588=n$/IEEE1588=y/' config/common_base", "# ", 30)
+        self.dut.set_build_options({'RTE_LIBRTE_IEEE1588': 'y'})
         self.dut.skip_setup = False
         self.dut.build_install_dpdk(self.target)
 
@@ -91,18 +92,20 @@ class TestIeee1588(TestCase):
         port = self.tester.get_local_port(dutPorts[0])
         itf = self.tester.get_interface(port)
 
-        self.tester.send_expect(
-            "tcpdump -i %s -e ether src %s" % (itf, mac), "tcpdump", 20)
         self.send_session = self.tester.create_session('send_session')
+        self.send_session.send_expect(
+            "tcpdump -i %s -e ether src %s" % (itf, mac), "tcpdump", 20)
+
         setattr(self.send_session, 'tmp_file', self.tester.tmp_file)
+        setattr(self.send_session, 'tmp_file', self.tester.get_session_output)
         pkt = Packet(pkt_type='TIMESYNC')
         pkt.config_layer('ether', {'dst': mac})
-        pkt.send_pkt(self.send_session, tx_port=itf)
+        pkt.send_pkt(self.tester, tx_port=itf)
         time.sleep(1)
-        self.send_session.close()
-        out = self.tester.get_session_output(timeout=20)
 
-        self.tester.send_expect("^C", "# ", 20)
+        out = self.send_session.get_session_before(timeout=20)
+        self.send_session.send_expect("^C", "# ", 20)
+        self.send_session.close()
 
         self.verify("0x88f7" in out, "Ether type is not PTP")
 
@@ -171,4 +174,5 @@ class TestIeee1588(TestCase):
         # Restore the config file and recompile the package.
         self.dut.send_expect(
             "sed -i -e 's/IEEE1588=y$/IEEE1588=n/' config/common_base", "# ", 30)
+        self.dut.set_build_options({'RTE_LIBRTE_IEEE1588': 'n'})
         self.dut.build_install_dpdk(self.target)
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to new session
  2020-09-21  3:30 [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to new session Chen Linglix
@ 2020-09-21  3:36 ` Chen, LingliX
  2020-09-22  8:12 ` Ma, LihongX
  2020-09-28  8:40 ` Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: Chen, LingliX @ 2020-09-21  3:36 UTC (permalink / raw)
  To: dts

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

Tested-by:  Chen, LingliX <linglix.chen@intel.com>

Regards,
Chen, LingliX

> -----Original Message-----
> From: Chen, LingliX
> Sent: Monday, September 21, 2020 11:31 AM
> To: dts@dpdk.org
> Cc: Chen, LingliX <linglix.chen@intel.com>
> Subject: [dts][PATCH V2] tests/TestSuite_ieee1588:change tester session to
> new session
> 
> V2:
>  -change tester session to new session
> V1:
>  -Modify sed command

[-- Attachment #2: TestIeee1588.log --]
[-- Type: application/octet-stream, Size: 230395 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to new session
  2020-09-21  3:30 [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to new session Chen Linglix
  2020-09-21  3:36 ` Chen, LingliX
@ 2020-09-22  8:12 ` Ma, LihongX
  2020-09-28  8:40 ` Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: Ma, LihongX @ 2020-09-22  8:12 UTC (permalink / raw)
  To: Chen, LingliX, dts; +Cc: Chen, LingliX

Acked-by: lihongx Ma<lihongx.ma@intel.com>

Regards,
Ma,lihong

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Chen Linglix
> Sent: Monday, September 21, 2020 11:31 AM
> To: dts@dpdk.org
> Cc: Chen, LingliX <linglix.chen@intel.com>
> Subject: [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to
> new session


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to new session
  2020-09-21  3:30 [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to new session Chen Linglix
  2020-09-21  3:36 ` Chen, LingliX
  2020-09-22  8:12 ` Ma, LihongX
@ 2020-09-28  8:40 ` Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2020-09-28  8:40 UTC (permalink / raw)
  To: Chen, LingliX, dts; +Cc: Chen, LingliX

> V2:
>  -change tester session to new session
> V1:
>  -Modify sed command
> 
> Signed-off-by: Chen Linglix <linglix.chen@intel.com>

Applied

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  3:30 [dts] [PATCH V2] tests/TestSuite_ieee1588:change tester session to new session Chen Linglix
2020-09-21  3:36 ` Chen, LingliX
2020-09-22  8:12 ` Ma, LihongX
2020-09-28  8:40 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox