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 14DB8A0523; Wed, 1 Jul 2020 04:11:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D58C2C2B; Wed, 1 Jul 2020 04:11:39 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9E79D2B9C for ; Wed, 1 Jul 2020 04:11:37 +0200 (CEST) IronPort-SDR: /wvhe1bycJfvaDVAssjfbicf2ikhtyHNSqoKbixzMb4EBvK7DouRSjvarD11P/dFZn+ZEajxVI isd3PfI2QwHg== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="144608800" X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="144608800" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 19:11:36 -0700 IronPort-SDR: k2NYazLKxO/IIUWRLMgiPC+7gDK1PhOKUq4tjSWG0hyAcyHeySWtR/9vMf6Z/pln/zrGhS9/AI UEu9T1K9mYxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="295402189" Received: from unknown (HELO dpdk-zhaohy-t.localdomain) ([10.240.183.68]) by orsmga002.jf.intel.com with ESMTP; 30 Jun 2020 19:11:34 -0700 From: "Jiang, YuX" To: dts@dpdk.org Cc: "Jiang,yu" Date: Wed, 1 Jul 2020 09:59:29 +0800 Message-Id: <1593568769-343083-1-git-send-email-yux.jiang@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1] tests/crypto_perf_cryptodev_perf, cryptodev_common: optimize cryptodev test script 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" From: "Jiang,yu" optimize case's result which cryptodev perf does not support. Signed-off-by: Jiang,yu --- tests/TestSuite_crypto_perf_cryptodev_perf.py | 8 +++++--- tests/cryptodev_common.py | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_crypto_perf_cryptodev_perf.py b/tests/TestSuite_crypto_perf_cryptodev_perf.py index fc8f502..e1780f5 100644 --- a/tests/TestSuite_crypto_perf_cryptodev_perf.py +++ b/tests/TestSuite_crypto_perf_cryptodev_perf.py @@ -230,13 +230,13 @@ class PerfTestsCryptodev(TestCase): def _run_crypto_perf(self): if cc.is_test_skip(self): - return + return "skip" self.c_num, self.t_num = self._get_core_and_thread_num() devices = self._get_crypto_device(self.t_num) if not devices: self.logger.info("can not get device or unsupported, skip.") - return + return "skip" eal_opt_str = cc.get_eal_opt_str(self, devices) crypto_perf_opt_str = self._get_crypto_perf_opt_str() @@ -391,7 +391,9 @@ class PerfTestsCryptodev(TestCase): def _run_crypto_perf_throughput(self): results = self._run_crypto_perf() - + if results == "skip": + return + self.verify(results, "test results is none, Test Failed") stats_results = self._stat_results_by_buf_size(results) json_result = [] diff --git a/tests/cryptodev_common.py b/tests/cryptodev_common.py index 832b3bf..23c7cd9 100644 --- a/tests/cryptodev_common.py +++ b/tests/cryptodev_common.py @@ -138,7 +138,7 @@ def get_qat_devices(test_case, cpm_num=None, num=1): cpm_num = len(test_case.dev.keys()) n, dev_list = 0, [] if cpm_num > len(test_case.dev.keys()): - self.logger.warning("QAT card only {} cpm, but {} required".format( + test_case.logger.warning("QAT card only {} cpm, but {} required".format( len(test_case.dev), cpm_num)) return [] for i in range(num): @@ -148,7 +148,7 @@ def get_qat_devices(test_case, cpm_num=None, num=1): if i < len(test_case.dev[cpm]): dev_list.append(test_case.dev[cpm][i]) else: - self.logger.warning("not enough vf in cpm: {}".format(cpm)) + test_case.logger.warning("not enough vf in cpm: {}".format(cpm)) n += 1 return dev_list -- 2.7.4