From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B97E5A0613 for ; Tue, 27 Aug 2019 06:28:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE00B1C05C; Tue, 27 Aug 2019 06:28:25 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 909CE1C02E for ; Tue, 27 Aug 2019 06:28:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Aug 2019 21:28:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,435,1559545200"; d="scan'208";a="192035623" Received: from dpdk-xinfengx-dut242.sh.intel.com ([10.67.116.235]) by orsmga002.jf.intel.com with ESMTP; 26 Aug 2019 21:28:21 -0700 From: Xinfeng Zhao To: dts@dpdk.org Cc: Xinfeng Zhao Date: Tue, 27 Aug 2019 04:17:48 +0800 Message-Id: <1566850668-339181-3-git-send-email-xinfengx.zhao@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566850668-339181-1-git-send-email-xinfengx.zhao@intel.com> References: <1566850668-339181-1-git-send-email-xinfengx.zhao@intel.com> Subject: [dts] [PATCH V1 3/3] tests: make ipsec lib work in cryptodev ipsec-gw test 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: Xinfeng Zhao --- 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