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 E1042A0487 for ; Tue, 30 Jul 2019 03:38:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96AED1BF86; Tue, 30 Jul 2019 03:38:00 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 37DE71BF62 for ; Tue, 30 Jul 2019 03:37:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2019 18:37:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,324,1559545200"; d="scan'208";a="346839310" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 29 Jul 2019 18:37:57 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 29 Jul 2019 18:37:57 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 29 Jul 2019 18:37:57 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by shsmsx102.ccr.corp.intel.com ([169.254.2.19]) with mapi id 14.03.0439.000; Tue, 30 Jul 2019 09:37:55 +0800 From: "Wu, ChangqingX" To: "Ma, LihongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Thread-Index: AQHVRa7qB3UqELd+SUm/j1OoAz1/j6bgm0OAgACHSRCAALhmgIAAhy8Q Date: Tue, 30 Jul 2019 01:37:54 +0000 Message-ID: <7F81DD3887C58F49A6B2EFEC3C28E22E0B73DD4F@SHSMSX101.ccr.corp.intel.com> References: <1564364835-115171-1-git-send-email-changqingx.wu@intel.com> <7F81DD3887C58F49A6B2EFEC3C28E22E0B73D8CB@SHSMSX101.ccr.corp.intel.com> In-Reply-To: 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" All right. Thanks for your advice, I will keep on attempt to resolve it using command of freebsd. Thanks. Changqingx -----Original Message----- From: Ma, LihongX=20 Sent: Tuesday, July 30, 2019 9:29 AM To: Wu, ChangqingX ; dts@dpdk.org Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff fre= ebsd 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 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