test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] try fix scatter case failed
@ 2015-11-04  6:44 xu,huilong
  2015-11-04  7:01 ` Liu, Yong
  0 siblings, 1 reply; 5+ messages in thread
From: xu,huilong @ 2015-11-04  6:44 UTC (permalink / raw)
  To: dts

form log, it looks the cat result.txt failed, so add a sleep for python close file.

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 tests/TestSuite_scatter.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
index 1bec2c8..7a49b53 100644
--- a/tests/TestSuite_scatter.py
+++ b/tests/TestSuite_scatter.py
@@ -36,6 +36,7 @@ Test Scattered Packets.
 import dts
 from test_case import TestCase
 from pmd_output import PmdOutput
+import time
 #
 #
 # Test class.
@@ -85,6 +86,7 @@ class TestScatter(TestCase):
         self.tester.scapy_append(
             'sendp([Ether(src="%s",dst="%s")/IP(len=%s)/Raw(load="\x50"*%s)], iface="%s")' % (smac, dmac,pktlen, padding, sintf))
         self.tester.scapy_execute()
+        time.sleep(5)
         res = self.tester.scapy_get_result()
         self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")
         self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")
-- 
1.9.3

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

* Re: [dts] [PATCH] try fix scatter case failed
  2015-11-04  6:44 [dts] [PATCH] try fix scatter case failed xu,huilong
@ 2015-11-04  7:01 ` Liu, Yong
  2015-11-04  7:37   ` Xu, HuilongX
  0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2015-11-04  7:01 UTC (permalink / raw)
  To: xu,huilong, dts

Hi Huilong,
This issue look like that need wait for few seconds before scapy write 
the write value.
My question is that should we enlarge the timeout value in function 
scapy_execute()?

On 11/04/2015 02:44 PM, xu,huilong wrote:
> form log, it looks the cat result.txt failed, so add a sleep for python close file.
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
>   tests/TestSuite_scatter.py | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
> index 1bec2c8..7a49b53 100644
> --- a/tests/TestSuite_scatter.py
> +++ b/tests/TestSuite_scatter.py
> @@ -36,6 +36,7 @@ Test Scattered Packets.
>   import dts
>   from test_case import TestCase
>   from pmd_output import PmdOutput
> +import time
>   #
>   #
>   # Test class.
> @@ -85,6 +86,7 @@ class TestScatter(TestCase):
>           self.tester.scapy_append(
>               'sendp([Ether(src="%s",dst="%s")/IP(len=%s)/Raw(load="\x50"*%s)], iface="%s")' % (smac, dmac,pktlen, padding, sintf))
>           self.tester.scapy_execute()
> +        time.sleep(5)
>           res = self.tester.scapy_get_result()
>           self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")
>           self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")

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

* Re: [dts] [PATCH] try fix scatter case failed
  2015-11-04  7:01 ` Liu, Yong
@ 2015-11-04  7:37   ` Xu, HuilongX
  2015-11-04  7:58     ` Liu, Yong
  0 siblings, 1 reply; 5+ messages in thread
From: Xu, HuilongX @ 2015-11-04  7:37 UTC (permalink / raw)
  To: Liu, Yong, dts

Hi yong,
The default timeout value is 60s in function scapy_execute, I think not need enlarge timeout value.
In scatter case, I check the log find issue, but I'am not sure it can fix when sleep 5 seconds, but it work normal on my test environment, although run many test suites
Thanks a lot 

> -----Original Message-----
> From: Liu, Yong
> Sent: Wednesday, November 04, 2015 3:02 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: Re: [dts] [PATCH] try fix scatter case failed
> 
> Hi Huilong,
> This issue look like that need wait for few seconds before scapy write
> the write value.
> My question is that should we enlarge the timeout value in function
> scapy_execute()?
> 
> On 11/04/2015 02:44 PM, xu,huilong wrote:
> > form log, it looks the cat result.txt failed, so add a sleep for python
> close file.
> >
> > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > ---
> >   tests/TestSuite_scatter.py | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
> > index 1bec2c8..7a49b53 100644
> > --- a/tests/TestSuite_scatter.py
> > +++ b/tests/TestSuite_scatter.py
> > @@ -36,6 +36,7 @@ Test Scattered Packets.
> >   import dts
> >   from test_case import TestCase
> >   from pmd_output import PmdOutput
> > +import time
> >   #
> >   #
> >   # Test class.
> > @@ -85,6 +86,7 @@ class TestScatter(TestCase):
> >           self.tester.scapy_append(
> >
> 'sendp([Ether(src="%s",dst="%s")/IP(len=%s)/Raw(load="\x50"*%s)],
> iface="%s")' % (smac, dmac,pktlen, padding, sintf))
> >           self.tester.scapy_execute()
> > +        time.sleep(5)
> >           res = self.tester.scapy_get_result()
> >           self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")
> >           self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")

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

* Re: [dts] [PATCH] try fix scatter case failed
  2015-11-04  7:37   ` Xu, HuilongX
@ 2015-11-04  7:58     ` Liu, Yong
  2015-11-04  8:10       ` Xu, HuilongX
  0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2015-11-04  7:58 UTC (permalink / raw)
  To: Xu, HuilongX, dts

Huilong,
The timeout 60s is for foreground commands. You can see in scapy_execute function, dts only wait two seconds after all commands.
I mean whether we should enlarge the timeout value here.

Maybe you can try your solution on more platforms to make sure it can work.

> -----Original Message-----
> From: Xu, HuilongX
> Sent: Wednesday, November 04, 2015 3:37 PM
> To: Liu, Yong; dts@dpdk.org
> Subject: RE: [dts] [PATCH] try fix scatter case failed
> 
> Hi yong,
> The default timeout value is 60s in function scapy_execute, I think not
> need enlarge timeout value.
> In scatter case, I check the log find issue, but I'am not sure it can fix
> when sleep 5 seconds, but it work normal on my test environment, although
> run many test suites
> Thanks a lot
> 
> > -----Original Message-----
> > From: Liu, Yong
> > Sent: Wednesday, November 04, 2015 3:02 PM
> > To: Xu, HuilongX; dts@dpdk.org
> > Subject: Re: [dts] [PATCH] try fix scatter case failed
> >
> > Hi Huilong,
> > This issue look like that need wait for few seconds before scapy write
> > the write value.
> > My question is that should we enlarge the timeout value in function
> > scapy_execute()?
> >
> > On 11/04/2015 02:44 PM, xu,huilong wrote:
> > > form log, it looks the cat result.txt failed, so add a sleep for
> python
> > close file.
> > >
> > > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > > ---
> > >   tests/TestSuite_scatter.py | 2 ++
> > >   1 file changed, 2 insertions(+)
> > >
> > > diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
> > > index 1bec2c8..7a49b53 100644
> > > --- a/tests/TestSuite_scatter.py
> > > +++ b/tests/TestSuite_scatter.py
> > > @@ -36,6 +36,7 @@ Test Scattered Packets.
> > >   import dts
> > >   from test_case import TestCase
> > >   from pmd_output import PmdOutput
> > > +import time
> > >   #
> > >   #
> > >   # Test class.
> > > @@ -85,6 +86,7 @@ class TestScatter(TestCase):
> > >           self.tester.scapy_append(
> > >
> > 'sendp([Ether(src="%s",dst="%s")/IP(len=%s)/Raw(load="\x50"*%s)],
> > iface="%s")' % (smac, dmac,pktlen, padding, sintf))
> > >           self.tester.scapy_execute()
> > > +        time.sleep(5)
> > >           res = self.tester.scapy_get_result()
> > >           self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")
> > >           self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")

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

* Re: [dts] [PATCH] try fix scatter case failed
  2015-11-04  7:58     ` Liu, Yong
@ 2015-11-04  8:10       ` Xu, HuilongX
  0 siblings, 0 replies; 5+ messages in thread
From: Xu, HuilongX @ 2015-11-04  8:10 UTC (permalink / raw)
  To: Liu, Yong, dts

For exec cmdline timeout is 60s, but wait python process exit only 2 seconds, so add python process exit time,
I think it ok, I will send v2 patch.
Thanks  a lot
> -----Original Message-----
> From: Liu, Yong
> Sent: Wednesday, November 04, 2015 3:58 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: RE: [dts] [PATCH] try fix scatter case failed
> 
> Huilong,
> The timeout 60s is for foreground commands. You can see in scapy_execute
> function, dts only wait two seconds after all commands.
> I mean whether we should enlarge the timeout value here.
> 
> Maybe you can try your solution on more platforms to make sure it can work.
> 
> > -----Original Message-----
> > From: Xu, HuilongX
> > Sent: Wednesday, November 04, 2015 3:37 PM
> > To: Liu, Yong; dts@dpdk.org
> > Subject: RE: [dts] [PATCH] try fix scatter case failed
> >
> > Hi yong,
> > The default timeout value is 60s in function scapy_execute, I think not
> > need enlarge timeout value.
> > In scatter case, I check the log find issue, but I'am not sure it can
> fix
> > when sleep 5 seconds, but it work normal on my test environment,
> although
> > run many test suites
> > Thanks a lot
> >
> > > -----Original Message-----
> > > From: Liu, Yong
> > > Sent: Wednesday, November 04, 2015 3:02 PM
> > > To: Xu, HuilongX; dts@dpdk.org
> > > Subject: Re: [dts] [PATCH] try fix scatter case failed
> > >
> > > Hi Huilong,
> > > This issue look like that need wait for few seconds before scapy write
> > > the write value.
> > > My question is that should we enlarge the timeout value in function
> > > scapy_execute()?
> > >
> > > On 11/04/2015 02:44 PM, xu,huilong wrote:
> > > > form log, it looks the cat result.txt failed, so add a sleep for
> > python
> > > close file.
> > > >
> > > > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > > > ---
> > > >   tests/TestSuite_scatter.py | 2 ++
> > > >   1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
> > > > index 1bec2c8..7a49b53 100644
> > > > --- a/tests/TestSuite_scatter.py
> > > > +++ b/tests/TestSuite_scatter.py
> > > > @@ -36,6 +36,7 @@ Test Scattered Packets.
> > > >   import dts
> > > >   from test_case import TestCase
> > > >   from pmd_output import PmdOutput
> > > > +import time
> > > >   #
> > > >   #
> > > >   # Test class.
> > > > @@ -85,6 +86,7 @@ class TestScatter(TestCase):
> > > >           self.tester.scapy_append(
> > > >
> > > 'sendp([Ether(src="%s",dst="%s")/IP(len=%s)/Raw(load="\x50"*%s)],
> > > iface="%s")' % (smac, dmac,pktlen, padding, sintf))
> > > >           self.tester.scapy_execute()
> > > > +        time.sleep(5)
> > > >           res = self.tester.scapy_get_result()
> > > >           self.tester.send_expect("ifconfig %s mtu 1500" % sintf,
> "#")
> > > >           self.tester.send_expect("ifconfig %s mtu 1500" % sintf,
> "#")

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

end of thread, other threads:[~2015-11-04  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-04  6:44 [dts] [PATCH] try fix scatter case failed xu,huilong
2015-11-04  7:01 ` Liu, Yong
2015-11-04  7:37   ` Xu, HuilongX
2015-11-04  7:58     ` Liu, Yong
2015-11-04  8:10       ` Xu, HuilongX

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).