From: Lingli Chen <linglix.chen@intel.com>
To: dts@dpdk.org
Cc: Lingli Chen <linglix.chen@intel.com>
Subject: [dts][PATCH V2 2/2] tests/queue_start_stop: optimize test script to remove re-compile dpdk test
Date: Thu, 6 Apr 2023 03:18:44 -0400 [thread overview]
Message-ID: <20230406071844.4053-2-linglix.chen@intel.com> (raw)
In-Reply-To: <20230406071844.4053-1-linglix.chen@intel.com>
1. remove re-compile dpdk test step to sync with test_plans
2. delete macfwd_log.patch
Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
V2: Add delete dep/macfwd_log.patch
dep/macfwd_log.patch | 10 -------
tests/TestSuite_queue_start_stop.py | 43 +++--------------------------
2 files changed, 4 insertions(+), 49 deletions(-)
delete mode 100644 dep/macfwd_log.patch
diff --git a/dep/macfwd_log.patch b/dep/macfwd_log.patch
deleted file mode 100644
index 0f657f82..00000000
--- a/dep/macfwd_log.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- app/test-pmd/macfwd.c.org 2015-07-02 10:51:12.821246109 +0800
-+++ app/test-pmd/macfwd.c 2015-07-02 10:50:11.343243319 +0800
-@@ -102,6 +102,7 @@
- nb_pkt_per_burst);
- if (unlikely(nb_rx == 0))
- return;
-+ printf("ports %u queue %u receive %u packages\n", fs->rx_port, fs->rx_queue, nb_rx);
-
- #ifdef RTE_TEST_PMD_RECORD_BURST_STATS
- fs->rx_burst_stats.pkt_burst_spread[nb_rx]++;
diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py
index 80baf8d6..cfae1ada 100644
--- a/tests/TestSuite_queue_start_stop.py
+++ b/tests/TestSuite_queue_start_stop.py
@@ -43,21 +43,7 @@ class TestQueueStartStop(TestCase):
"""
Run before each test case.
"""
- try:
- patch_file = FOLDERS["Depends"] + r"/macfwd_log.patch"
- except:
- self.logger.warning(str(FOLDERS))
- patch_file = r"dep/macfwd_log.patch"
- FOLDERS["Depends"] = "dep"
- patch_dst = "/tmp/"
-
- # dpdk patch and build
- try:
- self.dut.session.copy_file_to(patch_file, patch_dst)
- self.patch_hotfix_dpdk(patch_dst + "macfwd_log.patch", True)
- self.dut.build_install_dpdk(self.target)
- except Exception as e:
- raise IOError("dpdk setup failure: %s" % e)
+ pass
def check_forwarding(self, ports, nic, pktSize=64, received=True):
self.send_packet(ports[0], ports[1], self.nic, pktSize, received)
@@ -85,20 +71,6 @@ class TestQueueStartStop(TestCase):
else:
self.verify(len(sniff_pkts) == 0, "stop queue not work as expected")
- def patch_hotfix_dpdk(self, patch_dir, on=True):
- """
- This function is to apply or remove patch for dpdk.
- patch_dir: the abs path of the patch
- on: True for apply, False for remove
- """
- try:
- if on:
- self.dut.send_expect("patch -p0 < %s" % patch_dir, "[~|~\]]# ")
- else:
- self.dut.send_expect("patch -p0 -R < %s" % patch_dir, "[~|~\]]# ")
- except Exception as e:
- raise ValueError("patch_hotfix_dpdk failure: %s" % e)
-
def test_queue_start_stop(self):
"""
queue start/stop test
@@ -114,6 +86,7 @@ class TestQueueStartStop(TestCase):
)
time.sleep(5)
self.dut.send_expect("set fwd mac", "testpmd>")
+ self.dut.send_expect("set verbose 1", "testpmd>")
self.dut.send_expect("start", "testpmd>")
self.check_forwarding([0, 0], self.nic)
except Exception as e:
@@ -138,7 +111,7 @@ class TestQueueStartStop(TestCase):
except Exception as e:
raise IOError("queue start/stop forward failure: %s" % e)
self.verify(
- "ports 0 queue 0 receive " not in out,
+ "port 0/queue 0: received 1 packets" not in out,
"start queue revice package failed, out = %s" % out,
)
@@ -153,7 +126,7 @@ class TestQueueStartStop(TestCase):
except Exception as e:
raise IOError("queue start/stop forward failure: %s" % e)
self.verify(
- "ports 0 queue 0 receive " in out,
+ "port 0/queue 0: received 1 packets" in out,
"start queue revice package failed, out = %s" % out,
)
@@ -161,7 +134,6 @@ class TestQueueStartStop(TestCase):
"""
Run after each test case.
"""
- patch_dst = "/tmp/"
try:
self.dut.send_expect("stop", "testpmd>")
@@ -169,13 +141,6 @@ class TestQueueStartStop(TestCase):
except:
print("Failed to quit testpmd")
- self.dut.kill_all()
-
- try:
- self.patch_hotfix_dpdk(patch_dst + "macfwd_log.patch", False)
- except Exception as e:
- print(("patch_hotfix_dpdk remove failure :%s" % e))
-
def tear_down_all(self):
"""
Run after each test suite.
--
2.17.1
next prev parent reply other threads:[~2023-04-06 8:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 7:18 [dts][PATCH V2 1/2] test_plans/queue_start_stop: optimize test_plans to remove re-compile dpdk test step Lingli Chen
2023-04-06 7:18 ` Lingli Chen [this message]
2023-04-11 2:58 ` [dts][PATCH V2 2/2] tests/queue_start_stop: optimize test script to remove re-compile dpdk test Huang, ChenyuX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230406071844.4053-2-linglix.chen@intel.com \
--to=linglix.chen@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).