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 7A982A0352; Thu, 16 Jan 2020 09:58:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F81C1C1AE; Thu, 16 Jan 2020 09:58:23 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E4D851BF30 for ; Thu, 16 Jan 2020 09:58:21 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2020 00:58:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,325,1574150400"; d="scan'208";a="425435156" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 16 Jan 2020 00:58:21 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jan 2020 00:58:20 -0800 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jan 2020 00:58:20 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.30]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.28]) with mapi id 14.03.0439.000; Thu, 16 Jan 2020 16:58:19 +0800 From: "Tu, Lijuan" To: "Zhao, XinfengX" , "dts@dpdk.org" CC: "Zhao, XinfengX" Thread-Topic: [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error Thread-Index: AQHVzEIPdUVd7Qzp9UyFBtPpkck9U6fs/aFQ Date: Thu, 16 Jan 2020 08:58:17 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBAB915@SHSMSX101.ccr.corp.intel.com> References: <20200115223300.21661-1-xinfengx.zhao@intel.com> In-Reply-To: <20200115223300.21661-1-xinfengx.zhao@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.2.0.6 dlp-reaction: no-action 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 1/3] framework: fix the issues of dts rerun error and writing error 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 the series > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xinfengx > Sent: Thursday, January 16, 2020 6:33 AM > To: dts@dpdk.org > Cc: Zhao, XinfengX > Subject: [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun erro= r and > writing error >=20 > Signed-off-by: xinfengx > --- > framework/dts.py | 1 + > framework/qemu_libvirt.py | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/framework/dts.py b/framework/dts.py index 5941b37..afe44b4 > 100644 > --- a/framework/dts.py > +++ b/framework/dts.py > @@ -523,6 +523,7 @@ def run_all(config_file, pkgName, git, patch, > skip_setup, > if verbose is True: > logger.set_verbose() >=20 > + re_run =3D int(re_run) > if re_run < 0: > re_run =3D 0 >=20 > diff --git a/framework/qemu_libvirt.py b/framework/qemu_libvirt.py index > 5e34590..e0aeb6c 100644 > --- a/framework/qemu_libvirt.py > +++ b/framework/qemu_libvirt.py > @@ -788,11 +788,11 @@ class LibvirtKvm(VirtBase): > if os.path.exists(xml_file): > os.remove(xml_file) > self.root.write(xml_file) > - with open(xml_file, 'rb') as fp: > + with open(xml_file, 'r') as fp: > content =3D fp.read() > doc =3D minidom.parseString(content) > vm_content =3D doc.toprettyxml(indent=3D' ') > - with open(xml_file, 'wb') as fp: > + with open(xml_file, 'w') as fp: > fp.write(vm_content) > self.host_session.copy_file_to(xml_file) > time.sleep(2) > -- > 2.17.1