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 65C7EA04C2; Mon, 25 Nov 2019 08:26:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 030B32BCE; Mon, 25 Nov 2019 08:26:58 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5FCFE2952 for ; Mon, 25 Nov 2019 08:26:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Nov 2019 23:26:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,240,1571727600"; d="scan'208";a="206215027" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga007.fm.intel.com with ESMTP; 24 Nov 2019 23:26:55 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 24 Nov 2019 23:26:54 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.108]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.60]) with mapi id 14.03.0439.000; Mon, 25 Nov 2019 15:26:52 +0800 From: "Zhao, XinfengX" To: "dts@dpdk.org" , "Wan, Zhe" Thread-Topic: [dts][PATCH V1 4/5] tests: add suite for compressdev isal pmd test Thread-Index: AQHVo2CUNhQLnq6XlUaNVuQmzZSHr6ebe0kw Date: Mon, 25 Nov 2019 07:26:52 +0000 Message-ID: <44051B25D8C8784BB77FFB604D6A70CA120A1E25@shsmsx102.ccr.corp.intel.com> References: <1574634769-325555-1-git-send-email-xinfengx.zhao@intel.com> <1574634769-325555-4-git-send-email-xinfengx.zhao@intel.com> In-Reply-To: <1574634769-325555-4-git-send-email-xinfengx.zhao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 4/5] tests: add suite for compressdev isal pmd 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" Tested-by: Zhao, Xinfeng -----Original Message----- From: Zhao, XinfengX=20 Sent: Monday, November 25, 2019 6:33 AM To: dts@dpdk.org Cc: Zhao, XinfengX Subject: [dts][PATCH V1 4/5] tests: add suite for compressdev isal pmd test Signed-off-by: Xinfeng Zhao --- tests/TestSuite_compressdev_isal_pmd.py | 84 +++++++++++++++++++++++++++++= ++++ 1 file changed, 84 insertions(+) create mode 100644 tests/TestSuite_compressdev_isal_pmd.py diff --git a/tests/TestSuite_compressdev_isal_pmd.py b/tests/TestSuite_comp= ressdev_isal_pmd.py new file mode 100644 index 0000000..8d7e22e --- /dev/null +++ b/tests/TestSuite_compressdev_isal_pmd.py @@ -0,0 +1,84 @@ +# BSD LICENSE +# +# Copyright(c) 2019 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without #=20 +modification, are permitted provided that the following conditions #=20 +are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS #=20 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT #=20 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR #=20 +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT #=20 +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, #=20 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT #=20 +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, #=20 +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY #=20 +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT #=20 +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE #=20 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +import os +from test_case import TestCase +import json +import compress_common as cc + +class TestCompressdevIsalPmd(TestCase): + + def set_up_all(self): + self.prepare_dpdk() + cc.default_eals.update({'w': "0000:00:00.0", "vdev": "compress_isa= l"}) + cc.default_opts.update({"driver-name": "compress_isal"}) + self._perf_result =3D dict() + + def set_up(self): + pass + + def prepare_dpdk(self): + self.dut.send_expect( + "sed -i 's/CONFIG_RTE_COMPRESSDEV_TEST=3Dn$/CONFIG_RTE_COMPRES= SDEV_TEST=3Dy/' config/common_base", "# ") + self.dut.send_expect( + "sed -i 's/CONFIG_RTE_LIBRTE_PMD_ISAL=3Dn$/CONFIG_RTE_LIBRTE_P= MD_ISAL=3Dy/' config/common_base", "# ") + self.dut.build_install_dpdk(self.dut.target) + + def test_isal_pmd_unit_test(self): + cc.run_unit(self) + + def test_isal_pmd_fixed_func(self): + cc.default_opts.update({"huffman-enc": "fixed"}) + result =3D cc.run_perf(self) + self._perf_result.update(result) + + def test_isal_pmd_dynamic_func(self): + cc.default_opts.update({"huffman-enc": "dynamic"}) + result =3D cc.run_perf(self) + self._perf_result.update(result) + + def tear_down(self): + pass + + def tear_down_all(self): + self.dut.kill_all() + + self.dut.send_expect( + "sed -i 's/CONFIG_RTE_COMPRESSDEV_TEST=3Dy$/CONFIG_RTE_COMPRES= SDEV_TEST=3Dn/' config/common_base", "# ") + self.dut.send_expect( + "sed -i 's/CONFIG_RTE_LIBRTE_PMD_ISAL=3Dy$/CONFIG_RTE_LIBRTE_P= MD_ISAL=3Dn/' config/common_base", "# ") + self.dut.build_install_dpdk(self.dut.target) + + if not self._perf_result: + return + with open(self.logger.log_path + "/" + self.suite_name + ".json", = "w") as f: + json.dump(self._perf_result, f, indent=3D4) -- 2.7.4