doc: add meson ut enhancements in prog guide
PATCH 1/1 doc: add meson ut enhancements in prog guide
Add a programmer's guide section for meson ut enhancements
--- doc/guides/prog_guide/index.rst | 1 + .../prog_guide/meson_ut_enhancements.rst | 158 ++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 doc/guides/prog_guide/meson_ut_enhancements.rst
doc/guides/prog_guide/index.rst +1 -0
@@ -57,6 +57,7 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + meson_ut_enhancements extend_dpdk build_app ext_app_lib_make_help
doc/guides/prog_guide/meson_ut_enhancements.rst new file +158 -0
158 lines not on this page · raw message
Signature · 1 line
2.17.2
12/12/2018 12:35, Hari Kumar Vemula:
doc/guides/prog_guide/meson_ut_enhancements.rst line 4
Quoted 7 lines
doc/guides/prog_guide/meson_ut_enhancements.rst new file +4
-0@@ -0,0 +1,158 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2014-2018 Intel Corporation. + +.. _Meson_UT_Enhancements:
No need to add such anchor. The doc can be referred with :doc: syntax.
doc/guides/prog_guide/meson_ut_enhancements.rst line 7
Quoted 3 lines
doc/guides/prog_guide/meson_ut_enhancements.rst new file +3
-0+ +Meson_UT_Enhancements +=====================
You should make a doc about how to run the tests with meson, not how you improved it.
In short, please remove "enhancements" point of view.
Quoted 4 lines
doc/guides/prog_guide/meson_ut_enhancements.rst new file +4
-0+ +The meson build support for unit tests is now available and the more enhancements are done to the build system +to classify unit tests under different categories. The build `test/test/meson.build` file has been +modified for these enhancements. This document will further down describe the below list.
PATCH v2 1/1 doc: add meson ut info in prog guide
In reply to Hari Kumar VemulaAdd a programmer's guide section for meson ut
---
v2: Removed enhancement details
--- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/meson_ut.rst | 164 +++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 doc/guides/prog_guide/meson_ut.rst
doc/guides/prog_guide/index.rst +1 -0
@@ -58,6 +58,7 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + meson_ut extend_dpdk build_app ext_app_lib_make_help
doc/guides/prog_guide/meson_ut.rst new file +164 -0
164 lines not on this page · raw message
Signature · 1 line
2.17.2
Re: [PATCH v2] doc: add meson ut info in prog guide
Quoted 47 lines · Hari Kumar Vemula
Add a programmer's guide section for meson ut
Signed-off-by Hari Kumar Vemula <[email protected]>---
v2: Removed enhancement details--- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/meson_ut.rst | 164 +++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 doc/guides/prog_guide/meson_ut.rstdoc/guides/prog_guide/index.rst +1
-0@@ -58,6 +58,7 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + meson_ut extend_dpdk build_app ext_app_lib_make_helpdoc/guides/prog_guide/meson_ut.rst new file +18
-0@@ -0,0 +1,164 @@ +.. SPDX-License-Identifier: BSD-3-Clause + + Copyright(c) 2014-2018 Intel Corporation. + +.. _Meson: + +Meson_UT +======== + +The meson build for unit tests under different categories is supported using 'test/test/meson.build'. + +This document describes the below list in detail. + +* Building and Running the unit tests. +* Grouping of testcases. +* Parallel and non parallel tests. +* Test suites. +* How to run different test suites.
doc/guides/prog_guide/meson_ut.rst line 28
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+* Support for skipped tests. + + + +Building and Running the unit tests +----------------------------------- + +* Create the meson build output folder using command. + + ``$meson <build_dir>``
Here and with the commands below, leave a space between the '$' and the command to show that it's the prompt and not the variable '$meson'
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ +* Enter into build output folder, which was created by above command. + + ``$cd build`` + +* Compile DPDK using `$ninja`. + The output file of the build will be available in meson build folder.
doc/guides/prog_guide/meson_ut.rst line 45
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ After successful ninja command, binary `dpdk-test` is created in `build/test/test/`. + +* Run the unit testcases. + + ``$ninja test`` (or) ``$meson test`` + +* To rebuild the build directory, after any changes to meson.build. + + ``$meson configure`` +
This should not be necesary. If you make any changes to meson.build then ninja will automatically detect that and call meson to reconfigure itself automatically.
Also, I don't think the rebuilding of the software is within the scope of the section of the document. I'd omit the whole bullet point.
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+* To run specific test case via meson command. + + ``$meson test <test case>`` (or) ``$ninja test <test case>`` + + + +Grouping of testcases +--------------------- + +Testcases has been grouped into below four different groups based on conditions +of time duration and performance of the individual testcase. +
doc/guides/prog_guide/meson_ut.rst line 67
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+* fast_parallel_test_names +* fast_non_parallel_test_names +* perf_test_names +* driver_test_names +* dump_test_names + +Parallel and non parallel tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Unless specified the meson will run all unit tests as parallel by default.
"meson" rather than "the meson" sounds better. Comma needed after "specified". I'd also look to shorten the next sentence and merge it with the one above, which sounds incomplete.
doc/guides/prog_guide/meson_ut.rst line 72
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+So the test cases are categorized into parallel and non parallel tests purely +based on test case functionality using `is_parallel` argument of `test()` +in meson.build. Test cases marked with `is_parallel : true` will run in +parallel and tests marked with `is_parallel : false` will run in non-parallel. +While non-parallel test is running, any other test should not be run.
"any other test should not be run" -> "no other tests should run".
doc/guides/prog_guide/meson_ut.rst
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+Parallel and non parallel test cases are grouped under the +`fast_parallel_test_names` and `fast_non_parallel_test_names`. + + + +Test suites +~~~~~~~~~~~ + +Test groups are considered as "suite??? in `meson.build` and can be provided +as argument to `test()` as `suite ???project_name:label???` + + Ex: ``suite ???DPDK:fast-tests???``
Watch out for the use of smart-quotes in the text above. Regular single and double quotes are recommended.
When passing a suite to the meson to run, you use "--suite", so please include the "--" prefix to avoid confusion.
Quoted 23 lines
doc/guides/prog_guide/meson_ut.rst new file +23
-0+ +Running different test suites +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Below are commands to run testcases using option `suite` + +* Test cases from the groups `fast_parallel_test_names` and `fast_non_parallel_test_names` + are run under 10seconds and below is the meson command to run them. + + ``$meson test --suite DPDK:fast-tests`` + +* Test cases from the group `perf_test_names` are run under 600 seconds + and below is the meson command to run them. + + ``$meson test --suite DPDK:perf-tests`` + +* Test cases from the group `driver_test_names` are run under 600 seconds + and below is the meson command to run them. + + ``$meson test --suite DPDK:driver-tests`` + +* Test cases from the group `dump_test_names` are run under 600 seconds + and below is the meson command to run them.
doc/guides/prog_guide/meson_ut.rst line 117
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ + ``$meson test --suite DPDK:dump-tests`` + + + +Skipped testcases +----------------- + +Some unit test cases have dependency on external libraries, driver modules or +config flags, without which the test cases cannot be run, such test cases
Break the sentence after "run".
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+should return TEST_SKIPPED when mentioned dependencies are not enabled. To make +test cases run user should enable relevant dependencies. Below are the few +current scenarios when test cases are skipped: + +#. External library dependency paths are not set. +#. Config flag for the dependent library is not enabled. +#. Dependent driver modules are not installed on the system. + +Dependent library paths can be set using below +
doc/guides/prog_guide/meson_ut.rst line 137
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+* Single path ``export LIBRARY_PATH=path`` + +* Multiple paths ``export LIBRARY_PATH=path1:path2:path3`` + +Dependent library headers path can be exported as below. + +* Single path ``$CFLAGS=-I/path meson build`` + +* Multiple paths ``$CFLAGS=-I/path1 -I/path2 meson build`` +
Please be consistent with use of "export" or not. Also, consistently (or not) using "$" for prompt would be good too.
Quoted 9 lines
doc/guides/prog_guide/meson_ut.rst new file +9
-0+Below examples shows how to export libraries and their header paths. + +To export single library at a time. + + ``$export LIBRARY_PATH=/root/wireless_libs/zuc/`` + ``$CFLAGS=-I/root/wireless_libs/zuc/include meson build`` + +To export multiple libraries at a time. +
doc/guides/prog_guide/meson_ut.rst line 156
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ ``$export LIBRARY_PATH=/root/wireless_libs/zuc/:/root/wireless_libs/`` \ + ``libsso_kasumi/build/`` + ``$CFLAGS=-I/root/wireless_libs/zuc/include -I/root/wireless_libs/`` \ + ``libsso_kasumi/include meson build`` + + + +Commands to run meson UTs +------------------------- +
I'd suggest adding "Summary" into the title here - "Summary of Commands ..."
Quoted 11 lines
doc/guides/prog_guide/meson_ut.rst new file +8
-0+* To run all test cases + ``$meson test`` +* To run specific test + ``$meson test testcase_name`` + Ex:``$meson test acl_autotest`` +* To run specific test suite + ``$meson test --suite DPDK:suite_name`` + Ex:``$meson test --suite DPDK:fast-tests``Signature · 1 line
2.17.2
Regards,
/Bruce
PATCH v3 1/1 doc: add meson ut info in prog guide
In reply to Hari Kumar VemulaAdd a programmer's guide section for meson ut
---
v3: Modified
v2: Removed enhancement details
--- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/meson_ut.rst | 159 +++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 doc/guides/prog_guide/meson_ut.rst
doc/guides/prog_guide/index.rst +1 -0
@@ -58,6 +58,7 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + meson_ut extend_dpdk build_app ext_app_lib_make_help
doc/guides/prog_guide/meson_ut.rst new file +159 -0
159 lines not on this page · raw message
Signature · 1 line
2.17.2
Re: [PATCH v3] doc: add meson ut info in prog guide
Quoted 13 lines
-----Original Message-----
From: Vemula, Hari KumarX
Sent: Thursday, January 24, 2019 1:42 PM
To: [email protected]
Cc: Mcnamara, John <[email protected]>; Pattan, Reshma <[email protected]>; Richardson, Bruce <[email protected]>; Kovacevic, Marko <[email protected]>; Parthasarathy, JananeeX M <[email protected]>; Vemula, Hari KumarX <[email protected]>
Subject: [PATCH v3] doc: add meson ut info in prog guide
Quoted 7 lines
Add a programmer's guide section for meson ut
Signed-off-by Hari Kumar Vemula <[email protected]>---
v3: Modified
v2: Removed enhancement details
---
Some typos and suggested reworking below.
/Bruce
<snip>
doc/guides/prog_guide/meson_ut.rst
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + +Test suites +~~~~~~~~~~~ + +Test groups are considered as `--suite` in `meson.build` and can be
"Tests are grouped into test suites in meson.build and these suite names can be"
Quoted 1 line
+provided as argument to
test()as--suite ‘project_name:label’.
"test()" => "meson test"
Review
Quoted 2 lines
(quoted diff) +2
-0+ + Ex: ``$ mesin test --suite ‘DPDK:fast-tests’``
mesin => meson
<snip>
PATCH v4 1/1 doc: add meson ut info in prog guide
In reply to Hari Kumar VemulaAdd a programmer's guide section for meson ut
---
v4: Typos corrected
v3: Modified
v2: Removed enhancement details
--- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/meson_ut.rst | 159 +++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 doc/guides/prog_guide/meson_ut.rst
doc/guides/prog_guide/index.rst +1 -0
@@ -58,6 +58,7 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + meson_ut extend_dpdk build_app ext_app_lib_make_help
doc/guides/prog_guide/meson_ut.rst new file +159 -0
159 lines not on this page · raw message
Signature · 1 line
2.17.2
Re: [PATCH v4] doc: add meson ut info in prog guide
Quoted 8 lines · Hari Kumar Vemula
Add a programmer's guide section for meson ut
Signed-off-by Hari Kumar Vemula <[email protected]>---
v4: Typos corrected
v3: Modified
v2: Removed enhancement details
---
Some sections I think need rewording to be written more from an end-user rather than developer point of view, since this text is focused on running unit tests rather than on writing them. Some additional spelling/grammar corrections below also.
NOTE: Since this is in the programmers guide, maybe the intention is to have it more at the programmer level. In which case, you need more info on writing tests, and what return values should be used etc. other than "TEST_SKIPPED", and can skip some of the detail on running tests.
Regards,
/Bruce
Quoted 23 lines
doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/meson_ut.rst | 159 +++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 doc/guides/prog_guide/meson_ut.rstdoc/guides/prog_guide/index.rst +1
-0@@ -58,6 +58,7 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + meson_ut extend_dpdk build_app ext_app_lib_make_helpdoc/guides/prog_guide/meson_ut.rst new file +0
-0
doc/guides/prog_guide/meson_ut.rst line 3
Quoted 3 lines
doc/guides/prog_guide/meson_ut.rst new file +3
-0@@ -0,0 +1,159 @@ +.. SPDX-License-Identifier: BSD-3-Clause + + Copyright(c) 2014-2018 Intel Corporation.
Should be just 2019, or 2018-2019, since this doc was not started in 2014.
doc/guides/prog_guide/meson_ut.rst line 11
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst new file +8
-0+ +.. _Meson: + +Meson_UT +======== + +The meson build for unit tests under different categories is supported using 'test/test/meson.build'. +
This line is not wrong, just probably unnecessary. Consider omitting it, I think, since this doc is about using the unit tests rather than about the source code layout or individual files.
doc/guides/prog_guide/meson_ut.rst line 17
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+This document describes the below list in detail. + +* Building and Running the unit tests. +* Grouping of testcases. +* Parallel and non parallel tests. +* Test suites.
Are test suites not the same as the grouping of test cases?
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+* How to run different test suites. +* Support for skipped tests. + + + +Building and Running the unit tests +-----------------------------------
doc/guides/prog_guide/meson_ut.rst line 34
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ +* Create the meson build output folder using command. + + ``$ meson <build_dir>`` + +* Enter into build output folder, which was created by above command. + + ``$ cd build`` + +* Compile DPDK using `$ ninja`.
Like the other commands above, this should be put on its own line.
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ The output file of the build will be available in meson build folder. + After successful ninja command, binary `dpdk-test` is created in `build/test/test/`. + +* Run the unit testcases. + + ``$ ninja test`` (or) ``$ meson test`` +
doc/guides/prog_guide/meson_ut.rst line 51
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+* To run specific test case via meson command. + + ``$ meson test <test case>`` (or) ``$ ninja test <test case>`` + + + +Grouping of testcases +--------------------- + +Testcases has been grouped into below four different groups based on conditions
has -> have.
Remove the word "below" as it's unnecessary.
doc/guides/prog_guide/meson_ut.rst line 58
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+of time duration and performance of the individual testcase. + +* fast_parallel_test_names +* fast_non_parallel_test_names +* perf_test_names +* driver_test_names +* dump_test_names
Since you are listing the groups, I think you should just put the groups without using the official variable names, which looks wrong and doesn't add any info. Instead the list should be:
* 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
doc/guides/prog_guide/meson_ut.rst line 70
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ +Parallel and non parallel tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By default, meson will run test cases in parallel. However `is_parallel` argument +of `test()` in meson.build can be used to run tests in parallel or non-parallel +mode based on its functionality. Test cases marked with `is_parallel : true` will +run in parallel and tests marked with `is_parallel : false` will run in non-parallel. +While non-parallel test is running, no other test should run. +Parallel and non parallel test cases are grouped under the `fast_parallel_test_names` +and `fast_non_parallel_test_names`. +
The above paragraph is too low level. It can probably be dropped or abbreviated to a single sentence included in the previous section. Again, this text seems targeted at users, not developers, so variable names in the meson.build file are irrelevant.
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + +Test suites +~~~~~~~~~~~ + +Tests are grouped into test suites in meson.build and these suite names can be provided
doc/guides/prog_guide/meson_ut.rst line 86
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+as argument to `meson test` as `--suite ???project_name:label???`. + + Ex: ``$ meson test --suite ???DPDK:fast-tests???`` + +Running different test suites +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Below are commands to run testcases using option `suite` + +* Test cases from the groups `fast_parallel_test_names` and `fast_non_parallel_test_names`
Again, drop the variable names. Not relevant for users.
doc/guides/prog_guide/meson_ut.rst line 87
Quoted 1 line
doc/guides/prog_guide/meson_ut.rst new file +1
-0+ are run under 10seconds and below is the meson command to run them.
"are run under 10seconds" -> "should take less than 10 seconds"
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ + ``$ meson test --suite DPDK:fast-tests`` + +* Test cases from the group `perf_test_names` are run under 600 seconds
doc/guides/prog_guide/meson_ut.rst line 101
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ and below is the meson command to run them. + + ``$ meson test --suite DPDK:perf-tests`` + +* Test cases from the group `driver_test_names` are run under 600 seconds + and below is the meson command to run them. + + ``$ meson test --suite DPDK:driver-tests`` + +* Test cases from the group `dump_test_names` are run under 600 seconds
Since these just output things, do they really need a 600 second timeout? Do we even need to mention it?
doc/guides/prog_guide/meson_ut.rst line 111
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ and below is the meson command to run them. + + ``$ meson test --suite DPDK:dump-tests`` + + + +Skipped testcases +----------------- + +Some unit test cases have dependency on external libraries, driver modules or
"have dependency" -> "have a dependency"
doc/guides/prog_guide/meson_ut.rst line 115
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+config flags, without which the test cases cannot be run. Such test cases +should return TEST_SKIPPED when mentioned dependencies are not enabled. To make +test cases run user should enable relevant dependencies. Below are the few +current scenarios when test cases are skipped:
Needs rewording for a more user-focused point of view, since TEST_SKIPPED is an internal "magic number" in the code. Something like:
"Such test cases will be reported out 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:"
doc/guides/prog_guide/meson_ut.rst line 117
Quoted 2 lines
doc/guides/prog_guide/meson_ut.rst new file +2
-0+ +#. External library dependency paths are not set.
The high-level problem is more that the library is not found, not that the path is unset. The solution is to set the path to the dependency if necessary.
doc/guides/prog_guide/meson_ut.rst line 121
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+#. Config flag for the dependent library is not enabled. +#. Dependent driver modules are not installed on the system. + +Dependent library paths can be set using below
"To help find missing libraries, the user can specify addition search paths for those libraries as below:"
doc/guides/prog_guide/meson_ut.rst line 127
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ +* Single path ``$ export LIBRARY_PATH=path`` + +* Multiple paths ``$ export LIBRARY_PATH=path1:path2:path3`` + +Dependent library headers path can be stated as part of meson build command as below.
"Some functionality may be disabled due to library headers being missed as part of the build. To specify an addition search path for headers at configuration time, use one of the commands below:"
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ +* Single path ``$ CFLAGS=-I/path meson build`` + +* Multiple paths ``$ CFLAGS=-I/path1 -I/path2 meson build`` + +Below examples shows how to export libraries and their header paths. + +To specify single library at a time. + + ``$ export LIBRARY_PATH=/root/wireless_libs/zuc/`` + ``$ CFLAGS=-I/root/wireless_libs/zuc/include meson build`` +
doc/guides/prog_guide/meson_ut.rst line 149
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+To specify multiple libraries at a time. + + ``$ export LIBRARY_PATH=/root/wireless_libs/zuc/:/root/wireless_libs/`` \ + ``libsso_kasumi/build/`` + ``$ CFLAGS=-I/root/wireless_libs/zuc/include -I/root/wireless_libs/`` \ + ``libsso_kasumi/include meson build`` + + + +Summery of Commands to run meson UTs
"Summary"
Quoted 13 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+------------------------------------ + +* To run all test cases + ``$ meson test`` +* To run specific test + ``$ meson test testcase_name`` + Ex:``$ meson test acl_autotest`` +* To run specific test suite + ``$ meson test --suite DPDK:suite_name`` + Ex:``$ meson test --suite DPDK:fast-tests``Signature · 1 line
2.17.2
PATCH v5 1/1 doc: add meson ut info in prog guide
In reply to Hari Kumar VemulaAdd a programmer's guide section for meson ut
---
v5: Modified
v4: Typos corrected
v3: Modified
v2: Removed enhancement details
--- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/meson_ut.rst | 143 +++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 doc/guides/prog_guide/meson_ut.rst
doc/guides/prog_guide/index.rst +1 -0
@@ -58,6 +58,7 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + meson_ut extend_dpdk build_app ext_app_lib_make_help
doc/guides/prog_guide/meson_ut.rst new file +143 -0
143 lines not on this page · raw message
Signature · 1 line
2.17.2
Re: [PATCH v5] doc: add meson ut info in prog guide
Quoted 3 lines · Hari Kumar Vemula
Add a programmer's guide section for meson ut
Signed-off-by Hari Kumar Vemula <[email protected]>
Re: [dpdk-dev] [PATCH v5] doc: add meson ut info in prog guide
In reply to Hari Kumar Vemula02/02/2019 11:28, Hari Kumar Vemula:
doc/guides/prog_guide/meson_ut.rst line 3
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +3
-0@@ -0,0 +1,143 @@ +.. SPDX-License-Identifier: BSD-3-Clause + + Copyright(c) 2018-2019 Intel Corporation.
Why inserting a blank line between SPDX and Copyright.
doc/guides/prog_guide/meson_ut.rst line 8
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +.. _Meson: + +Meson_UT +========
This is a title. Why having an underscore instead of space? Why not saying Unit Tests? Or better, "Run Unit Tests with Meson".
doc/guides/prog_guide/meson_ut.rst line 15
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ +This document describes the below list in detail. + +* Building and Running the unit tests. +* Grouping of testcases. +* How to run different test suites. +* Support for skipped tests.
This list is useless because automatically generated by Sphinx.
Sorry, I stop reading here.
Marko, John, did you try to review this patch?
Re: [dpdk-dev] [PATCH v5] doc: add meson ut info in prog guide
Quoted 4 lines
Quoted 3 lines
Sorry, I stop reading here.
Marko, John, did you try to review this patch?
Yes. I will review offline.
John
PATCH v6 1/1 doc: add meson ut info in prog guide
In reply to Hari Kumar VemulaAdd a programmer's guide section for meson ut
---
v6: Updated comments
v5: Modified
v4: Typos corrected
v3: Modified
v2: Removed enhancement details
--- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/meson_ut.rst | 151 +++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 doc/guides/prog_guide/meson_ut.rst
doc/guides/prog_guide/index.rst +1 -0
@@ -60,6 +60,7 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + meson_ut extend_dpdk build_app ext_app_lib_make_help
doc/guides/prog_guide/meson_ut.rst new file +151 -0
151 lines not on this page · raw message
Signature · 1 line
2.14.1
Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guide
Hi please find some comments below:
06/06/2019 13:59, Hari Kumar Vemula:
Review line 2
Quoted 4 lines
+++
b/doc/guides/prog_guide/meson_ut.rst(quoted diff) +2
-0@@ -0,0 +1,151 @@ +.. SPDX-License-Identifier: BSD-3-Clause +
Useless blank line.
doc/guides/prog_guide/meson_ut.rst line 5
Quoted 3 lines
doc/guides/prog_guide/meson_ut.rst new file +3
-0+ Copyright(c) 2018-2019 Intel Corporation. + +.. _meson_unit_tests:
Useless anchor. The doc can be referenced with :doc: links.
doc/guides/prog_guide/meson_ut.rst line 10
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +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.
doc/guides/prog_guide/meson_ut.rst line 22
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ + +Building and running the unit tests +----------------------------------- + +* Create the meson build output folder using the following command:: + + $ meson <build_dir> + +* Enter into build output folder, which was created by above command:: + + $ cd build
Should be the same as above: <build_dir>
doc/guides/prog_guide/meson_ut.rst line 26
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +* 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.
doc/guides/prog_guide/meson_ut.rst line 30
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +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.
doc/guides/prog_guide/meson_ut.rst line 42
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ +* Run the unit testcases:: + + $ ninja test + # or + $ meson test + +* To run specific test case via meson:: + + $ meson test <test case> + # or + $ ninja test <test case>
Would be worth to mention why meson or ninja can be used.
doc/guides/prog_guide/meson_ut.rst line 49
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ + +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.
Quoted 40 lines
doc/guides/prog_guide/meson_ut.rst new file +40
-0+ +* 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``: + +* 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:: +
doc/guides/prog_guide/meson_ut.rst line 99
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ $ 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.
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + +Dealing with skipped testcases +------------------------------ + +Some unit test cases have a dependency on external libraries, driver modules
doc/guides/prog_guide/meson_ut.rst line 115
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+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 ?
Quoted 11 lines
doc/guides/prog_guide/meson_ut.rst new file +11
-0+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
doc/guides/prog_guide/meson_ut.rst line 136
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+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.
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +Below are some examples that show how to export libraries and their header +paths. + +To specify a single library at a time::
doc/guides/prog_guide/meson_ut.rst line 151
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ + $ 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?
Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guide
Quoted 39 lines · Thomas Monjalon
Hi please find some comments below:
06/06/2019 13:59, Hari Kumar Vemula:
Review line 2
Quoted 4 lines
+++
b/doc/guides/prog_guide/meson_ut.rst(quoted diff) +2
-0@@ -0,0 +1,151 @@ +.. SPDX-License-Identifier: BSD-3-Clause +Useless blank line.
doc/guides/prog_guide/meson_ut.rst line 5
Quoted 3 lines
doc/guides/prog_guide/meson_ut.rst new file +3
-0+ Copyright(c) 2018-2019 Intel Corporation. + +.. _meson_unit_tests:Useless anchor. The doc can be referenced with :doc: links.
doc/guides/prog_guide/meson_ut.rst line 10
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +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.
doc/guides/prog_guide/meson_ut.rst line 22
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ + +Building and running the unit tests +----------------------------------- + +* Create the meson build output folder using the following command:: + + $ meson <build_dir> + +* Enter into build output folder, which was created by above command:: + + $ cd buildShould be the same as above: <
build_dir>
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 26
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +* Compile DPDK using command:: + + $ ninjaDo we really need to repeat above basic steps? Would be easier to just reference another guide about meson. I think
doc/build-sdk-meson.txtshould be moved to .rst.
+1
Quoted 56 lines
doc/guides/prog_guide/meson_ut.rst line 30
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +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.
doc/guides/prog_guide/meson_ut.rst line 42
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ +* Run the unit testcases:: + + $ ninja test + # or + $ meson test + +* To run specific test case via meson:: + + $ meson test <test case> + # or + $ ninja test <test case>Would be worth to mention why meson or ninja can be used.
doc/guides/prog_guide/meson_ut.rst line 49
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ + +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.Quoted 23 lines
doc/guides/prog_guide/meson_ut.rst new file +23
-0+ +* 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:: + +
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 80
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst new file +8
-0+ $ 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.
Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+* 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::
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 99
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + $ meson test --suite DPDK:driver-tests + +* The meson command to run Dump Tests is:: + + $ meson test --suite DPDK:dump-testsWould 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.
Quoted 61 lines
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + +Dealing with skipped testcases +------------------------------ + +Some unit test cases have a dependency on external libraries, driver modulesdoc/guides/prog_guide/meson_ut.rst line 115
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+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 pathsaddition -> additional ?
Quoted 11 lines
doc/guides/prog_guide/meson_ut.rst new file +11
-0+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 partdoc/guides/prog_guide/meson_ut.rst line 136
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+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 buildSome quotes are missing to set multiple paths.
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +Below are some examples that show how to export libraries and their header +paths. + +To specify a single library at a time::doc/guides/prog_guide/meson_ut.rst line 151
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ + $ 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 buildWhy export is used for
LIBRARY_PATHand not CFLAGS?
I think both variables can be exported or prepend the meson command?
Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guide
Quoted 143 lines · Aaron Conole
Quoted 39 lines · Thomas Monjalon
Hi please find some comments below:
06/06/2019 13:59, Hari Kumar Vemula:
Review line 2
Quoted 4 lines
+++
b/doc/guides/prog_guide/meson_ut.rst(quoted diff) +2
-0@@ -0,0 +1,151 @@ +.. SPDX-License-Identifier: BSD-3-Clause +Useless blank line.
doc/guides/prog_guide/meson_ut.rst line 5
Quoted 3 lines
doc/guides/prog_guide/meson_ut.rst new file +3
-0+ Copyright(c) 2018-2019 Intel Corporation. + +.. _meson_unit_tests:Useless anchor. The doc can be referenced with :doc: links.
doc/guides/prog_guide/meson_ut.rst line 10
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +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.
doc/guides/prog_guide/meson_ut.rst line 22
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ + +Building and running the unit tests +----------------------------------- + +* Create the meson build output folder using the following command:: + + $ meson <build_dir> + +* Enter into build output folder, which was created by above command:: + + $ cd buildShould be the same as above: <
build_dir>Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 26
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +* Compile DPDK using command:: + + $ ninjaDo we really need to repeat above basic steps? Would be easier to just reference another guide about meson. I think
doc/build-sdk-meson.txtshould be moved to .rst.+1
Quoted 56 lines
doc/guides/prog_guide/meson_ut.rst line 30
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +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.
doc/guides/prog_guide/meson_ut.rst line 42
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ +* Run the unit testcases:: + + $ ninja test + # or + $ meson test + +* To run specific test case via meson:: + + $ meson test <test case> + # or + $ ninja test <test case>Would be worth to mention why meson or ninja can be used.
doc/guides/prog_guide/meson_ut.rst line 49
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ + +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.Quoted 23 lines
doc/guides/prog_guide/meson_ut.rst new file +23
-0+ +* 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:: + +Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 80
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst new file +8
-0+ $ 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.Quoted 12 lines
Quoted 12 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+* 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::Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 99
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + $ meson test --suite DPDK:driver-tests + +* The meson command to run Dump Tests is:: + + $ meson test --suite DPDK:dump-testsWould be simpler to just list the suites.
Quoted 2 lines
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
Quoted 62 lines
Quoted 62 lines
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + +Dealing with skipped testcases +------------------------------ + +Some unit test cases have a dependency on external libraries, driver modulesdoc/guides/prog_guide/meson_ut.rst line 115
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+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 pathsaddition -> additional ?
Quoted 11 lines
doc/guides/prog_guide/meson_ut.rst new file +11
-0+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 partdoc/guides/prog_guide/meson_ut.rst line 136
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+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 buildSome quotes are missing to set multiple paths.
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +Below are some examples that show how to export libraries and their header +paths. + +To specify a single library at a time::doc/guides/prog_guide/meson_ut.rst line 151
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ + $ 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 buildWhy export is used for
LIBRARY_PATHand not CFLAGS?
I think both variables can be exported or prepend the meson command?
Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guide
Hi,
Quoted 31 lines
-----Original Message-----
From: Michael Santana Francisco [mailto:[email protected]]
Sent: Wednesday, July 10, 2019 12:28 AM
To: Aaron Conole <[email protected]>
Cc: Thomas Monjalon <[email protected]>; Hari Kumar Vemula <[email protected]>; dev <[email protected]>; Pattan, Reshma <[email protected]>; Mcnamara, John <[email protected]>; Kovacevic, Marko <[email protected]>; Parthasarathy, JananeeX M <[email protected]>; Richardson, Bruce <[email protected]>; David Marchand <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guideQuoted 17 lines · Aaron Conole
Quoted 14 lines · Thomas Monjalon
Hi please find some comments below:
06/06/2019 13:59, Hari Kumar Vemula:
Review line 2
Quoted 4 lines
+++
b/doc/guides/prog_guide/meson_ut.rst(quoted diff) +2
-0@@ -0,0 +1,151 @@ +.. SPDX-License-Identifier: BSD-3-Clause +Useless blank line.
Quoted 3 lines
doc/guides/prog_guide/meson_ut.rst new file +3
-0+ Copyright(c) 2018-2019 Intel Corporation. + +.. _meson_unit_tests:
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Useless anchor. The doc can be referenced with :doc: links.
doc/guides/prog_guide/meson_ut.rst
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +Running DPDK Unit Tests with Meson +================================== + +This section describes how to run testcases with the DPDK meson buildsystem.
Quoted 2 lines
Quoted 2 lines
Here and below, "testcases" should be split in two words.
Will correct it.
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
doc/guides/prog_guide/meson_ut.rst line 22
Quoted 13 lines
doc/guides/prog_guide/meson_ut.rst new file +12
-0+ + +Building and running the unit tests +----------------------------------- + +* Create the meson build output folder using the following command:: + + $ meson <build_dir> + +* Enter into build output folder, which was created by above command:: + + $ cd buildShould be the same as above: <
build_dir>
Will change accordingly.
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
doc/guides/prog_guide/meson_ut.rst line 26
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +* Compile DPDK using command:: + + $ ninjaDo we really need to repeat above basic steps? Would be easier to just reference another guide about meson. I think
doc/build-sdk-meson.txtshould be moved to .rst.
Quoted 2 lines
Quoted 2 lines
+1
This doc helps to run UT, having basic steps in same page will help user to go through together and execute the same. Just for few lines moving back and forth to different pages might be bit confusing.
Anyway still if you would prefer to remove these then only 2 sections will be available in this doc. Please let us know if it is ok.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Review line 30
Quoted 4 lines
(quoted diff) +4
-0+ +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.
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ +* Run the unit testcases:: + + $ ninja test + # or + $ meson test +Quoted 8 lines
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 42
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+* To run specific test case via meson:: + + $ meson test <test case> + # or + $ ninja test <test case>Would be worth to mention why meson or ninja can be used.
OK
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ + +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.
Thanks for the info. We observed that fast parallel test group is removed.
Now we have four groups - fast, perf, driver, debug - all in non-parallel mode We will update the same.
Quoted 64 lines
Quoted 64 lines
Quoted 27 lines
Quoted 27 lines
doc/guides/prog_guide/meson_ut.rst new file +26
-0+ +* 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-testsQuoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 80
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst new file +8
-0+ + +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.Quoted 23 lines
Quoted 11 lines
doc/guides/prog_guide/meson_ut.rst new file +11
-0+* 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-testsdoc/guides/prog_guide/meson_ut.rst line 99
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ +* 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-testsWould be simpler to just list the suites.
Quoted 5 lines
Quoted 2 lines
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 --listto see a list of all available testsQuoted 1 line
Will update the same and remove multiple lines.
Quoted 44 lines
Quoted 10 lines
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ + +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 whytests may be skipped and how they may be resolved:
Quoted 33 lines
Quoted 33 lines
doc/guides/prog_guide/meson_ut.rst
Quoted 7 lines
doc/guides/prog_guide/meson_ut.rst new file +7
-0+ +#. 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 pathsaddition -> additional ?
Quoted 11 lines
doc/guides/prog_guide/meson_ut.rst new file +11
-0+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 beingdoc/guides/prog_guide/meson_ut.rst line 136
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+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 buildSome quotes are missing to set multiple paths.
Is <build_dir> meant here?
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ +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::
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 151
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ + $ export LIBRARY_PATH=/path/zuc/:/path/libsso_kasumi/build/ + $ CFLAGS=-I/path/zuc/include \ + -I/path/libsso_kasumi/include \ + meson buildWhy export is used for
LIBRARY_PATHand not CFLAGS?
I think both variables can be exported or prepend the meson command?
CFLAGS given in meson command works and also CFLAGS can be exported.LIBRARY_PATH cannot be prepended to meson command. We tried but it is not reflecting the required values. Environment variables set using export is considered and not as command line args of meson command.
Will send the next version patch addressing these comments.
Thanks
M.P.Jananee
Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guide
22/07/2019 14:39, Parthasarathy, JananeeX M:
Quoted 28 lines
From: Michael Santana Francisco [mailto:[email protected]]
Quoted 14 lines · Aaron Conole
Quoted 13 lines
Quoted 4 lines · Thomas Monjalon
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+Building and running the unit tests +----------------------------------- + +* Create the meson build output folder using the following command::Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 22
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + $ meson <build_dir> + +* Enter into build output folder, which was created by above command:: + + $ cd buildShould be the same as above: <
build_dir>Will change accordingly.
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
doc/guides/prog_guide/meson_ut.rst line 26
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +* Compile DPDK using command:: + + $ ninjaDo we really need to repeat above basic steps? Would be easier to just reference another guide about meson. I think
doc/build-sdk-meson.txtshould be moved to .rst.
Quoted 6 lines
Quoted 1 line
Quoted 1 line
+1
This doc helps to run UT, having basic steps in same page will help user to go through together and execute the same. Just for few lines moving back and forth to different pages might be bit confusing.
Anyway still if you would prefer to remove these then only 2 sections will be available in this doc. Please let us know if it is ok.
I think it is better to avoid repetition.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst line 136
Quoted 3 lines
doc/guides/prog_guide/meson_ut.rst new file +3
-0+* Multiple paths:: + + $ CFLAGS=-I/path1 -I/path2 meson buildSome quotes are missing to set multiple paths.
Is <
build_dir> meant here?
I am just saying that space-separated value require some quotes.
Quoted 18 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
doc/guides/prog_guide/meson_ut.rst new file +9
-0+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::Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 151
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ + $ export LIBRARY_PATH=/path/zuc/:/path/libsso_kasumi/build/ + $ CFLAGS=-I/path/zuc/include \ + -I/path/libsso_kasumi/include \ + meson buildWhy export is used for
LIBRARY_PATHand not CFLAGS?
I think both variables can be exported or prepend the meson command?
Quoted 3 lines
CFLAGS given in meson command works and also CFLAGS can be exported.
LIBRARY_PATHcannot be prepended to meson command. We tried but it is not reflecting the required values. Environment variables set using export is considered and not as command line args of meson command.
Please we need to understand why LIBRARY_PATH is not working when preprended in the meson command.
Do you have more informations?
Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guide
Quoted 67 lines · Thomas Monjalon
22/07/2019 14:39, Parthasarathy, JananeeX M:
Quoted 28 lines
From: Michael Santana Francisco [mailto:[email protected]]
Quoted 14 lines · Aaron Conole
Quoted 13 lines
Quoted 4 lines · Thomas Monjalon
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+Building and running the unit tests +----------------------------------- + +* Create the meson build output folder using the following command::Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst line 22
Quoted 6 lines
doc/guides/prog_guide/meson_ut.rst new file +6
-0+ + $ meson <build_dir> + +* Enter into build output folder, which was created by above command:: + + $ cd buildShould be the same as above: <
build_dir>Will change accordingly.
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
doc/guides/prog_guide/meson_ut.rst line 26
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+ +* Compile DPDK using command:: + + $ ninjaDo we really need to repeat above basic steps? Would be easier to just reference another guide about meson. I think
doc/build-sdk-meson.txtshould be moved to .rst.Quoted 6 lines
Quoted 1 line
Quoted 1 line
+1
This doc helps to run UT, having basic steps in same page will help user to go through together and execute the same. Just for few lines moving back and forth to different pages might be bit confusing.
Anyway still if you would prefer to remove these then only 2 sections will be available in this doc. Please let us know if it is ok.I think it is better to avoid repetition.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst line 136
Quoted 3 lines
doc/guides/prog_guide/meson_ut.rst new file +3
-0+* Multiple paths:: + + $ CFLAGS=-I/path1 -I/path2 meson buildSome quotes are missing to set multiple paths.
Is <
build_dir> meant here?I am just saying that space-separated value require some quotes.
Quoted 18 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 4 lines
doc/guides/prog_guide/meson_ut.rst new file +4
-0+Below are some examples that show how to export libraries and +their header paths. + +To specify a single library at a time::doc/guides/prog_guide/meson_ut.rst line 151
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ + $ 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 buildWhy export is used for
LIBRARY_PATHand not CFLAGS?
I think both variables can be exported or prepend the meson command?
Quoted 8 lines
Quoted 3 lines
CFLAGS given in meson command works and also CFLAGS can be exported.
LIBRARY_PATHcannot be prepended to meson command. We tried but it is not reflecting the required values. Environment variables set using export is considered and not as command line args of meson command.Please we need to understand why
LIBRARY_PATHis not working when preprended in the meson command.
Do you have more informations?
Rather than using the environment, one can also use "-Dc_args='...' -Dc_link_args='...'" when calling meson.
Otherwise, I agree with Thomas, we should find out why the LIBRARY_PATH doesn't work when passed in directly. I'm not aware of any reason it shouldn't work.
/Bruce
Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guide
Hi,
Quoted 100 lines
-----Original Message-----
From: Bruce Richardson [mailto:[email protected]]
Sent: Monday, July 22, 2019 7:23 PM
To: Thomas Monjalon <[email protected]>
Cc: Parthasarathy, JananeeX M <[email protected]>; [email protected]; Michael Santana Francisco <[email protected]>; Aaron Conole <[email protected]>; Hari Kumar Vemula <[email protected]>; Pattan, Reshma <[email protected]>; Mcnamara, John <[email protected]>; Kovacevic, Marko <[email protected]>; David Marchand <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v6] doc: add meson ut info in prog guideQuoted 3 lines · Thomas Monjalon
22/07/2019 14:39, Parthasarathy, JananeeX M:
Quoted 2 lines
From: Michael Santana Francisco [mailto:[email protected]]
Quoted 1 line
On Mon, Jul 8, 2019 at 4:18 PM Aaron Conole <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines · Thomas Monjalon
Review
Quoted 4 lines
(quoted diff) +4
-0+Building and running the unit tests +----------------------------------- + +* Create the meson build output folder using the followingcommand::
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ + $ meson <build_dir> + +* Enter into build output folder, which was created by abovecommand::
Quoted 17 lines
Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ + $ cd buildShould be the same as above: <
build_dir>Will change accordingly.
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Review
Quoted 5 lines
(quoted diff) +4
-0+ +* Compile DPDK using command:: + + $ ninjaDo we really need to repeat above basic steps? Would be easier to just reference another guide about meson. I think
doc/build-sdk-meson.txtshould be moved to .rst.Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
+1
This doc helps to run UT, having basic steps in same page will help user to
go through together and execute the same.
Quoted 1 line
Quoted 1 line
Just for few lines moving back and forth to different pages might be bit
confusing.
Quoted 1 line
Quoted 1 line
Anyway still if you would prefer to remove these then only 2 sections will
be available in this doc.
Quoted 11 lines
Quoted 1 line
Please let us know if it is ok.
I think it is better to avoid repetition.
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+* Multiple paths:: + + $ CFLAGS=-I/path1 -I/path2 meson buildSome quotes are missing to set multiple paths.
Quoted 21 lines
Quoted 1 line
Is <
build_dir> meant here?I am just saying that space-separated value require some quotes.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 4 lines
(quoted diff) +4
-0+Below are some examples that show how to export libraries and +their header paths. + +To specify a single library at a time::Review
Quoted 10 lines
(quoted diff) +10
-0+ + $ 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 buildWhy export is used for
LIBRARY_PATHand not CFLAGS? I think both variables can be exported or prepend the mesoncommand?
Quoted 2 lines
Quoted 2 lines
CFLAGS given in meson command works and also CFLAGS can be
exported.
Quoted 1 line
Quoted 1 line
LIBRARY_PATHcannot be prepended to meson command. We tried but itis not reflecting the required values.
Quoted 1 line
Quoted 1 line
Environment variables set using export is considered and not as command
line args of meson command.
Quoted 5 lines
Please we need to understand why
LIBRARY_PATHis not working when preprended in the meson command.
Do you have more informations?
Quoted 8 lines
Rather than using the environment, one can also use "-Dc_args='...' -Dc_link_args='...'" when calling meson.
Otherwise, I agree with Thomas, we should find out why the
LIBRARY_PATHdoesn't work when passed in directly. I'm not aware of any reason it shouldn't work./Bruce
As per our earlier analysis,
LDFLAGS was not supported earlier in meson command.
find_library() is used to check whether the external dependency library exists or not in order to configure the build.
This function uses the standard system path to check existence of library, or else LIBRARY_PATH can be used as environment variable for custom paths. LIBRARY_PATH is not supported directly (not a build configure option).
Only recently we can observe that LDFLAGS support is included in meson and linker options can be provided using LDFLAGS.
$ CFLAGS=-fsomething LDFLAGS=-Wl,--linker-flag meson <options>
Although LDFLAGS can be used and build configuration gets updated in LINK_ARGS,
'dependencies' option of static_library and shared_library() should be an object which is return value from dependency()/find_library(). Due to use of find_library() currently, we need to set the environment variable.
Regards
M.P.Jananee
PATCH v7 1/1 doc: add meson ut info in prog guide
In reply to Hari Kumar VemulaFrom: Hari Kumar Vemula <[email protected]>
Add a programmer's guide section for meson ut
---
v7: Updated v6 patch comments
v6: Updated comments
v5: Modified
v4: Typos corrected
v3: Modified
v2: Removed enhancement details
---
.../prog_guide/build-sdk-meson.rst} | 7 +-
doc/guides/prog_guide/index.rst | 2 +
doc/guides/prog_guide/meson_ut.rst | 92 +++++++++++++++++++
3 files changed, 98 insertions(+), 3 deletions(-)
rename doc/{build-sdk-meson.txt => guides/prog_guide/build-sdk-meson.rst} (97%)
create mode 100644 doc/guides/prog_guide/meson_ut.rstdoc/guides/prog_guide/build-sdk-meson.rst renamed from doc/build-sdk-meson.txt +4 -3
@@ -1,5 +1,5 @@ -INSTALLING DPDK USING THE MESON BUILD SYSTEM ---------------------------------------------- +Installing DPDK Using the meson build system +============================================ Summary --------
@@ -162,7 +162,8 @@ command:: For example if the target machine is arm64 we can use the following command:: - meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc + + meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc where config/arm/arm64_armv8_linux_gcc contains settings for the compilers and other build tools to be used, as well as characteristics of the target
doc/guides/prog_guide/index.rst +2 -0
@@ -60,6 +60,8 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + build-sdk-meson + meson_ut extend_dpdk build_app ext_app_lib_make_help
doc/guides/prog_guide/meson_ut.rst new file +92 -0
92 lines not on this page · raw message
Signature · 1 line
2.17.2
Re: [dpdk-dev] [PATCH v7] doc: add meson ut info in prog guide
Quoted 31 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Agalya Babu RadhaKrishnan
Sent: Wednesday, August 7, 2019 7:26 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Hari Kumar Vemula <[email protected]>
Subject: [dpdk-dev] [PATCH v7] doc: add meson ut info in prog guideFrom: Hari Kumar Vemula <[email protected]>
Add a programmer's guide section for meson ut
Signed-off-by Hari Kumar Vemula <[email protected]>Acked-by Bruce Richardson <[email protected]>---
v7: Updated v6 patch comments
v6: Updated comments
v5: Modified
v4: Typos corrected
v3: Modified
v2: Removed enhancement details
---doc/guides/prog_guide/meson_ut.rst new file +6
-0+ +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``.
doc/guides/prog_guide/meson_ut.rst line 36
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ +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
I think, It is good mention about the timeout and/or other valid(if any) UT parameter as well.
Re: [dpdk-dev] [PATCH v7] doc: add meson ut info in prog guide
In reply to Agalya Babu RadhaKrishnanQuoted 65 lines · Agalya Babu RadhaKrishnan
From: Hari Kumar Vemula <[email protected]>
Add a programmer's guide section for meson ut
Signed-off-by Hari Kumar Vemula <[email protected]>Acked-by Bruce Richardson <[email protected]>---
v7: Updated v6 patch comments
v6: Updated comments
v5: Modified
v4: Typos corrected
v3: Modified
v2: Removed enhancement details--- .../prog_guide/build-sdk-meson.rst} | 7 +- doc/guides/prog_guide/index.rst | 2 + doc/guides/prog_guide/meson_ut.rst | 92 +++++++++++++++++++ 3 files changed, 98 insertions(+), 3 deletions(-)rename
doc/{build-sdk-meson.txt=>guides/prog_guide/build-sdk-meson.rst} (97%) create mode 100644doc/guides/prog_guide/meson_ut.rstdoc/guides/prog_guide/build-sdk-meson.rst renamed from doc/build-sdk-meson.txt +4
-3@@ -1,5 +1,5 @@ -INSTALLING DPDK USING THE MESON BUILD SYSTEM ---------------------------------------------- +Installing DPDK Using the meson build system +============================================ Summary --------@@ -162,7 +162,8 @@ command:: For example if the target machine is arm64 we can use the following command:: - meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc + + meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc where config/arm/arm64_armv8_linux_gcc contains settings for the compilers and other build tools to be used, as well as characteristics of the targetdoc/guides/prog_guide/index.rst +2
-0@@ -60,6 +60,8 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + build-sdk-meson + meson_ut extend_dpdk build_app ext_app_lib_make_helpdoc/guides/prog_guide/meson_ut.rst new file +0
-0
doc/guides/prog_guide/meson_ut.rst line 10
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0@@ -0,0 +1,92 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2018-2019 Intel Corporation. + +Running DPDK Unit Tests with Meson +================================== + +This section describes how to run test cases with the DPDK meson build system. + +Steps to build and run unit test cases using meson can be referred +in :doc:`build-sdk-meson`
I think this is misleading. As far as I can see build-sdk-meson doesn't provide any details as to how to "run" test cases. I think you meant to say build-sdk-meson has the steps to build dpdk, or something among those lines
doc/guides/prog_guide/meson_ut.rst line 15
Quoted 5 lines
doc/guides/prog_guide/meson_ut.rst new file +5
-0+ +Grouping of test cases +---------------------- + +Testcases have been grouped into four different groups.
space between Test and cases.
I prefer not having to use the word 'group' twice in the same sentence, it just sounds awkward to me. I would do s/different groups/different test suites/
doc/guides/prog_guide/meson_ut.rst line 23
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst new file +8
-0+ +* Fast tests. +* 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
space between Test and cases.
I would also mention that by default all tests run serially for better stability
doc/guides/prog_guide/meson_ut.rst line 31
Quoted 8 lines
doc/guides/prog_guide/meson_ut.rst new file +8
-0+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
I would also somehow mention that these examples only work when your current working directory is the build directory. If you are not in the build directory you need to pass the -C flag, so like:
$ meson test -C <build path> --suite DPDK:fast-tests
the build path can either be a relative path or an absolute path, but I would skip this detail
Quoted 13 lines
doc/guides/prog_guide/meson_ut.rst new file +13
-0+ +The project name is optional so the following is equivalent to the previous +command:: + + $ meson test --suite fast-tests + +The meson command to list all available tests:: + + $ meson test --list + + +Dealing with skipped test cases +-------------------------------
doc/guides/prog_guide/meson_ut.rst line 54
Quoted 10 lines
doc/guides/prog_guide/meson_ut.rst new file +10
-0+ +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.
#. Note enough processing cores. Some tests are skipped on machines with 2 or 4 cores
The rest lgtm
Quoted 38 lines
doc/guides/prog_guide/meson_ut.rst new file +38
-0+ +To help find missing libraries, the user can specify additional search paths +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` + +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
PATCH v8 1/1 doc: add meson ut info in prog guide
In reply to Agalya Babu RadhaKrishnanFrom: Hari Kumar Vemula <[email protected]>
Add a programmer's guide section for meson ut
---
v8: Addressed v7 patch comments
v7: Updated v6 patch comments
v6: Updated comments
v5: Modified
v4: Typos corrected
v3: Modified
v2: Removed enhancement details
---
.../prog_guide/build-sdk-meson.rst} | 7 +-
doc/guides/prog_guide/index.rst | 2 +
doc/guides/prog_guide/meson_ut.rst | 104 ++++++++++++++++++
3 files changed, 110 insertions(+), 3 deletions(-)
rename doc/{build-sdk-meson.txt => guides/prog_guide/build-sdk-meson.rst} (97%)
create mode 100644 doc/guides/prog_guide/meson_ut.rstdoc/guides/prog_guide/build-sdk-meson.rst renamed from doc/build-sdk-meson.txt +4 -3
@@ -1,5 +1,5 @@ -INSTALLING DPDK USING THE MESON BUILD SYSTEM ---------------------------------------------- +Installing DPDK Using the meson build system +============================================ Summary --------
@@ -162,7 +162,8 @@ command:: For example if the target machine is arm64 we can use the following command:: - meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc + + meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc where config/arm/arm64_armv8_linux_gcc contains settings for the compilers and other build tools to be used, as well as characteristics of the target
doc/guides/prog_guide/index.rst +2 -0
@@ -60,6 +60,8 @@ Programmer's Guide source_org dev_kit_build_system dev_kit_root_make_help + build-sdk-meson + meson_ut extend_dpdk build_app ext_app_lib_make_help
doc/guides/prog_guide/meson_ut.rst new file +104 -0
104 lines not on this page · raw message
Signature · 1 line
2.17.2
Re: [dpdk-dev] [PATCH v8] doc: add meson ut info in prog guide
12/08/2019 14:40, Jananee Parthasarathy:
Quoted 7 lines
From: Hari Kumar Vemula <[email protected]>
Add a programmer's guide section for meson ut
Signed-off-by Hari Kumar Vemula <[email protected]>Acked-by Bruce Richardson <[email protected]>Acked-by Michael Santana <[email protected]>
The last part about enabling some skipped test case is not correct. Because this patch is very old, I apply it without this last part:
Quoted 37 lines
doc/guides/prog_guide/meson_ut.rst new file +37
-0+To help find missing libraries, the user can specify additional search paths +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` + +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