test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts] [PATCH V1] iavf_flexible_descriptor:sync plan and case to adapt dpdk code changed
Date: Fri, 29 Oct 2021 02:02:39 +0800	[thread overview]
Message-ID: <20211028180239.4645-1-zhiminx.huang@intel.com> (raw)

according to dpdk commit daa02b5cddbb8e11b31d41e2bf7bb1ae64dcae2f code changed.
fix code to adapt dpdk changed,and add check function after modify code in case.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 .../iavf_flexible_descriptor_test_plan.rst    |  2 +-
 tests/TestSuite_iavf_flexible_descriptor.py   | 23 ++++++++++++++++++-
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/test_plans/iavf_flexible_descriptor_test_plan.rst b/test_plans/iavf_flexible_descriptor_test_plan.rst
index d03fbe41..9cf0d713 100644
--- a/test_plans/iavf_flexible_descriptor_test_plan.rst
+++ b/test_plans/iavf_flexible_descriptor_test_plan.rst
@@ -106,7 +106,7 @@ The default DPDK don't support dump flexible descriptor fields, so need to patch
       (int)mb->nb_segs);
       ol_flags = mb->ol_flags;
       +                rte_pmd_ifd_dump_proto_xtr_metadata(mb);
-      if (ol_flags & PKT_RX_RSS_HASH) {
+      if (ol_flags & RTE_MBUF_F_RX_RSS_HASH) {
       MKDUMPSTR(print_buf, buf_size, cur_len,
       " - RSS hash=0x%x",
 
diff --git a/tests/TestSuite_iavf_flexible_descriptor.py b/tests/TestSuite_iavf_flexible_descriptor.py
index 721dbb53..2da892c1 100644
--- a/tests/TestSuite_iavf_flexible_descriptor.py
+++ b/tests/TestSuite_iavf_flexible_descriptor.py
@@ -51,11 +51,32 @@ class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase):
             "cp ./app/test-pmd/util.c .",
             r"""sed -i "/if dpdk_conf.has('RTE_NET_IXGBE')/i\if dpdk_conf.has('RTE_NET_ICE')\n\tdeps += ['net_ice', 'net_iavf']\nendif" app/test-pmd/meson.build""",
             "sed -i '/#include <rte_flow.h>/a\#include <rte_pmd_iavf.h>' app/test-pmd/util.c",
-            "sed -i '/if (ol_flags & PKT_RX_RSS_HASH)/i\                rte_pmd_ifd_dump_proto_xtr_metadata(mb);' app/test-pmd/util.c",
+            "sed -i '/if (ol_flags & RTE_MBUF_F_RX_RSS_HASH)/i\                rte_pmd_ifd_dump_proto_xtr_metadata(mb);' app/test-pmd/util.c",
         ]
         [self.dut.send_expect(cmd, "#", 15, alt_session=True) for cmd in cmds]
+        check_point = {
+            "app/test-pmd/meson.build": [
+                "deps += ['net_ice', 'net_iavf']",
+                "if dpdk_conf.has('RTE_NET_ICE')"
+            ],
+            "app/test-pmd/util.c": [
+                "#include <rte_pmd_iavf.h>",
+                "rte_pmd_ifd_dump_proto_xtr_metadata(mb);"
+            ]
+        }
+        for path, cmds in check_point.items():
+            for cmd in cmds:
+                self.check_modify_dpdk_code(cmd, path)
         self.dut.build_install_dpdk(self.dut.target)
 
+    def check_modify_dpdk_code(self, cmd, path):
+        """
+        check dpdk code modify successful
+        """
+        check_cmd = """grep "{}" {}""".format(cmd, path)
+        out = self.dut.send_expect(check_cmd, "# ", 15, alt_session=True, trim_whitespace=False)
+        self.verify(out, "The dpdk code not changed")
+
     def restore_compilation(self):
         """
          Resume editing operation.
-- 
2.17.1


             reply	other threads:[~2021-10-28  9:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 18:02 Zhimin Huang [this message]
2021-10-28  9:37 ` Huang, ZhiminX
2021-10-28  9:44 ` David Marchand

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=20211028180239.4645-1-zhiminx.huang@intel.com \
    --to=zhiminx.huang@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).