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 6C415A00E6 for ; Mon, 8 Jul 2019 22:18:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B5011B997; Mon, 8 Jul 2019 22:18:32 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 4409B1B994 for ; Mon, 8 Jul 2019 22:18:30 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E29023082204; Mon, 8 Jul 2019 20:18:21 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEE6D5D70D; Mon, 8 Jul 2019 20:18:16 +0000 (UTC) From: Aaron Conole To: Thomas Monjalon Cc: Hari Kumar Vemula , dev@dpdk.org, reshma.pattan@intel.com, john.mcnamara@intel.com, marko.kovacevic@intel.com, jananeex.m.parthasarathy@intel.com, bruce.richardson@intel.com, david.marchand@redhat.com References: <1549103306-9644-1-git-send-email-hari.kumarx.vemula@intel.com> <1559822385-21684-1-git-send-email-hari.kumarx.vemula@intel.com> <111637960.86sdBQFhhs@xps> Date: Mon, 08 Jul 2019 16:18:16 -0400 In-Reply-To: <111637960.86sdBQFhhs@xps> (Thomas Monjalon's message of "Mon, 08 Jul 2019 21:40:44 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 08 Jul 2019 20:18:27 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thomas Monjalon writes: > Hi please find some comments below: > > 06/06/2019 13:59, Hari Kumar Vemula: >> +++ b/doc/guides/prog_guide/meson_ut.rst >> @@ -0,0 +1,151 @@ >> +.. SPDX-License-Identifier: BSD-3-Clause >> + > > Useless blank line. > >> + Copyright(c) 2018-2019 Intel Corporation. >> + >> +.. _meson_unit_tests: > > Useless anchor. The doc can be referenced with :doc: links. > >> + >> +Running DPDK Unit Tests with Meson >> +================================== >> + >> +This section describes how to run testcases with the DPDK meson build system. > > Here and below, "testcases" should be split in two words. > >> + >> + >> +Building and running the unit tests >> +----------------------------------- >> + >> +* Create the meson build output folder using the following command:: >> + >> + $ meson >> + >> +* Enter into build output folder, which was created by above command:: >> + >> + $ cd build > > Should be the same as above: > >> + >> +* Compile DPDK using command:: >> + >> + $ ninja > > Do we really need to repeat above basic steps? > Would be easier to just reference another guide about meson. > I think doc/build-sdk-meson.txt should be moved to .rst. +1 >> + >> +The output file of the build will be available in meson build folder. After >> +a successful ninja command, the binary ``dpdk-test`` is created in >> +``build/test/test/``. > > Again, "build" is an example directory. > >> + >> +* Run the unit testcases:: >> + >> + $ ninja test >> + # or >> + $ meson test >> + >> +* To run specific test case via meson:: >> + >> + $ meson test >> + # or >> + $ ninja test > > Would be worth to mention why meson or ninja can be used. > >> + >> + >> +Grouping of testcases >> +--------------------- >> + >> +Testcases have been grouped into four different groups based on conditions >> +of time duration and performance of the individual testcase. > > Grouping has changed recently. > This part should be updated please. > >> + >> +* Fast tests which can be run in parallel. >> +* Fast tests which must run serially. >> +* Performance tests. >> +* Driver tests. >> +* Tests which produce lists of objects as output, and therefore that need >> + manual checking. >> + >> +Testcases can be run in parallel or non-parallel mode using the ``is_parallel`` argument >> +of ``test()`` in meson.build >> + >> +These tests can be run using the argument to ``meson test`` as >> +``--suite project_name:label``. >> + >> +For example:: >> + >> + $ meson test --suite DPDK:fast-tests >> + >> + >> +The project name is optional so the following is equivalent to the previous >> +command:: >> + >> + >> + $ meson test --suite fast-tests >> + >> + >> +Running different test suites >> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> + >> +The following commands are some examples of how to run testcases using option >> +``--suite``: The following section is a bit misleading. The limitation on run time is per-test. So 600 seconds in perf-tests is 600 seconds PER TEST. IE: if there are 10 tests, you'll be waiting up to 50 minutes. >> +* Fast Tests should take less than 10 seconds. The meson command to run them >> + is:: >> + >> + $ meson test --suite DPDK:fast-tests >> + >> +* Performance Tests should take less than 600 seconds. The meson command to >> + run them is:: >> + >> + $ meson test --suite DPDK:perf-tests >> + >> +* Driver Tests should take less than 600 seconds. The meson command to run >> + them is:: >> + >> + $ meson test --suite DPDK:driver-tests >> + >> +* The meson command to run Dump Tests is:: >> + >> + $ meson test --suite DPDK:dump-tests > > Would be simpler to just list the suites. Even better would be to provide a 1-liner that would dump the suites so that new test suites wouldn't need to update the documentation. >> + >> + >> +Dealing with skipped testcases >> +------------------------------ >> + >> +Some unit test cases have a dependency on external libraries, driver modules >> +or config flags, without which the test cases cannot be run. Such test cases >> +will be reported as skipped if they cannot run. To enable those test cases, >> +the user should ensure the required dependencies are met. Below are a few >> +possible causes why tests may be skipped and how they may be resolved: >> + >> +#. Optional external libraries are not found. >> +#. Config flags for the dependent library are not enabled. >> +#. Dependent driver modules are not installed on the system. >> + >> +To help find missing libraries, the user can specify addition search paths > > addition -> additional ? > >> +for those libraries as below: >> + >> +* Single path:: >> + >> + $ export LIBRARY_PATH=path >> + >> +* Multiple paths:: >> + >> + $ export LIBRARY_PATH=path1:path2:path3 >> + >> +Some functionality may be disabled due to library headers being missed as part >> +of the build. To specify an additional search path for headers at >> +configuration time, use one of the commands below: >> + >> +* Single path:: >> + >> + $ CFLAGS=-I/path meson build >> + >> +* Multiple paths:: >> + >> + $ CFLAGS=-I/path1 -I/path2 meson build > > Some quotes are missing to set multiple paths. > >> + >> +Below are some examples that show how to export libraries and their header >> +paths. >> + >> +To specify a single library at a time:: >> + >> + $ export LIBRARY_PATH=/root/wireless_libs/zuc/ >> + $ CFLAGS=-I/root/wireless_libs/zuc/include meson build >> + >> +To specify multiple libraries at a time:: >> + >> + $ export LIBRARY_PATH=/path/zuc/:/path/libsso_kasumi/build/ >> + $ CFLAGS=-I/path/zuc/include \ >> + -I/path/libsso_kasumi/include \ >> + meson build > > Why export is used for LIBRARY_PATH and not CFLAGS? > I think both variables can be exported or prepend the meson command?