From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 21359A00E6 for ; Mon, 13 May 2019 09:49:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE9363253; Mon, 13 May 2019 09:49:29 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 662842BBE for ; Mon, 13 May 2019 09:49:28 +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 fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2019 00:49:27 -0700 X-ExtLoop1: 1 Received: from ubuntu.sh.intel.com ([10.67.118.150]) by orsmga007.jf.intel.com with ESMTP; 13 May 2019 00:49:26 -0700 From: lihong To: dts@dpdk.org Cc: lihong Date: Mon, 13 May 2019 08:29:04 +0800 Message-Id: <1557707344-5420-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [patch V1] alter the regular expression format of hostfwd value 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" Signed-off-by: lihong --- framework/qemu_kvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index c3e8f37..80a39c8 100644 --- a/framework/qemu_kvm.py +++ b/framework/qemu_kvm.py @@ -562,7 +562,7 @@ class QEMUKvm(VirtBase): Use regular expression to check if hostfwd value format is correct. """ regx_ip = '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' - regx_hostfwd = r'["tcp" | "udp"]?:%s?:\d+-%s?:\d+' % (regx_ip, regx_ip) + regx_hostfwd = r'(tcp|udp)?:(%s)?:\d+-(%s)?:\d+' % (regx_ip, regx_ip) if not re.match(regx_hostfwd, opt_hostfwd): raise Exception("Option opt_hostfwd format is not correct,\n" + "it is %s,\n " % opt_hostfwd + -- 2.7.4