[dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time

Li, WenjieX A wenjiex.a.li at intel.com
Tue Nov 26 09:34:05 CET 2019


Tested-by: Li, WenjieX A <wenjiex.a.li at intel.com>

> -----Original Message-----
> From: Li, WenjieX A
> Sent: Wednesday, November 27, 2019 1:19 AM
> To: dts at dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li at intel.com>
> Subject: [dts][PATCH V1] tests/interrupt_pmd: reduce the execution time
> 
> It is unnecessary to start/close scapy when sending every packet.
> The execution time could be reduced to 1 minute from 9.
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li at intel.com>
> ---
>  tests/TestSuite_interrupt_pmd.py | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_interrupt_pmd.py
> b/tests/TestSuite_interrupt_pmd.py
> index a0467bd..4e99cf4 100644
> --- a/tests/TestSuite_interrupt_pmd.py
> +++ b/tests/TestSuite_interrupt_pmd.py
> @@ -106,19 +106,20 @@ class TestInterruptPmd(TestCase):
>          """
>          Send a packet to port
>          """
> +        self.tester.send_expect("scapy", ">>>", 30)
>          for i in range(len(self.dut_ports[:portnum])):
>              for j in range(num):
>                  txport = self.tester.get_local_port(self.dut_ports[i])
>                  mac = self.dut.get_mac_address(self.dut_ports[i])
>                  txItf = self.tester.get_interface(txport)
> -                self.tester.scapy_append(
> -                    'sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)],
> iface="%s")' % (j, txItf))
> -                self.tester.scapy_execute()
> +
> self.tester.send_expect('sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*1
> 8)], iface="%s")' % (j, txItf), ">>>")
> +        self.tester.send_expect("quit()", "#", 30)
> 
>      def tear_down(self):
>          """
>          Run after each test case.
>          """
> +        self.dut.kill_all()
>          pass
> 
>      def tear_down_all(self):
> --
> 2.17.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestInterruptPmd.log
Type: application/octet-stream
Size: 60586 bytes
Desc: TestInterruptPmd.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20191126/66ec30ee/attachment.obj>


More information about the dts mailing list