[V1] virtio_pvp_regression: add retry when get dpdk promte to avoid print sequence issue
diff mbox series

Message ID 20200728030043.256733-1-qimaix.xiao@intel.com
State New
Headers show
Series
  • [V1] virtio_pvp_regression: add retry when get dpdk promte to avoid print sequence issue
Related show

Commit Message

Xiao, QimaiX July 28, 2020, 3 a.m. UTC
*. dpdk promte 'testpmd> ' might be misspelled when print 

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_virtio_pvp_regression.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/tests/TestSuite_virtio_pvp_regression.py b/tests/TestSuite_virtio_pvp_regression.py
index 225fc35..942c924 100644
--- a/tests/TestSuite_virtio_pvp_regression.py
+++ b/tests/TestSuite_virtio_pvp_regression.py
@@ -257,7 +257,14 @@  class TestVirtioPVPRegression(TestCase):
         command_line_client = testcmd + eal_params + para
         self.vhost.send_expect(command_line_client, "testpmd> ", 30)
         self.vhost.send_expect("set fwd mac", "testpmd> ", 30)
-        self.vhost.send_expect("start", "testpmd> ", 30)
+        try:
+            self.vhost.send_expect("start", "testpmd> ", 30)
+        except Exception as e:
+            self.logger.warning(e)
+            self.logger.info('dpdk prompt testpmd> may not be printed correctly, add retry')
+            time.sleep(2)
+            self.vhost.send_expect('', 'testpmd> ', timeout=1)
+
 
     def start_testpmd_in_vm(self, virtio_path):
         """