test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Han, YingyaX" <yingyax.han@intel.com>
To: "Chen, BoX C" <box.c.chen@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Chen, BoX C" <box.c.chen@intel.com>, "Chen@dpdk.org" <Chen@dpdk.org>
Subject: Re: [dts] [PATCH V1] tests/ABI: add abi stable test case
Date: Thu, 23 Apr 2020 03:04:02 +0000	[thread overview]
Message-ID: <BN7PR11MB2818559DD51C5421067944E0FFD30@BN7PR11MB2818.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200422094834.31991-1-box.c.chen@intel.com>

[-- Attachment #1: Type: text/plain, Size: 7021 bytes --]


Tested-by: Han,YingyaX <yingyax.han@intel.com>

BRs,
Yingya
-----Original Message-----
From: dts <dts-bounces@dpdk.org> On Behalf Of Chen,Bo
Sent: Wednesday, April 22, 2020 5:49 PM
To: dts@dpdk.org
Cc: Chen, BoX C <box.c.chen@intel.com>; Chen@dpdk.org
Subject: [dts] [PATCH V1] tests/ABI: add abi stable test case

add ABI stable test case: negative

Signed-off-by: Chen,Bo <box.c.chen@intel.com>
---
 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


[-- Attachment #2: TestABIStable.log --]
[-- Type: application/octet-stream, Size: 4312 bytes --]

22/04/2020 17:42:30                            dts: 
TEST SUITE : TestABIStable
22/04/2020 17:42:30                            dts: NIC :        niantic
22/04/2020 17:42:30              dut.10.240.183.70: 
22/04/2020 17:42:30                         tester: 
22/04/2020 17:42:30                  TestABIStable: Test Case test_negative Begin
22/04/2020 17:42:30              dut.10.240.183.70: 
22/04/2020 17:42:30                         tester: 
22/04/2020 17:42:30              dut.10.240.183.70: rm -rf /root/shared_lib_dpdk
22/04/2020 17:42:30              dut.10.240.183.70: 
22/04/2020 17:42:30              dut.10.240.183.70: cp -a /root/shared_lib_negative /root/shared_lib_dpdk
22/04/2020 17:42:31              dut.10.240.183.70: 
22/04/2020 17:42:31              dut.10.240.183.70: ./x86_64-native-linuxapp-gcc/app/testpmd -l 1,2 -n 4 -w 0000:86:00.0 -w 0000:86:00.1  --file-prefix=dpdk_18228_20200422174217   -d /root/shared_lib_dpdk  -- -i --portmask=0x1 
22/04/2020 17:42:33              dut.10.240.183.70: EAL: Detected 64 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/dpdk_18228_20200422174217/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:86:00.0 on NUMA socket 1
EAL:   probe driver: 8086:10fb net_ixgbe
EAL:   using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(2)
EAL: Ignore mapping IO port bar(5)
EAL: PCI device 0000:86:00.1 on NUMA socket 1
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(2)
EAL: Ignore mapping IO port bar(5)
Interactive-mode selected
previous number of forwarding ports 2 - changed to number of configured ports 1
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=155456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_1>: n=155456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc

Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.

Configuring Port 0 (socket 1)
Port 0: 90:E2:BA:D5:B2:28
Configuring Port 1 (socket 1)
Port 1: 90:E2:BA:D5:B2:29
Checking link statuses...
Done
22/04/2020 17:42:44              dut.10.240.183.70: set fwd txonly
22/04/2020 17:42:44              dut.10.240.183.70: set fwd txonly
Set txonly packet forwarding mode
22/04/2020 17:42:44              dut.10.240.183.70: start
22/04/2020 17:42:45              dut.10.240.183.70: start
txonly packet forwarding - ports=1 - cores=1 - streams=1 - NUMA support enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 1 streams:
  RX P=0/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00

  txonly packet forwarding packets/burst=32
  packet len=64 - nb packet segments=1
  nb forwarding cores=1 - nb forwarding ports=1
  port 0: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x0
    RX queue: 0
      RX desc=256 - RX free threshold=32
      RX threshold registers: pthresh=8 hthresh=8  wthresh=0
      RX Offloads=0x0
    TX queue: 0
      TX desc=256 - TX free threshold=32
      TX threshold registers: pthresh=32 hthresh=0  wthresh=0
      TX offloads=0x0 - TX RS bit threshold=32
  port 1: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x0
    RX queue: 0
      RX desc=256 - RX free threshold=32
      RX threshold registers: pthresh=8 hthresh=8  wthresh=0
      RX Offloads=0x0
    TX queue: 0
      TX desc=256 - TX free threshold=32
      TX threshold registers: pthresh=32 hthresh=0  wthresh=0
      TX offloads=0x0 - TX RS bit threshold=32
22/04/2020 17:42:46              dut.10.240.183.70: quit
22/04/2020 17:43:01                  TestABIStable: TIMEOUT on quit
22/04/2020 17:43:01              dut.10.240.183.70: kill_all: called by dut and prefix list has value.
22/04/2020 17:43:03              dut.10.240.183.70: quit
Telling cores to stop...
Waiting for lcores to finish...
Killed
[PEXPECT]# 
22/04/2020 17:43:03                  TestABIStable: Test Case test_negative Result PASSED:
22/04/2020 17:43:03                            dts: 
TEST SUITE ENDED: TestABIStable

  reply	other threads:[~2020-04-23  3:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  9:48 Chen,Bo
2020-04-23  3:04 ` Han, YingyaX [this message]
2020-04-24  2:20 ` Chen, Zhaoyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN7PR11MB2818559DD51C5421067944E0FFD30@BN7PR11MB2818.namprd11.prod.outlook.com \
    --to=yingyax.han@intel.com \
    --cc=Chen@dpdk.org \
    --cc=box.c.chen@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).