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 89A75A00E6 for ; Tue, 9 Jul 2019 20:58:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 920491B95A; Tue, 9 Jul 2019 20:58:00 +0200 (CEST) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) by dpdk.org (Postfix) with ESMTP id 71BCC1B959 for ; Tue, 9 Jul 2019 20:57:58 +0200 (CEST) Received: by mail-io1-f45.google.com with SMTP id o9so29886557iom.3 for ; Tue, 09 Jul 2019 11:57:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nxbxaegaF/NsUm6jCUgnsYTEzIl3bx2y4Znj2Rs4IIQ=; b=MpV5YjZZlkFitgK9/3Vo5yK+anzy3e3c+PFtzE0L8MXYjYqqb1z6zl4TDRuQUHVVT0 tFfk1L8nA/56ySgxI/vzsBwwBcRoMJ0Hny/sIX9RTFKI5wk9b7JKu2RqocmAAPO1hqa1 FjZVKUQVXy+DRmIrSm2Y4WAYWuN7AYQaD1ZHQc4lIUpg/PZKnfTGMGdPMycVTNgtRFG7 bz3bR5jjuJDR3UD8HsGXZajvFKJTXb0omsg84z6+Lu9aDbVLCxLofRcj83rep8yaZXZS qrm1eRZh1BuiO/oIi6lN4DM2PsPoVnB3FBZH8KpMlYxzCItZrXxOprOL9QiCL92kpNw6 EDdQ== X-Gm-Message-State: APjAAAWGxj7FfHuMjqzcijlN7hCGkmPjNAeMb9WCzxrnW5cR3KZwLyjO Ty1kf1xl/x1pGfrP87Qin5z/Ey0m3ww9j5Y+cMxUBw== X-Google-Smtp-Source: APXvYqwCzHu3wKNBE8hcXtzEtn09x08RPnEJzt09qSyTGFasFRggWq8Q9/aAHkEcvLTHCuWdfJhsAMfOY3/mHs156iw= X-Received: by 2002:a6b:6409:: with SMTP id t9mr8997095iog.270.1562698677761; Tue, 09 Jul 2019 11:57:57 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Michael Santana Francisco Date: Tue, 9 Jul 2019 14:57:46 -0400 Message-ID: To: Aaron Conole Cc: Thomas Monjalon , Hari Kumar Vemula , dev , reshma.pattan@intel.com, john.mcnamara@intel.com, marko.kovacevic@intel.com, JananeeX M Parthasarathy , Bruce Richardson , David Marchand Content-Type: text/plain; charset="UTF-8" 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" On Mon, Jul 8, 2019 at 4:18 PM Aaron Conole wrote: > > 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. Worth mentioning that you can run `meson test --list` to see a list of all available tests > > >> + > >> + > >> +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?