* [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd @ 2019-07-29 1:47 changqingxwu 2019-07-29 6:25 ` Ma, LihongX 0 siblings, 1 reply; 6+ messages in thread From: changqingxwu @ 2019-07-29 1:47 UTC (permalink / raw) To: dts; +Cc: changqingxwu Signed-off-by: changqingxwu <changqingx.wu@intel.com> --- 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 f6d0373..9d2a97d 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -116,8 +116,15 @@ l3fwd_ipv4_route_array[] = {\\\n" rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" lpmStr_ipv6 = 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() == "freebsd": + filename = "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-freeBSD.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 '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + # make application out = self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") -- 2.17.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 2019-07-29 1:47 [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd changqingxwu @ 2019-07-29 6:25 ` Ma, LihongX 2019-07-29 6:42 ` Wu, ChangqingX 0 siblings, 1 reply; 6+ messages in thread From: Ma, LihongX @ 2019-07-29 6:25 UTC (permalink / raw) To: Wu, ChangqingX, dts; +Cc: Wu, ChangqingX Hi, changing Where the 0001-fix-ipfrag-failed-on-freeBSD.patch ? And why use the patch file 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 <changqingx.wu@intel.com> Subject: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Signed-off-by: changqingxwu <changqingx.wu@intel.com> --- 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 f6d0373..9d2a97d 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -116,8 +116,15 @@ l3fwd_ipv4_route_array[] = {\\\n" rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" lpmStr_ipv6 = 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() == "freebsd": + filename = "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-freeBSD.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 + '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' + examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + # make application out = self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") -- 2.17.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 2019-07-29 6:25 ` Ma, LihongX @ 2019-07-29 6:42 ` Wu, ChangqingX 2019-07-30 1:29 ` Ma, LihongX 0 siblings, 1 reply; 6+ messages in thread From: Wu, ChangqingX @ 2019-07-29 6:42 UTC (permalink / raw) To: Ma, LihongX, dts 1. this path: 0001-fix-ipfrag-failed-on-freeBSD.patch is still on local, was not yet submitted to dts. 2. the command: " sed -i ..." cannot success when it was executed on freebsd, 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 <changqingx.wu@intel.com>; dts@dpdk.org Cc: Wu, ChangqingX <changqingx.wu@intel.com> Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Hi, changing Where the 0001-fix-ipfrag-failed-on-freeBSD.patch ? And why use the patch file 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 <changqingx.wu@intel.com> Subject: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Signed-off-by: changqingxwu <changqingx.wu@intel.com> --- 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 f6d0373..9d2a97d 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -116,8 +116,15 @@ l3fwd_ipv4_route_array[] = {\\\n" rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" lpmStr_ipv6 = 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() == "freebsd": + filename = "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-freeBSD.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 + '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' + examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + # make application out = self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") -- 2.17.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 2019-07-29 6:42 ` Wu, ChangqingX @ 2019-07-30 1:29 ` Ma, LihongX 2019-07-30 1:37 ` Wu, ChangqingX 0 siblings, 1 reply; 6+ messages in thread From: Ma, LihongX @ 2019-07-30 1:29 UTC (permalink / raw) To: Wu, ChangqingX, 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 Sent: Monday, July 29, 2019 2:42 PM To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 1. this path: 0001-fix-ipfrag-failed-on-freeBSD.patch is still on local, was not yet submitted to dts. 2. the command: " sed -i ..." cannot success when it was executed on freebsd, 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 <changqingx.wu@intel.com>; dts@dpdk.org Cc: Wu, ChangqingX <changqingx.wu@intel.com> Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Hi, changing Where the 0001-fix-ipfrag-failed-on-freeBSD.patch ? And why use the patch file 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 <changqingx.wu@intel.com> Subject: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Signed-off-by: changqingxwu <changqingx.wu@intel.com> --- 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 f6d0373..9d2a97d 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -116,8 +116,15 @@ l3fwd_ipv4_route_array[] = {\\\n" rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" lpmStr_ipv6 = 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() == "freebsd": + filename = "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-freeBSD.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 + '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' + examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + # make application out = self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") -- 2.17.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 2019-07-30 1:29 ` Ma, LihongX @ 2019-07-30 1:37 ` Wu, ChangqingX 2019-08-06 1:27 ` Wu, ChangqingX 0 siblings, 1 reply; 6+ messages in thread From: Wu, ChangqingX @ 2019-07-30 1:37 UTC (permalink / raw) To: Ma, LihongX, 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 Sent: Tuesday, July 30, 2019 9:29 AM To: Wu, ChangqingX <changqingx.wu@intel.com>; dts@dpdk.org Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 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 <lihongx.ma@intel.com>; dts@dpdk.org Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 1. this path: 0001-fix-ipfrag-failed-on-freeBSD.patch is still on local, was not yet submitted to dts. 2. the command: " sed -i ..." cannot success when it was executed on freebsd, 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 <changqingx.wu@intel.com>; dts@dpdk.org Cc: Wu, ChangqingX <changqingx.wu@intel.com> Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Hi, changing Where the 0001-fix-ipfrag-failed-on-freeBSD.patch ? And why use the patch file 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 <changqingx.wu@intel.com> Subject: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Signed-off-by: changqingxwu <changqingx.wu@intel.com> --- 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 f6d0373..9d2a97d 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -116,8 +116,15 @@ l3fwd_ipv4_route_array[] = {\\\n" rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" lpmStr_ipv6 = 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() == "freebsd": + filename = "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-freeBSD.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 + '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' + examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + # make application out = self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") -- 2.17.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 2019-07-30 1:37 ` Wu, ChangqingX @ 2019-08-06 1:27 ` Wu, ChangqingX 0 siblings, 0 replies; 6+ messages in thread From: Wu, ChangqingX @ 2019-08-06 1:27 UTC (permalink / raw) To: Wu, ChangqingX, Ma, LihongX, dts This patch was replaced with "[dts][PATCH V1] framework/alais gsed to sed for freebsd". Thanks. changqingx -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wu, ChangqingX Sent: Tuesday, July 30, 2019 9:38 AM To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org Subject: Re: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 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 Sent: Tuesday, July 30, 2019 9:29 AM To: Wu, ChangqingX <changqingx.wu@intel.com>; dts@dpdk.org Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 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 <lihongx.ma@intel.com>; dts@dpdk.org Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 1. this path: 0001-fix-ipfrag-failed-on-freeBSD.patch is still on local, was not yet submitted to dts. 2. the command: " sed -i ..." cannot success when it was executed on freebsd, 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 <changqingx.wu@intel.com>; dts@dpdk.org Cc: Wu, ChangqingX <changqingx.wu@intel.com> Subject: RE: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Hi, changing Where the 0001-fix-ipfrag-failed-on-freeBSD.patch ? And why use the patch file 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 <changqingx.wu@intel.com> Subject: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd Signed-off-by: changqingxwu <changqingx.wu@intel.com> --- 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 f6d0373..9d2a97d 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -116,8 +116,15 @@ l3fwd_ipv4_route_array[] = {\\\n" rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" lpmStr_ipv6 = 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() == "freebsd": + filename = "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-freeBSD.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 + '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' + examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + # make application out = self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") -- 2.17.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-06 1:27 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-07-29 1:47 [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd changqingxwu 2019-07-29 6:25 ` Ma, LihongX 2019-07-29 6:42 ` Wu, ChangqingX 2019-07-30 1:29 ` Ma, LihongX 2019-07-30 1:37 ` Wu, ChangqingX 2019-08-06 1:27 ` Wu, ChangqingX
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).