[dts] [PATCH V1 1/2] meson_build_system: upload test plan

yufengx.mo at intel.com yufengx.mo at intel.com
Wed Jun 6 07:36:13 CEST 2018


From: yufengmx <yufengx.mo at intel.com>


This test plan is for meson build system feature.

meson and ninja tools are used to compile and install DPDK. It is aimed
at taking the place of direct using make (GNU make) to get more convenience
and efficiency for compilation.

Signed-off-by: yufengmx <yufengx.mo at intel.com>
---
 test_plans/meson_build_system_test_plan.rst | 247 ++++++++++++++++++++++++++++
 1 file changed, 247 insertions(+)
 create mode 100644 test_plans/meson_build_system_test_plan.rst

diff --git a/test_plans/meson_build_system_test_plan.rst b/test_plans/meson_build_system_test_plan.rst
new file mode 100644
index 0000000..ac24080
--- /dev/null
+++ b/test_plans/meson_build_system_test_plan.rst
@@ -0,0 +1,247 @@
+.. Copyright (c) <2018>, Intel Corporation
+   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.
+
+==================
+meson build system
+==================
+
+``meson`` and ``ninja`` tools are used to compile and install DPDK. It is aimed
+at taking the place of direct using ``make`` (GNU make) to get more convenience 
+and efficiency for compilation.
+
+note: DPDK technical document refer to ``doc\build-sdk-meson.txt``
+
+Prerequisites
+-------------
+meson tool version should be 0.42.0 or latest one, which is recommended by 
+dpdk org(dpdk/INSTALL.meson).
+
+meson/ninja installation steps::
+*. method one(fedora 25)
+    dnf install meson
+
+*. method two(for old version os, etc fedora 22, too load version may not support
+meson/ninja build)
+1. download meson tool
+    git clone https://github.com/mesonbuild/meson.git
+    git tag
+    git checkout 0.42.0 (or latest one, recommended by dpdk org)
+    ln -s <meson source directory>/meson.py  /usr/bin/meson
+
+2. download ninja tool
+    git clone https://github.com/ninja-build/ninja.git
+    cd ninja
+    git checkout release
+    # execute this comand to generate ninja file 
+    ./configure.py --bootstrap
+    ninja
+    # copy ninja file to your platform default bin files directory
+    cp ninja /usr/bin
+
+HW configuration
+----------------
+2xNICs (2 full duplex optical ports per NIC)
+igb:   powerville(I350)
+ixgbe: niantic(82599ES 10-Gigabit SFI/SFP+ Network Connection)
+i40e:  fortville_spirit(Ethernet Controller XL710 for 40GbE QSFP+)
+
+Test cases
+----------
+These test cases will run on target
+    x86_64-native-linuxapp-gcc
+
+Test Case 1:  check common build
+================================
+
+steps:
+
+*. compile dpdk source code with meson
+
+    meson <source code build directory> <meson.build file directory>
+
+*. once done, meson writes a ``build.ninja`` file in the build directory to be 
+   used to do the build itself when ninja is called.
+   
+    cd <meson.build file directory>
+    ninja
+    set DEST_DIR=<default directory>
+    ninja install
+
+*. check the installed layout will be the following
+
+    headers -> <default directory>/include
+    libraries -> <default directory>/lib64
+    drivers -> <default directory>/lib64/dpdk/drivers
+    libdpdk.pc -> <default directory>/lib64/pkgconfig
+
+*. bind igb_uio to check if it can work
+    ./usertools/dpdk-devbind.py --bind=igb_uio 0000:xx:00.x 0000:xx:00.x
+
+*. run testpmd to check if it can work
+    ./testpmd
+    testpmd > start
+    testpmd > stop
+    testpmd > quit
+
+Test Case 2:  check meson configure
+===================================
+check ``meson configure`` work action 
+
+steps:
+
+*. run ``meson configure`` to get DPDK-specific available options check 
+   expexcted build options are in meson options
+
+    meson configure <source code build directory>
+
+*. using ``meson configure`` to change the build options within 
+   this directory and rerun ninja again. Then check build result as test
+   case 1's steps
+
+    meson configure -D<option>=<value> <meson.build file directory>
+    cd <meson.build file directory>
+    ninja
+
+*. run 'ninja install' to check that bin/so file are under <desired directory> 
+  
+    meson configure -Dprefix=<desired directory> <meson.build file directory>
+    ninja install
+
+*. run 'ninja uninstall' to check that bin/so files have benn removed from
+    <desired directory>
+    
+    ninja uninstall
+
+Test Case 3:  check meson build testpmd
+=========================================
+check if testpmd has been compiled and can been boot up 
+
+steps:
+
+*. run testpmd
+
+   ./dpdk-testpmd -c 0x6 -n 4  -- -i --port-topology=chained --tx-offloads=0x1fbf
+
+*. send udp packet to port 0/1 by scapy and check if packet has been received 
+
+Test Case 4:  check meson build app binary files
+================================================
+check if binary under ``apps`` directory have been compiled and can been boot up
+
+steps:
+
+*. run testpmd
+    
+    ./dpdk-testpmd -c 0x6 -n 4  -- -i --port-topology=chained --tx-offloads=0x1fbf
+
+*. run app binary
+
+    pdump:
+    ./dpdk-pdump  -- --pdump  'port=0,queue=*,tx-dev=/tmp/pdump-tx.pcap' 2>&1
+    
+    proc-info:
+    ./dpdk-procinfo -- -p 3 --xstats
+
+Test Case 5:  check meson build examples using Dexamples option
+==========================================
+use meson/ninja to build example in dpdk/examples
+
+steps:
+
+*. build some examples as part of the normal DPDK build
+
+    meson configure -Dexamples=xxxxx,xxxxx <meson.build file directory>
+    cd <meson.build file directory>
+    ninja
+
+*. check bin files have been in every exmamples' build directory
+
+    dpdk/<example name>/build/<example name>
+
+*. run these bin files to check if they work
+
+    ./build/<example name>
+
+the following examples are included
+    bond
+    cmdline
+    distributor
+    eventdev_pipeline_sw_pmd
+    exception_path
+    flow_classify
+    flow_filtering
+    helloworld
+    ipsec-secgw
+    ipv4_multicast
+    ip_fragmentation
+    ip_pipeline
+    ip_reassembly
+    kni
+    l2fwd
+    l2fwd-cat
+    l2fwd-crypto
+    l2fwd-jobstats
+    l2fwd-keepalive
+    l3fwd
+    l3fwd-acl
+    l3fwd-power
+    l3fwd-vf
+    link_status_interrupt
+    load_balancer
+    packet_ordering
+    ptpclient
+    qos_meter
+    qos_sched
+    rxtx_callbacks
+    service_cores
+    skeleton
+    tep_termination
+    timer
+    vhost
+    vhost_scsi
+    vmdq
+    vmdq_dcb
+
+Test Case 6:  check meson build examples using all option 
+=========================================================
+check ninja compile examples with ``all`` option and check if all examples of
+support ninja binary file have been compiled.
+
+steps:
+
+*. compile examples
+
+    meson configure -Dexamples=all <meson.build file directory>
+    cd <meson.build file directory>
+    ninja
+
+*. check all examples' binary files in <meson.build file directory>/examples
-- 
1.9.3



More information about the dts mailing list