From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 79C64A0093; Fri, 14 Jan 2022 06:08:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4561142759; Fri, 14 Jan 2022 06:08:56 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id CA84140DDD for ; Fri, 14 Jan 2022 06:08:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642136935; x=1673672935; h=from:to:cc:subject:date:message-id; bh=6HiojYw/4ew1UFrSNHWYD7nyqkhZs+n1tohaHNN2QFk=; b=X55xqOMbMR56T9kHZxqKdjE+jRSiHaP8ulxjzObyREPP/7co4Ls4fs81 j8U0aeBxcGsf5T6QkK5z+Y0erJ+I2oW6DGrRL322cbssQ6K5znUvM5DyQ izYNs7qK666YteZ47pEowmTxbxrY9zeaPhuwG6ka+6vkWSczQUoPs9a42 swWHh0INnEQ5bo6bjNu1L3BCYIk5qFy44i3ZM1ulYKoDa6gDAdA1nVYh5 fpJZAlZSSGiUGCdB8E1pV+p4H1VmGwLkWwzP1SvXHEk8ebSX0sok2yKR9 xZnPEzWr2fqkgpKl4l+x6mcfeNoT2X63jchMSmsrYn85g5s9omXeDH3hJ A==; X-IronPort-AV: E=McAfee;i="6200,9189,10226"; a="330533361" X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="330533361" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 21:08:53 -0800 X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="670747451" Received: from unknown (HELO localhost.localdomain) ([10.239.251.94]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 21:08:52 -0800 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATH V1] framework/crb: optimization script Date: Fri, 14 Jan 2022 13:38:04 +0000 Message-Id: <20220114133804.18796-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 the format of priv-flags may be like 'link-down-on-close: on', so regular expressions need to be optimized Signed-off-by: Jiale Song --- framework/crb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 framework/crb.py diff --git a/framework/crb.py b/framework/crb.py old mode 100755 new mode 100644 index bd4f565d..c33edf14 --- a/framework/crb.py +++ b/framework/crb.py @@ -900,7 +900,7 @@ class Crb(object): ''' check_flag = "ethtool --show-priv-flags %s" % intf out = self.send_expect(check_flag, "# ", timeout) - p = re.compile('%s\s+:\s+(\w+)' % flag) + p = re.compile('%s\s*:\s+(\w+)' % flag) state = re.search(p, out) if state: return state.group(1) -- 2.17.1