From patchwork Fri May 20 10:27:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 111536 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 97228A0503; Fri, 20 May 2022 12:27:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7481C42B9E; Fri, 20 May 2022 12:27:57 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 968EF40222 for ; Fri, 20 May 2022 12:27:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653042475; x=1684578475; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rXpQZvcdiEVWT/3XDZbYb6gFe01F5Z23k+snAKgPGac=; b=fkRnhmaKpTQtbVEwyu/dyLqYCa54Je79sxPXnhZnCs5IJFb8p49PcwGq 5RZgUx5NxiNqA9mt3W/l8sSXTNiPBeoTBC9N2yRMiy5ZbPsmBASAaQA81 6jjIH3PluWhCdnlhGn3TgqESO7ItvhNag+VvvmAm/KvX8580xixEC9OpT EqsawbFkwsxtwXOtCySOcR09Fppva4VkKE8Luq02hdjsbDQO84zktAG5K yxoRKhNgFR92Ml7yf7G2YDAiVToKtoBACqpdob9tdXnxPpwVWpDVpPYP7 QQ/enDXskSP7KRryqnfpSJVXfGRLCpJp2cG2CWs1/8EDF3siCjte4az8g g==; X-IronPort-AV: E=McAfee;i="6400,9594,10352"; a="254621229" X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="254621229" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 03:27:53 -0700 X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="899259380" Received: from shwdenpg560.ccr.corp.intel.com ([10.253.109.11]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 03:27:51 -0700 From: "Li, WeiyuanX" To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 1/3] test_plans/meson_tests: add test plan for meson tests Date: Fri, 20 May 2022 18:27:30 +0800 Message-Id: <20220520102732.652-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1.windows.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 From: Weiyuan Li Add new test plan for meson tests. Signed-off-by: Weiyuan Li --- test_plans/meson_tests_test_plan.rst | 185 +++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 test_plans/meson_tests_test_plan.rst diff --git a/test_plans/meson_tests_test_plan.rst b/test_plans/meson_tests_test_plan.rst new file mode 100644 index 00000000..e199ec81 --- /dev/null +++ b/test_plans/meson_tests_test_plan.rst @@ -0,0 +1,185 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright (c) <2022>, Intel Corporation + +=========== +Meson tests +=========== + +Description +=========== +This test plan describes how to run unit tests with meson. +Test tests have been classified into five different groups. + +- Fast tests. +- Performance tests. +- Driver tests. +- Extra tests. +- Debug tests. + +For more details, please refer to `Running DPDK Unit Tests with Meson `_. + +Prerequisites +============= + +Required Libraries +------------------ +* crypto relative cases require dependencies `libIPSec_MB` and `libcrypto`:: + + cryptodev_aesni_mb_autotest + cryptodev_aesni_gcm_autotest + cryptodev_null_autotest + cryptodev_openssl_autotest + cryptodev_openssl_asym_autotest + cryptodev_qat_autotest + cryptodev_sw_kasumi_autotest + cryptodev_sw_snow3g_autotest + cryptodev_sw_zuc_autotest + cryptodev_scheduler_autotest + + .. note:: + + For more details, please refer to `Crypto Device Drivers `_ + +* The following cases require dependencies `libpcap`:: + + bpf_convert_autotest + eal_flags_mem_autotest + flow_classify_autotest + efd_autotest + efd_perf_autotest + +General set up +-------------- + +* Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static + # ninja -C -j 110 + +* Load rte_kni driver:: + + # lsmod | grep rte_kni + # rmmod rte_kni.ko + # insmod .//kmod/rte_kni.ko lo_mode=lo_mode_fifo + + .. note:: + + Test case fast-tests/kni_autotest requires to load kni.ko. + +* Get the pci device id and interface of DUT and tester. + For example, 0000:18:00.0 and 0000:18:00.1 is pci device id, + ens785f0 and ens785f1 is interface:: + + # ./usertools/dpdk-devbind.py -s + ... + 0000:18:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci + 0000:18:00.1 'Device 159b' if=ens785f1 drv=ice unused=vfio-pci + +* Bind the DUT port to dpdk:: + + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:00.0 0000:18:00.1 + +.. note:: + + kni_autotest requires at least one ethernet port, but other can be none. + +Test case +========= + +Test case 1: test_fasts +------------------------------- +This section explains how to run the meson tests for fast-tests. + +test steps +~~~~~~~~~~ +1. Run test on DUT:: + + meson test -C x86_64-native-linuxapp-gcc --suite DPDK:fast-tests -t 1 --test-args="-c 0xff" + + * `-t` is used to specify the timeout of test case, unit is second. + * `--test-args option` is used to specify test specific parameters, + distributor_autotest and distributor_perf_autotest require core number less than 64. + +2. Open and view the results on DUT:: + + # cat ./x86_64-native-linuxapp-gcc/meson-logs/testlog.txt + +3. Check the result output log. All case results are "OK", for example:: + + 1/99 DPDK:fast-tests / acl_autotest OK 3.43s + 2/99 DPDK:fast-tests / atomic_autotest OK 6.21s + 3/99 DPDK:fast-tests / bitmap_autotest OK 1.18s + 4/99 DPDK:fast-tests / bpf_autotest OK 1.17s + 5/99 DPDK:fast-tests / bpf_convert_autotest OK 1.19s + +Test case 2: test_driver +------------------------------- +This section explains how to run the meson tests for driver-tests. + +test steps +~~~~~~~~~~ +1. Run test on DUT:: + + meson test -C x86_64-native-linuxapp-gcc --suite DPDK:driver-tests -t 1 --test-args="-c 0xff" + +2. Following test case 1 step 2 and step 3. + +Test case 3: test_debug +------------------------------- +This section explains how to run the meson tests for debug-tests. + +test steps +~~~~~~~~~~ +1. Run test on DUT:: + + meson test -C x86_64-native-linuxapp-gcc --suite DPDK:debug-tests -t 1 --test-args="-c 0xff" + +2.Following test case 1 step 2 and step 3. + +.. warning:: + + `The bug _` impacts the following cases:: + + DPDK:debug-tests/dump_struct_sizes + DPDK:debug-tests/dump_mempool + DPDK:debug-tests/dump_malloc_stats + DPDK:debug-tests/dump_devargs + DPDK:debug-tests/dump_log_types + DPDK:debug-tests/dump_ring + DPDK:debug-tests/dump_physmem + DPDK:debug-tests/dump_memzone + +Test case 4: test_extra +------------------------------- +This section explains how to run the meson tests for extra-tests. + +test steps +~~~~~~~~~~ +1. Run test on DUT:: + + meson test -C x86_64-native-linuxapp-gcc --suite DPDK:extra-tests -t 1 --test-args="-c 0xff" + +2. Following test case 1 step 2 and step 3. + +.. warning:: + + Extra-tests are know issues which are recorded in app/test/meson.build:: + + #Tests known to have issues or which don't belong in other tests lists. + extra_test_names = [ + 'alarm_autotest', # ee00af60170b ("test: remove strict timing requirements some tests") + 'cycles_autotest', # ee00af60170b ("test: remove strict timing requirements some tests") + 'delay_us_sleep_autotest', # ee00af60170b ("test: remove strict timing requirements some tests") + 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826] + +Test case 5: test_perf +------------------------------- +This section explains how to run the meson tests for perf-tests. + +test steps +~~~~~~~~~~ +1. Run test on DUT:: + + meson test -C x86_64-native-linuxapp-gcc --suite DPDK:perf-tests -t 1 --test-args="-c 0xff" + +2. Following test case 1 step 2 and step 3. \ No newline at end of file