From: "zhang,yan" <yanx.a.zhang@intel.com>
To: dts@dpdk.org
Cc: "zhang,yan" <yanx.a.zhang@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_vm_hotplug:Optimize scripts and enable scripts to support more NICs
Date: Thu, 10 Oct 2019 10:12:12 +0800 [thread overview]
Message-ID: <1570673532-49057-1-git-send-email-yanx.a.zhang@intel.com> (raw)
Optimize scripts and enable scripts to support more NICs.
Signed-off-by: zhang,yan <yanx.a.zhang@intel.com>
---
tests/TestSuite_vm_hotplug.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_vm_hotplug.py b/tests/TestSuite_vm_hotplug.py
index 87edad6..438f404 100644
--- a/tests/TestSuite_vm_hotplug.py
+++ b/tests/TestSuite_vm_hotplug.py
@@ -36,7 +36,7 @@ DPDK Test suite.
Test some vm hotplug function with vfio
"""
-
+import os
import re
import time
from qemu_kvm import QEMUKvm
@@ -138,6 +138,9 @@ class TestVmHotplug(TestCase):
except Exception, EnvironmentError:
pass
if '10.0.2' in out:
+ pos = self.vm0.hostfwd_addr.find(':')
+ ssh_key = '[' + self.vm0.hostfwd_addr[:pos] + ']' + self.vm0.hostfwd_addr[pos:]
+ os.system('ssh-keygen -R %s' % ssh_key)
break
time.sleep(1)
cur_time = time.time()
@@ -276,8 +279,12 @@ class TestVmHotplug(TestCase):
def check_vf_device(self, has_device=True, device=1):
time.sleep(1)
sign = 'Connection'
- if self.nic.startswith('fortville'):
+ lis1 = ['fortville_spirit', 'fortville_eagle']
+ lis2 = ['fortpark_TLV', 'fortville_25g']
+ if self.nic in lis1:
sign = 'Ethernet'
+ elif self.nic in lis2:
+ sign = 'Device'
out = self.vm_session.send_expect('./usertools/dpdk-devbind.py -s | grep %s' % sign, '#')
time.sleep(2)
if has_device:
--
2.17.2
next reply other threads:[~2019-10-10 2:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 2:12 zhang,yan [this message]
2019-10-10 2:08 ` Yao, BingX Y
2019-10-12 5:59 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1570673532-49057-1-git-send-email-yanx.a.zhang@intel.com \
--to=yanx.a.zhang@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).