From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B5F17A3160 for ; Thu, 10 Oct 2019 04:07:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 84F701E883; Thu, 10 Oct 2019 04:07:02 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2E4B41E865 for ; Thu, 10 Oct 2019 04:06:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 19:06:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,278,1566889200"; d="scan'208";a="207084177" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 09 Oct 2019 19:06:58 -0700 From: "zhang,yan" To: dts@dpdk.org Cc: "zhang,yan" Date: Thu, 10 Oct 2019 10:12:12 +0800 Message-Id: <1570673532-49057-1-git-send-email-yanx.a.zhang@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/TestSuite_vm_hotplug:Optimize scripts and enable scripts to support more NICs X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Optimize scripts and enable scripts to support more NICs. Signed-off-by: zhang,yan --- 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