[V1] framework/pmd_output: add timeout parameter for start_pmd method

Message ID 20210409122548.31485-1-qinx.sun@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] framework/pmd_output: add timeout parameter for start_pmd method |

Commit Message

Sun, QinX April 9, 2021, 12:25 p.m. UTC
  some cases start testpmd with 'cmdline-file' may need more than 120 seconds,

so add 'timeout' parameter to support customization and default value still set as 120

Signed-off-by: sunqin <qinx.sun@intel.com>
---
 framework/pmd_output.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Sun, QinX April 12, 2021, 2:19 a.m. UTC | #1
> -----Original Message-----
> From: Sun, QinX <qinx.sun@intel.com>
> Sent: Friday, April 9, 2021 8:26 PM
> To: dts@dpdk.org
> Cc: Sun, QinX <qinx.sun@intel.com>
> Subject: [dts] [PATCH V1] framework/pmd_output: add timeout parameter for start_pmd method

Tested-by: Sun Qin <qinx.sun@intel.com>
  
Zhao, HaiyangX April 12, 2021, 2:22 a.m. UTC | #2
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Sun, QinX
> Sent: Monday, April 12, 2021 10:19
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] framework/pmd_output: add timeout
> parameter for start_pmd method
> 
> > -----Original Message-----
> > From: Sun, QinX <qinx.sun@intel.com>
> > Sent: Friday, April 9, 2021 8:26 PM
> > To: dts@dpdk.org
> > Cc: Sun, QinX <qinx.sun@intel.com>
> > Subject: [dts] [PATCH V1] framework/pmd_output: add timeout
> parameter for start_pmd method
> 
> Tested-by: Sun Qin <qinx.sun@intel.com>

Acked-by: Haiyang Zhao <haiyangx.zhao@intel.com>
  
Tu, Lijuan April 12, 2021, 5:48 a.m. UTC | #3
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Zhao, HaiyangX
> Sent: 2021年4月12日 10:22
> To: Sun, QinX <qinx.sun@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] framework/pmd_output: add timeout parameter
> for start_pmd method
> 
> 
> 
> > -----Original Message-----
> > From: dts <dts-bounces@dpdk.org> On Behalf Of Sun, QinX
> > Sent: Monday, April 12, 2021 10:19
> > To: dts@dpdk.org
> > Subject: Re: [dts] [PATCH V1] framework/pmd_output: add timeout
> > parameter for start_pmd method
> >
> > > -----Original Message-----
> > > From: Sun, QinX <qinx.sun@intel.com>
> > > Sent: Friday, April 9, 2021 8:26 PM
> > > To: dts@dpdk.org
> > > Cc: Sun, QinX <qinx.sun@intel.com>
> > > Subject: [dts] [PATCH V1] framework/pmd_output: add timeout
> > parameter for start_pmd method
> >
> > Tested-by: Sun Qin <qinx.sun@intel.com>
> 
> Acked-by: Haiyang Zhao <haiyangx.zhao@intel.com>

Applied
  

Patch

diff --git a/framework/pmd_output.py b/framework/pmd_output.py
index 1ad4ce79..838fa0bd 100644
--- a/framework/pmd_output.py
+++ b/framework/pmd_output.py
@@ -148,7 +148,8 @@  class PmdOutput():
         command = command.replace('  ', ' ')
         if self.session != self.dut:
             self.session.send_expect("cd %s" % self.dut.base_dir, "# ")
-        out = self.session.send_expect(command, expected, 120)
+        timeout = config.get('timeout',120)
+        out = self.session.send_expect(command, expected, timeout)
         self.command = command
         # wait 10s to ensure links getting up before test start.
         sleep(10)