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 AF39DA00C2; Wed, 22 Apr 2020 12:01:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 97BC81D544; Wed, 22 Apr 2020 12:01:03 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 9B9B11D544 for ; Wed, 22 Apr 2020 12:01:02 +0200 (CEST) IronPort-SDR: OQC6Cg24nezZHPJA/6wzOgiTg4WFiu7vX/di7qmQkFP371R24ot/TJDjpuHUVPYa8qnLv92q9t kuStVE0nZN8A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 03:01:01 -0700 IronPort-SDR: RComGjvO5E8k6EltpXlJx6qHqAw5Z9LVl522TdwdA75SAtcgyUF03eQmuLbi+0zgDQnFGy1T+G eVFWVojEkhBQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,413,1580803200"; d="scan'208";a="273833052" Received: from unknown (HELO cb-dts.sh.intel.com) ([10.240.183.58]) by orsmga002.jf.intel.com with ESMTP; 22 Apr 2020 03:01:00 -0700 From: "Chen,Bo" To: dts@dpdk.org Cc: "Chen,Bo" , Chen@dpdk.org Date: Wed, 22 Apr 2020 17:48:34 +0800 Message-Id: <20200422094834.31991-1-box.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/ABI: add abi stable test case 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" add ABI stable test case: negative Signed-off-by: Chen,Bo --- tests/TestSuite_ABI_stable.py | 129 ++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 tests/TestSuite_ABI_stable.py diff --git a/tests/TestSuite_ABI_stable.py b/tests/TestSuite_ABI_stable.py new file mode 100644 index 0000000..d292b33 --- /dev/null +++ b/tests/TestSuite_ABI_stable.py @@ -0,0 +1,129 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# 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 +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +""" +DPDK Test suite. + +Test support of RX/TX Checksum Offload Features by Poll Mode Drivers. + +""" +import utils +import time + +from test_case import TestCase +from pmd_output import PmdOutput +from settings import load_global_setting, HOST_SHARED_LIB_SETTING, HOST_SHARED_LIB_PATH + + +class TestABIStable(TestCase): + + def set_up_all(self): + """ + Run at the start of each test suite. + """ + self.pmdout = PmdOutput(self.dut) + self.dut_ports = self.dut.get_ports(self.nic) + self.port_mask = utils.create_mask([self.dut_ports[0]]) + use_shared_lib = load_global_setting(HOST_SHARED_LIB_SETTING) + self.verify(use_shared_lib != 'ture', "The case only support ABI mode") + + def set_up(self): + """ + Run before each test case. + """ + pass + + def test_negative(self): + net_device = self.dut.ports_info[0]['port'] + nic_drive = net_device.get_nic_driver() + shared_lib_path = load_global_setting(HOST_SHARED_LIB_PATH) + + self.verify(nic_drive != "ixgbe", "The case only support ixgbe drive") + # self.dut.send_expect("git apply 0001-rte_tx_burst_t_add-one-argument-at-the-begin.patch", "#") + # self.dut.build_install_dpdk(self.target) + # cmd = 'meson -Dexamples=all --buildtype=debugoptimized --default-library=shared ./devtools/.. ./build-gcc-shared' + # self.dut.send_expect(cmd, "#") + # cmd = 'meson configure -Ddisable_drivers=net/af_packet,net/ark,net/atlantic,net/avp,net/axgbe,net/bond,net/bnx2x,net/cxgbe,net/e1000,net/ena,net/enetc,net/enic,net/fm10k,net/hinic,net/hns3,net/iavf,net/ice,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,net/octeontx,net/octeontx2,net/pcap,net/pfe,net/qede,net/sfc,net/tap,net/thunderx,net/vdev_netvsc,net/vhost,net/virtio,net/vmxnet3,common/iavf,bus/ifpga,bus/vmbus,mempool/bucket,mempool/stack,raw/ioat,raw/octeontx2_dma,raw/octeontx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypto/octeontx2_crypto,crypto/openssl,crypto/crypto_scheduler,crypto/virtio_crypto,vdpa/ifc,event/octeontx2,event/opdl,event/skeleton,event/sw,event/dsw,event/octeontx,baseband/null,baseband/turbo_sw,baseband/fpga_lte_fec,net/failsafe ./build-gcc-shared' + # self.dut.send_expect(cmd, "#") + # cmd = 'ninja -C ./build-gcc-shared' + # self.dut.send_expect(cmd, "#") + # cmd = 'cp -Rap ./build-gcc-shared/drivers/* ./build-gcc-shared/lib/' + # self.dut.send_expect(cmd, "#") + cmd = 'rm -rf {}'.format(shared_lib_path) + self.dut.send_expect(cmd, "#") + cmd = 'cp -a /root/shared_lib_negative {}'.format(shared_lib_path) + self.dut.send_expect(cmd, "#") + # cmd = 'mv ./build-gcc-shared/lib/ {}'.format(shared_lib_path) + # self.dut.send_expect(cmd, "#") + # cmd = 'rm -rf {}/*.a'.format(shared_lib_path) + # self.dut.send_expect(cmd, "#") + # cmd = 'rm -rf {}/*.exp_chk'.format(shared_lib_path) + # self.dut.send_expect(cmd, "#") + # cmd = 'rm -rf {}/*.def'.format(shared_lib_path) + # self.dut.send_expect(cmd, "#") + # cmd = 'rm -rf {}/*.c'.format(shared_lib_path) + # self.dut.send_expect(cmd, "#") + + self.pmdout.start_testpmd("Default", "--portmask={} ".format(self.port_mask)) + time.sleep(1) + self.dut.send_expect("set fwd txonly", "testpmd>") + self.dut.send_expect("start", "testpmd>") + time.sleep(1) + try: + self.dut.send_expect("quit", "testpmd>") + except Exception as e: + if 'TIMEOUT' in str(e): + self.logger.info(str(e)) + else: + self.verify(False, "No timeout") + self.dut.kill_all() + # time.sleep(1) + # self.dut.send_expect("git apply -R abi_negative.patch") + # self.dut.build_install_dpdk(self.target) + return + + self.verify(False, "negative test failed") + self.dut.kill_all() + # time.sleep(1) + # self.dut.send_expect("git apply -R abi_negative.patch", "#") + # self.dut.build_install_dpdk(self.target) + + def tear_down(self): + """ + Run after each test case. + """ + pass + + def tear_down_all(self): + """ + Run after each test suite. + """ + self.dut.kill_all() -- 2.17.1