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 CD337A04C2; Mon, 25 Nov 2019 09:39:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C4E22378E; Mon, 25 Nov 2019 09:39:11 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 2957C28EE for ; Mon, 25 Nov 2019 09:39:10 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Nov 2019 00:39:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,241,1571727600"; d="scan'208";a="291313919" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 25 Nov 2019 00:39:09 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 25 Nov 2019 00:39:08 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 25 Nov 2019 00:39:08 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.60]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.200]) with mapi id 14.03.0439.000; Mon, 25 Nov 2019 16:39:06 +0800 From: "Wan, Zhe" To: "Zhao, XinfengX" , "dts@dpdk.org" CC: "Zhao, XinfengX" Thread-Topic: [dts] [PATCH V1 3/5] tests: add suite for compressdev zlib pmd test Thread-Index: AQHVo2CXV+G+QWGHcUy5LgQ8N7YJ3aebkMaw Date: Mon, 25 Nov 2019 08:39:06 +0000 Message-ID: <861C16A15685B44AA870C0D2A97B60458A2891BC@SHSMSX103.ccr.corp.intel.com> References: <1574634769-325555-1-git-send-email-xinfengx.zhao@intel.com> <1574634769-325555-3-git-send-email-xinfengx.zhao@intel.com> In-Reply-To: <1574634769-325555-3-git-send-email-xinfengx.zhao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzFjYjljZGUtMWQ0Mi00OTdhLWE5MGEtNDdkNzkxYmQ1MDE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidWYrWkg2R0ZDd1lHM1hTMTFrcW0zT2U5VHBjNjVvVWd0YjM0QnNBMjQ3Vmk2MjMxSmhGZGRJMFwvOU84Q3psWU0ifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 3/5] tests: add suite for compressdev zlib 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" Acked-by: Wan, Zhe -----Original Message----- From: dts On Behalf Of Xinfeng Zhao Sent: 2019=1B$BG/=1B(B11=1B$B7n=1B(B25=1B$BF|=1B(B 6:33 To: dts@dpdk.org Cc: Zhao, XinfengX Subject: [dts] [PATCH V1 3/5] tests: add suite for compressdev zlib pmd tes= t Signed-off-by: Xinfeng Zhao --- tests/TestSuite_compressdev_zlib_pmd.py | 84 +++++++++++++++++++++++++++++= ++++ 1 file changed, 84 insertions(+) create mode 100644 tests/TestSuite_compressdev_zlib_pmd.py diff --git a/tests/TestSuite_compressdev_zlib_pmd.py b/tests/TestSuite_comp= ressdev_zlib_pmd.py new file mode 100644 index 0000000..31d7194 --- /dev/null +++ b/tests/TestSuite_compressdev_zlib_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 TestCompressdevZlibPmd(TestCase): + + def set_up_all(self): + self.prepare_dpdk() + cc.default_eals.update({"w":"0000:00:00.0", "vdev": "compress_zlib= "}) + cc.default_opts.update({"driver-name": "compress_zlib"}) + 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_ZLIB=3Dn$/CONFIG_RTE_LIBRTE_P= MD_ZLIB=3Dy/' config/common_base", "# ") + self.dut.build_install_dpdk(self.dut.target) + + def test_zlib_pmd_unit_test(self): + cc.run_unit(self) + + def test_zlib_pmd_fixed_func(self): + cc.default_opts.update({"huffman-enc": "fixed"}) + result =3D cc.run_perf(self) + self._perf_result.update(result) + + def test_zlib_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_ZLIB=3Dy$/CONFIG_RTE_LIBRTE_P= MD_ZLIB=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 fv: + json.dump(self._perf_result, fv, indent=3D4) -- 2.7.4