[dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd
Wu, ChangqingX
changqingx.wu at intel.com
Tue Jul 30 03:37:54 CEST 2019
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 at intel.com>; dts at 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 at intel.com>; dts at 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 at intel.com>; dts at dpdk.org
Cc: Wu, ChangqingX <changqingx.wu at 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 at dpdk.org] On Behalf Of changqingxwu
Sent: Monday, July 29, 2019 9:47 AM
To: dts at dpdk.org
Cc: Wu, ChangqingX <changqingx.wu at intel.com>
Subject: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd
Signed-off-by: changqingxwu <changqingx.wu at 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
More information about the dts
mailing list