test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xinfeng Zhao <xinfengx.zhao@intel.com>
To: dts@dpdk.org
Cc: Xinfeng Zhao <xinfengx.zhao@intel.com>
Subject: [dts] [PATCH V1 3/3] tests: make ipsec lib work in cryptodev ipsec-gw test
Date: Tue, 27 Aug 2019 04:17:48 +0800	[thread overview]
Message-ID: <1566850668-339181-3-git-send-email-xinfengx.zhao@intel.com> (raw)
In-Reply-To: <1566850668-339181-1-git-send-email-xinfengx.zhao@intel.com>

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 tests/TestSuite_ipsec_gw_cryptodev_func.py | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/tests/TestSuite_ipsec_gw_cryptodev_func.py b/tests/TestSuite_ipsec_gw_cryptodev_func.py
index 901df6c..5b815ad 100644
--- a/tests/TestSuite_ipsec_gw_cryptodev_func.py
+++ b/tests/TestSuite_ipsec_gw_cryptodev_func.py
@@ -82,6 +82,7 @@ class TestIPsecGW(TestCase):
         out =self.dut.build_dpdk_apps("./examples/ipsec-secgw")
         self.verify("Error"not in out,"Compilation error")
         self.verify("No such"not in out,"Compilation error")
+
         self.vf_driver = self.get_suite_cfg()['vf_driver']
         cc.bind_qat_device(self, self.vf_driver)
 
@@ -89,13 +90,16 @@ class TestIPsecGW(TestCase):
             "config": None,
             "P": "",
             "p": "0x3",
-            "f": "local_conf/ipsec_test.cfg",
+            "f": "conf/ipsec_ep0.cfg",
             "u": "0x1"
         }
 
         self._pcap_idx = 0
         self.pcap_filename = ''
 
+        conf_file = r'conf/ipsec_ep0.cfg'
+        self.dut.session.copy_file_to(conf_file)
+
     def set_up(self):
         pass
 
@@ -706,6 +710,8 @@ class TestIPsecGW(TestCase):
         self.verify(result, "FAIL")
 
     def _get_ipsec_gw_opt_str(self, override_ipsec_gw_opts={}):
+        if "librte_ipsec" in self.get_suite_cfg().keys() and self.get_suite_cfg()["librte_ipsec"]:
+            override_ipsec_gw_opts={"l": ""}
         return cc.get_opt_str(self, self._default_ipsec_gw_opts,
                               override_ipsec_gw_opts)
 
@@ -728,8 +734,6 @@ class TestIPsecGW(TestCase):
         expected_dst_ip = case_cfgs["expected_dst_ip"]
         expected_src_ip = case_cfgs["expected_src_ip"]
         expected_spi = case_cfgs["expected_spi"]
-        expected_length = case_cfgs["expected_length"]
-        #expected_data = case_cfgs["expected_data"]
 
         pkt = Packet()
         if len(dst_ip)<=15:
@@ -789,13 +793,5 @@ class TestIPsecGW(TestCase):
                 result = False
                 break
 
-            pkt_len = len(payload_str)/2
-            self.logger.debug(pkt_len)
-            if pkt_len != int(expected_length):
-                self.logger.error("Packet length does not match. Pkt:{0}, Expected:{1}".format(
-                    pkt_len, expected_length))
-                result = False
-                break
-
         self.dut.kill_all()
         return result
-- 
2.17.1


  parent reply	other threads:[~2019-08-27  4:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 20:17 [dts] [PATCH V1 1/3] tests: add 3DES and null cases for " Xinfeng Zhao
2019-08-26 20:17 ` [dts] [PATCH V1 2/3] conf: modify conf file " Xinfeng Zhao
2019-08-26 20:17 ` Xinfeng Zhao [this message]
2019-08-27  4:29 ` [dts] [PATCH V1 1/3] tests: add 3DES and null cases " Zhao, XinfengX
2019-09-04  5:08 ` Tu, Lijuan

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=1566850668-339181-3-git-send-email-xinfengx.zhao@intel.com \
    --to=xinfengx.zhao@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).