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 DDD5FA0487 for ; Mon, 29 Jul 2019 08:25:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ADC341BED8; Mon, 29 Jul 2019 08:25:15 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5C10A1BEC9 for ; Mon, 29 Jul 2019 08:25:13 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jul 2019 23:25:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,321,1559545200"; d="scan'208";a="173131845" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 28 Jul 2019 23:25:12 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 28 Jul 2019 23:25:11 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 28 Jul 2019 23:25:11 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.65]) with mapi id 14.03.0439.000; Mon, 29 Jul 2019 14:25:10 +0800 From: "Ma, LihongX" To: "Wu, ChangqingX" , "dts@dpdk.org" CC: "Wu, ChangqingX" Thread-Topic: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Thread-Index: AQHVRa7xphsNhuTfkk2NVSAWsS6Mu6bhILqQ Date: Mon, 29 Jul 2019 06:25:09 +0000 Message-ID: References: <1564364835-115171-1-git-send-email-changqingx.wu@intel.com> In-Reply-To: <1564364835-115171-1-git-send-email-changqingx.wu@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" 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'=20 + 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