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 7A13DA00E6 for ; Wed, 10 Jul 2019 04:07:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6232B2AB; Wed, 10 Jul 2019 04:07:56 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 2A318160 for ; Wed, 10 Jul 2019 04:07:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 19:07:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,472,1557212400"; d="scan'208";a="156357398" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 09 Jul 2019 19:07:48 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jul 2019 19:07:30 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 9 Jul 2019 19:07:29 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 9 Jul 2019 19:07:29 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by shsmsx102.ccr.corp.intel.com ([169.254.2.3]) with mapi id 14.03.0439.000; Wed, 10 Jul 2019 10:07:27 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] tests/vhost_event_idx_interrupt: add verify of qemu version Thread-Index: AQHVNhcl2b6ewRl480uE8hM0Mj320KbDHDKQ Date: Wed, 10 Jul 2019 02:07:27 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BADE682@SHSMSX101.ccr.corp.intel.com> References: <1562623553-24007-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1562623553-24007-1-git-send-email-lihongx.ma@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGZhMjUwMmItOWQ4NC00MmI0LTljODAtZTU0YjZiMmUzOThlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiU1N5VjU2UXIxbUQyZTBFK1dzTUdsSlFsT2JzNGQrdWJLODE5cDZ0RVNTeUpLcHN0dWNaaU9iMkpFeG1ZZFBpbCJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/vhost_event_idx_interrupt: add verify of qemu version 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong > Sent: Tuesday, July 9, 2019 6:06 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1] tests/vhost_event_idx_interrupt: add verify of > qemu version >=20 > in this suite, the qemu will start as server mode, and qemu supports serv= er > mode starting with version 2.7 >=20 > Signed-off-by: lihong > --- > tests/TestSuite_vhost_event_idx_interrupt.py | 22 > ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) >=20 > diff --git a/tests/TestSuite_vhost_event_idx_interrupt.py > b/tests/TestSuite_vhost_event_idx_interrupt.py > index 4df5a42..24cd066 100644 > --- a/tests/TestSuite_vhost_event_idx_interrupt.py > +++ b/tests/TestSuite_vhost_event_idx_interrupt.py > @@ -36,6 +36,7 @@ Vhost event idx interrupt need test with l3fwd-power > sample >=20 > import utils > import time > +import re > from virt_common import VM > from test_case import TestCase >=20 > @@ -136,6 +137,26 @@ class TestVhostEventIdxInterrupt(TestCase): > if vm_config.params[i].keys()[0] =3D=3D 'cpu': > vm_config.params[i]['cpu'][0]['number'] =3D self.queues >=20 > + def check_qemu_version(self, vm_config): > + """ > + in this suite, the qemu version should greater 2.7 > + """ > + self.vm_qemu_version =3D vm_config.qemu_emulator > + params_number =3D len(vm_config.params) > + for i in range(params_number): > + if vm_config.params[i].keys()[0] =3D=3D 'qemu': > + self.vm_qemu_version =3D > + vm_config.params[i]['qemu'][0]['path'] > + > + out =3D self.dut.send_expect("%s --version" % self.vm_qemu_versi= on, "#") > + result =3D re.search("QEMU\s*emulator\s*version\s*(\d*.\d*)", ou= t) > + self.verify(result is not None, > + 'the qemu path may be not right: %s' % self.vm_qemu_vers= ion) > + version =3D result.group(1) > + index =3D version.find('.') > + self.verify(int(version[:index])>2 or (int(version[:index])=3D= =3D2 and > int(version[index+1:])>=3D7), > + 'This qemu version should greater than 2.7 ' + \ > + 'in this suite, please config it in > + vhost_sample.cfg file') > + > def start_vms(self, vm_num=3D1): > """ > start qemus > @@ -156,6 +177,7 @@ class TestVhostEventIdxInterrupt(TestCase): > vm_params['opt_settings'] =3D opt_args > vm_info.set_vm_device(**vm_params) > self.set_vm_cpu_number(vm_info) > + self.check_qemu_version(vm_info) > vm_dut =3D None > try: > vm_dut =3D vm_info.start(load_config=3DFalse) > -- > 2.7.4