test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/vf daemon : add fake mac in different dpdk file
@ 2019-01-23  4:32 zhao,meijuan
  2019-01-23  8:39 ` Zhu, WenhuiX
  2019-01-30  3:33 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: zhao,meijuan @ 2019-01-23  4:32 UTC (permalink / raw)
  To: dts; +Cc: zhao,meijuan

due to dpdk move macswap workload, so we need to add fack mac
in different dpdk file, you refer to dpdk commit a825afdbb

Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
 tests/TestSuite_vf_daemon.py | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py
index 42a14e5..2a8baf8 100644
--- a/tests/TestSuite_vf_daemon.py
+++ b/tests/TestSuite_vf_daemon.py
@@ -486,13 +486,12 @@ class Testvf_daemon(TestCase):
         """
         fake_mac = '00:11:22:33:44:55'
         time.sleep(5)
-        self.vm0_dut.send_expect("sed -i -e '/uint64_t ol_flags = 0;/a " +\
-            "\struct ether_addr fake_mac = {.addr_bytes = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55},};'" +\
-            " app/test-pmd/macswap.c", "# ", 30)
-        self.vm0_dut.send_expect("sed -i -e '/ether_addr_copy(&addr, &eth_hdr->s_addr);/d' " +\
-            " app/test-pmd/macswap.c", "# ", 30)
-        self.vm0_dut.send_expect("sed -i -e '/ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);/a " +\
-            "\ether_addr_copy(&fake_mac, &eth_hdr->s_addr);' app/test-pmd/macswap.c", "# ", 30)
+        self.vm0_dut.send_expect("sed -i -e '/int r;/a " +\
+            "\        struct ether_addr fake_mac = {.addr_bytes = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55},};'" +\
+            " app/test-pmd/macswap_sse.h", "# ", 30)
+        line_num = self.vm0_dut.send_expect("sed -n '/_mm_storeu_si128/=' app/test-pmd/macswap_sse.h |sed -n 5p", "# ",30)
+        self.vm0_dut.send_expect("sed -i -e '%sa\ether_addr_copy(&fake_mac, &eth_hdr[0]->s_addr);'" % str(line_num)+\
+                    " app/test-pmd/macswap_sse.h", "# ", 30)
         time.sleep(3)
 
         self.vm0_dut.build_install_dpdk(self.target) 
@@ -527,11 +526,9 @@ class Testvf_daemon(TestCase):
         self.vm0_testpmd.quit()
         self.dut_testpmd.quit()
         self.vm0_dut.send_expect("sed -i '/struct ether_addr fake_mac = {.addr_bytes = " +\
-            "{0x00, 0x11, 0x22, 0x33, 0x44, 0x55},};/d' app/test-pmd/macswap.c", "# ", 30)
-        self.vm0_dut.send_expect("sed -i '/ether_addr_copy(&fake_mac, &eth_hdr->s_addr);/d' " +\
-            "app/test-pmd/macswap.c", "# ", 30)
-        self.vm0_dut.send_expect("sed -i '/ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);/a " +\
-            "\ether_addr_copy(&addr, &eth_hdr->s_addr);' app/test-pmd/macswap.c", "# ", 30)
+            "{0x00, 0x11, 0x22, 0x33, 0x44, 0x55},};/d' app/test-pmd/macswap_sse.h", "# ", 30)
+        self.vm0_dut.send_expect("sed -i '%sd'" % line_num +\
+            " app/test-pmd/macswap_sse.h", "# ", 30)
         self.vm0_dut.build_install_dpdk(self.target)
 
 
-- 
2.17.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-30  3:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23  4:32 [dts] [PATCH V1] tests/vf daemon : add fake mac in different dpdk file zhao,meijuan
2019-01-23  8:39 ` Zhu, WenhuiX
2019-01-30  3:33 ` Tu, Lijuan

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).