From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B12EE137C for ; Tue, 29 Aug 2017 11:02:15 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 29 Aug 2017 02:02:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,444,1498546800"; d="scan'208,217";a="123592839" Received: from dpdk-test32.sh.intel.com (HELO [10.67.119.120]) ([10.67.119.120]) by orsmga004.jf.intel.com with ESMTP; 29 Aug 2017 02:02:14 -0700 Message-ID: <59A5A843.5030507@intel.com> Date: Wed, 30 Aug 2017 01:45:39 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "xu,gang" , dts@dpdk.org References: <1503993854-99839-1-git-send-email-gangx.xu@intel.com> In-Reply-To: <1503993854-99839-1-git-send-email-gangx.xu@intel.com> Content-Type: multipart/alternative; boundary="------------030908090200060007000601" Subject: Re: [dts] [PATCH V1] fix ipfrag failed on 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: , X-List-Received-Date: Tue, 29 Aug 2017 09:02:17 -0000 This is a multi-part message in MIME format. --------------030908090200060007000601 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Gang, This tar file may not existed on tester and zipped filename can be changed by dts parameter. Please do not assume that tester has the source code. Just from your patch, you have handled the difference of FreeBSD. Why not just do it on DUT? Please also check other suites whether they may also facing the same issue. Thanks, Marvin On 08/29/2017 04:04 PM, xu,gang wrote: > - 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': > + self.tester.send_expect("tar zxf dep/dpdk.tar.gz -C/tmp/", "# ") > + self.tester.send_expect( > + r"sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\}\;/c\\%s' /tmp/dpdk/examples/ip_fragmentation/main.c" % lpmStr_ipv4, "# ") > + self.tester.send_expect( > + r"sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' /tmp/dpdk/examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") > + self.dut.session.copy_file_to( > + '/tmp/dpdk/examples/ip_fragmentation/main.c', '/root/dpdk') > + self.dut.send_expect("mv main.c examples/ip_fragmentation/", "# ") > + > + 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, "# ") > + --------------030908090200060007000601 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit Gang,

This tar file may not existed on tester and zipped filename can be changed by dts parameter.
Please do not assume that tester has the source code.
Just from your patch, you have handled the difference of FreeBSD. Why not just do it on DUT?

Please also check other suites whether they may also facing the same issue.

Thanks,
Marvin


On 08/29/2017 04:04 PM, xu,gang wrote:
-        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':
+            self.tester.send_expect("tar zxf dep/dpdk.tar.gz -C /tmp/", "# ")
+            self.tester.send_expect(
+                r"sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\}\;/c\\%s' /tmp/dpdk/examples/ip_fragmentation/main.c" % lpmStr_ipv4, "# ")
+            self.tester.send_expect(
+                r"sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' /tmp/dpdk/examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ")
+            self.dut.session.copy_file_to(
+                '/tmp/dpdk/examples/ip_fragmentation/main.c', '/root/dpdk')
+            self.dut.send_expect("mv main.c examples/ip_fragmentation/", "# ")
+
+        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, "# ")
+

--------------030908090200060007000601--