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 EC4A0A0487 for ; Tue, 30 Jul 2019 03:29:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B499B1BF86; Tue, 30 Jul 2019 03:29:28 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 143751BF62 for ; Tue, 30 Jul 2019 03:29:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2019 18:29:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,324,1559545200"; d="scan'208";a="199959020" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 29 Jul 2019 18:29:25 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 29 Jul 2019 18:29:25 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 29 Jul 2019 18:29:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 29 Jul 2019 18:29:24 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.250]) with mapi id 14.03.0439.000; Tue, 30 Jul 2019 09:29:22 +0800 From: "Ma, LihongX" To: "Wu, ChangqingX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Thread-Index: AQHVRa7xphsNhuTfkk2NVSAWsS6Mu6bhILqQ//9/P4CAAcCHQA== Date: Tue, 30 Jul 2019 01:29:21 +0000 Message-ID: References: <1564364835-115171-1-git-send-email-changqingx.wu@intel.com> <7F81DD3887C58F49A6B2EFEC3C28E22E0B73D8CB@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <7F81DD3887C58F49A6B2EFEC3C28E22E0B73D8CB@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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/ipfrag: sed and regex of linux diff freebsd 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" I think you should expend some time on this to find a better solution, this= solution is not a reasonable plan. -----Original Message----- From: Wu, ChangqingX=20 Sent: Monday, July 29, 2019 2:42 PM To: Ma, LihongX ; dts@dpdk.org Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff fre= ebsd 1. this path: 0001-fix-ipfrag-failed-on-freeBSD.patch is still on local, wa= s not yet submitted to dts. 2. the command: " sed -i ..." cannot success when it was executed on freebs= d, and did not find the relevant command to directly use "sed" to reach the= purpose of replacement for freebsd thanks. changqingx -----Original Message----- From: Ma, LihongX Sent: Monday, July 29, 2019 2:25 PM To: Wu, ChangqingX ; dts@dpdk.org Cc: Wu, ChangqingX Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff fre= ebsd Hi, changing Where the 0001-fix-ipfrag-failed-on-freeBSD.patch ? And why use the patch f= ile instead of the command ? -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of changqingxwu Sent: Monday, July 29, 2019 9:47 AM To: dts@dpdk.org Cc: Wu, ChangqingX Subject: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Signed-off-by: changqingxwu --- tests/TestSuite_ipfrag.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py index f6= d0373..9d2a97d 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -116,8 +116,15 @@ l3fwd_ipv4_route_array[] =3D {\\\n" rtLpmTbl[idx] =3D pat.sub(self.portRepl, rtLpmTbl[idx]) lpmStr_ipv6 =3D lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n= " lpmStr_ipv6 =3D lpmStr_ipv6 + "};" - self.dut.send_expect(r"sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\= }\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv4, "# ") - self.dut.send_expect(r"sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\= }\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + + if self.dut.get_os_type() =3D=3D "freebsd": + filename =3D "conf/0001-fix-ipfrag-failed-on-freeBSD.patch" + self.dut.session.copy_file_to(filename, self.dut.base_dir) + self.dut.send_expect("git apply 0001-fix-ipfrag-failed-on-free= BSD.patch", "#") + else: + self.dut.send_expect(r"sed -i '/l3fwd_ipv4_route_array\[\].*{/= ,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv4, "# ") + self.dut.send_expect(r"sed -i=20 + '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' + examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + # make application out =3D self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") -- 2.17.2