[dts] [PATCH] try fix scatter case failed

Liu, Yong yong.liu at intel.com
Wed Nov 4 08:01:41 CET 2015


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 at 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, "#")



More information about the dts mailing list