summaryrefslogtreecommitdiff
path: root/devtools
AgeCommit message (Collapse)Author
2019-03-27devtools: fix config check when building tagsBruce Richardson
The check for a valid configuration in build-tags.sh relied on the output of "make showconfig" rather than checking directly for a config file of that name. This broke when as part of the rename of the linuxapp/bsdapp configs to just linux/freebsd, as we stopped advertising the old names even if they worked. Changing the code to just look for the config file by name fixes this issue while shortening the code too. Fixes: 218c4e68c1d9 ("mk: use linux and freebsd in config names") Fixes: aafaea3d3b70 ("devtools: add tags and cscope index generation") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-03-13devtools: fix meson build test to exit on failureBruce Richardson
When piping the ninja command through cat, we lose the error value from the call to ninja in the case of failure. This prevents the script from exiting at the first broken build. Fix this by setting the "pipefail" shell option. Fixes: 4bcb9b768604 ("devtools: add verbose option to meson build test") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12mk: use linux and freebsd in config namesBruce Richardson
Rather than using linuxapp and bsdapp everywhere, we can change things to use the, more readable, terms "linux" and "freebsd" in our build configs. Rather than renaming the configs we can just duplicate the existing ones with the new names using symlinks, and use the new names exclusively internally. ["make showconfigs" also only shows the new names to keep the list short] The result is that backward compatibility is kept fully but any new builds or development can be done using the newer names, i.e. both "make config T=x86_64-native-linuxapp-gcc" and "T=x86_64-native-linux-gcc" work. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12build: rename linuxapp to linux in meson cross filesBruce Richardson
Rename the cross files for meson compilation from having linuxapp in the name to just linux in the name. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12eal/linux: rename linuxapp to linuxBruce Richardson
The term "linuxapp" is a legacy one, but just calling the subdirectory "linux" is just clearer for all concerned. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12eal/bsd: rename bsdapp to freebsdBruce Richardson
The term "bsdapp" is a legacy one, but just calling the subdirectory "freebsd" is just clearer for all concerned. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-04devtools: fix index generationFerruh Yigit
build-tags.sh is broken because of removed 'test' folder, this breaks helper make targets like 'make cscope', 'make tags', etc... Fixing it by removing 'test' from source directories list. Fixes: a9de470cc7c0 ("test: move to app directory") Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Rami Rosen <ramirose@gmail.com>
2019-03-04devtools: fix result of svg include checkMichael Santana
Fix trivial bug. In sh shell, 'foo = 1' is not the same as 'foo=1'. Using 'foo = 1' makes the shell attempt to interpret foo as a command, rather than a simple variable assignment. Fixes: dafc04c15174 ("devtools: fix return of forbidden addition checks") Cc: stable@dpdk.org Signed-off-by: Michael Santana <msantana@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-03-04devtools: enable codespell in checkpatchMichael Santana
Enable codespell by default. codespell is a feature by checkpatch.pl that checks for common spelling mistakes in patches. This feature is disabled by default. To enable it one must add the '--codespell' flag to the $options variable in checkpatches.sh. With this change codespell is enabled by default. The user can decide to turn off codespell from a one of the config files read by checkpatches.sh. Signed-off-by: Michael Santana <msantana@redhat.com> Reviewed-by: Rami Rosen <ramirose@gmail.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-03-01devtools: add verbose option to meson build testBruce Richardson
When running ninja, the commands are, by default, always printed on top of each other. For those who want more detail in the output, two levels of verbose output has been added to the test-meson-builds script. When "-v" is passed, or the "TEST_MESON_BUILD_VERBOSE" flag is set in the environment, then the output of ninja is passed through "cat" to prevent each line overwriting the next. If "-vv" is passed, or "TEST_MESON_BUILD_VERY_VERBOSE" is set in the environment, then ninja is called with the "-v" flag to print out each command in full as it is executing. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26devtools: fix build test on FreeBSDBruce Richardson
readlink option "-m" is not supported on FreeBSD (checked on BSD 11), so change to the largely-equivalent "-f" flag. Fixes: a55277a788df ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26test: move to app directoryBruce Richardson
Since all other apps have been moved to the "app" folder, the autotest app remains alone in the test folder. Rather than having an entire top-level folder for this, we can move it back to where it all started in early versions of DPDK - the "app/" folder. This move has a couple of advantages: * This reduces clutter at the top level of the project, due to one less folder. * It eliminates the separate build task necessary for building the autotests using make "make test-build" which means that developers are less likely to miss something in their own compilation tests * It re-aligns the final location of the test binary in the app folder when building with make with it's location in the source tree. For meson builds, the autotest app is different from the other apps in that it needs a series of different test cases defined for it for use by "meson test". Therefore, it does not get built as part of the main loop in the app folder, but gets built separately at the end. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-25devtools: add git log checks for DCB, TOS and TTLFerruh Yigit
Add case check to DCB, TOS and TTL abbreviations. Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-02-24devtools: fix test of some build optionsThomas Monjalon
CONFIG_RTE_LIBRTE_PMD_ISAL was not tested because of a typo. CONFIG_RTE_LIBRTE_PMD_QAT_SYM was not tested since it has been introduced and made CONFIG_RTE_LIBRTE_PMD_QAT enabled by default. While at it, DPDK_DEP_JSON is now checked for "y", as other DPDK_DEP_* variables, instead of non-empty. Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD") Fixes: 7a34c2155716 ("compress/qat: add empty driver") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-02-24devtools: test build of zlib PMDThomas Monjalon
The PMD zlib was not enabled in devtools/test-build.sh. It is fixed by using the environment variable DPDK_DEP_ZLIB. Fixes: 0c4e4c16b004 ("compress/zlib: introduce zlib PMD") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-24devtools: add libelf dependency to build testThomas Monjalon
The option CONFIG_RTE_LIBRTE_BPF_ELF was never enabled with test-build.sh. It is fixed with the environment variable DPDK_DEP_ELF. Fixes: 5dba93ae5f2d ("bpf: add ability to load eBPF program from ELF object file") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-01-14devtools: fix build check for whether meson has runBruce Richardson
The current check to see whether we need to call meson or just ninja simply checked if the build directory existed. However, if meson was run but failed, the build directory would still exist. We can fix this by instead checking for the build.ninja file inside the directory. Once that is present, we can use ninja safely and let it worry about rerunning meson if necessary. Fixes: a55277a788df ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2019-01-10devtools: fix wrong headline lowercase for armGavin Hu
Change to the new wording according to Arm corp: https://mails.dpdk.org/archives/dev/2018-October/115174.html otherwise, "Wrong headline lowercase" may be falsely reported. Fixes: f146ada21d1e ("scripts: add more git log checks") Cc: stable@dpdk.org Signed-off-by: Gavin Hu <gavin.hu@arm.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2018-12-21devtools: fix return of forbidden addition checksArnon Warshavsky
Explicitly collect the error code of the multiple awk script calls. Bugzilla ID: 165 Fixes: 4d4c612e6a30 ("devtools: check wrong svg include in guides") Cc: stable@dpdk.org Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
2018-12-01devtools: fix symbol check when adding experimental sectionDavid Marchand
The incriminated commit did relax the condition to catch all sections but dropped the + removal which can trigger false detection of the special EXPERIMENTAL section when adding symbols and the section in the same patch. Fixes: 7281cf520f89 ("devtools: relax rule for identifying symbol section") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-11-30devtools: report the incorrect section when complainingDavid Marchand
It does not hurt reporting the incriminated section. Before: ERROR: symbol rte_plop is added in a section other than the EXPERIMENTAL section of the version map After: ERROR: symbol rte_plop is added in the DPDK_19.02 section, but is expected to be added in the EXPERIMENTAL section of the version map Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-11-18devtools: fix regex in symbol addition checkNeil Horman
The regex to determine the end of the map file chunk in a patch seems to be wrong, It was using perl regex syntax, which awk doesn't appear to support (I'm still not sure how it was working previously). Regardless, it wasn't triggering and as a result symbols were getting added to the mapdb that shouldn't be there. Fix it by converting the regex to use traditional posix syntax, matching only on the negation of the character class [^map] Tested and shown to be working on the ip_frag patch set provided by doucette@bu.edu Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Cc: stable@dpdk.org Reported-by: Cody Doucette <doucette@bu.edu> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
2018-11-04devtools: add explicit warnings for forbidden tokensArnon Warshavsky
Replace the content of warning in the forbidden tokens script from using the searched regex into using explicit messages Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
2018-11-01devtools: check wrong svg include in guidesThomas Monjalon
Including svg files with the svg extension is a common mistake: .. figure:: example.svg must be .. figure:: example.* So it will work also when building pdf doc with figures converted to png files. A check is added in checkpatches.sh. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
2018-10-27telemetry: add client feature and socketsCiara Power
This patch introduces clients to the telemetry API. When a client makes a connection through the initial telemetry socket, they can send a message through the socket to be parsed. Register messages are expected through this socket, to enable clients to register and have a client socket setup for future communications. A TAILQ is used to store all clients information. Using this, the client sockets are polled for messages, which will later be parsed and dealt with accordingly. Functionality that make use of the client sockets were introduced in this patch also, such as writing to client sockets, and sending error responses. Signed-off-by: Ciara Power <ciara.power@intel.com> Signed-off-by: Brian Archbold <brian.archbold@intel.com> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-25devtools: add git log checks for PHYFerruh Yigit
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-25devtools: add git check exception for OCTEON TXAnoob Joseph
The 'TX' in OCTEON TX would cause a warning. Adding an exception for that. OCTEON TX is a registered product under Cavium Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
2018-10-25devtools: fix alignment of Marvell build optionsThomas Monjalon
Really minor issue: There were extra spaces making the alignment wrong. Fixes: e95faac15110 ("crypto/mrvl: rename PMD to mvsam") Fixes: 4ccc8d770d3b ("net/mvneta: add PMD skeleton") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-11net/mvneta: add PMD skeletonZyta Szpak
Add neta pmd driver skeleton providing base for the further development. Signed-off-by: Natalie Samsonov <nsamsono@marvell.com> Signed-off-by: Yelena Krivosheev <yelena@marvell.com> Signed-off-by: Dmitri Epshtein <dima@marvell.com> Signed-off-by: Zyta Szpak <zr@semihalf.com> Signed-off-by: Andrzej Ostruszka <amo@semihalf.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-01devtools: use a common prefix for temporary filesThomas Monjalon
Some temporary files were generated in /tmp, others in the current directory, and none was "dpdk prefixed". All these files have a common path prefix now: $TMPDIR/dpdk. TMPDIR is /tmp by default. Note: the previous use of mktemp, with a template but without -t, was generating a file in the current directory. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-01devtools: fix printing subject of checked patchThomas Monjalon
If checkpatches.sh is not run with verbose option (-v), the patch subject is printed as headline of errors only if there is an error reported by checkpatch.pl, not with other checks. The headline is moved to a function which is called after each check if there is an error and if it has not already be printed. One more addition, in verbose mode, checkpatch.pl is now announced as done for other checks. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-10-01devtools: move awk script ckecking forbidden tokensArnon Warshavsky
The awk code previously read inline in checkpatches.sh was using -d which is a bash option, while bash is not the default shell in all distributions. Now moved to be read from a separate file. Signed-off-by: Arnon Warshavsky <arnon@qwilt.com> Acked-by: Andrzej Ostruszka <amo@semihalf.com>
2018-09-18devtools: use shared libs to save space in build testBruce Richardson
For usability, the default build type in meson is static, so that binaries can be run from the build directory easily. However, static builds take more space, so for build-testing purposes default to using shared builds where possible. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2018-08-21devtools: relax rule for identifying symbol sectionNeil Horman
It was reported recently that some patches that add symbols to an existing EXPERIMENTAL section of a version map file generate errors because the check-symbol-change script was identifying the section as "@@" rather than EXPERIMENTAL. This was fairly clearly due to the fact that the rule identifying the version section expected the whole section to be added, rather than having it already exist, with only new symbols being added to the existing section. This led the match rule to misread the format of that line and pull the wrong word out of it. The fix is to relax the rule slightly. Rather than assume that the section must exist on a line that was added, allow the section name to be set by any line that ends in a '{', which should be correct, given our coding practices. The section name is then extracted as the next to the last word on the line ( $(NF-1) ). Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Cc: stable@dpdk.org Reported-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Tested-by: Nikhil Rao <nikhil.rao@intel.com>
2018-08-09devtools: fix symbol check for dashThomas Monjalon
The script check-symbol-change.sh was not running when /bin/sh redirects to dash. Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Cc: nhorman@tuxdriver.com Reported-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-08-01devtools: fix checkpatch with dashGavin Hu
When running checkpatch.sh, it generates the following error on some linux distributions(like Debian) with Dash as the default shell interpreter. trap: SIGINT: bad trap The fix is to replace SIGINT with INT signal, it works for both bash and dash. Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition") Cc: stable@dpdk.org Signed-off-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Acked-by: John McNamara <john.mcnamara@intel.com> Tested-by: Vipin Varghese <vipin.varghese@intel.com>
2018-07-31devtools: alert on new calls to exit from libsArnon Warshavsky
This patch adds a new function that is called per every checked patch, and alerts for new instances of rte_panic/rte_exit. The check excludes comments, and alerts in the case of a positive balance between additions and removals. Signed-off-by: Arnon Warshavsky <arnon@qwilt.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Tested-by: Kevin Traynor <ktraynor@redhat.com>
2018-07-26devtools: add compressdev tests to build testPablo de Lara
Compressdev tests depend on Zlib library, so they can only be enabled if this is available. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-26devtools: remove already enabled nfp from build testPablo de Lara
NFP PMD does not have any external dependency. It only requires Linux OS, so it is not needed to be enabled in the test-build script. Fixes: 80987c40fd28 ("config: enable nfp driver on Linux") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-07-20devtools: fix checkpatch for filename with spaceThomas Monjalon
If the patch filename or the temporary file path have a space in their name, the script checkpatches.sh does not work. The variables for the filenames must be enclosed in quotes in order to preserve spaces. Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-07-20devtools: fix symbol check for filename with spaceThomas Monjalon
If the patch filename or the temporary file path have a space in their name, the script check-symbol-change.sh does not work. The variables for the filenames must be enclosed in quotes in order to preserve spaces. Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-07-16devtools: add checks for ABI symbol additionNeil Horman
Recently, some additional patches were added to allow for programmatic marking of C symbols as experimental. The addition of these markers is dependent on the manual addition of exported symbols to the EXPERIMENTAL section of the corresponding libraries version map file. The consensus on review is that, in addition to mandating the addition of symbols to the EXPERIMENTAL version in the map, we need a mechanism to enforce our documented process of mandating that addition when they are introduced. To that end, I am proposing this change. It is an addition to the checkpatches script, which scan incoming patches for additions and removals of symbols to the map file, and warns the user appropriately. Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
2018-07-11devtools: expand meson cross compiling test coverageGavin Hu
The default test script covers only default host cc compiler, either gcc or clang, the fix is to increase the coverage by adding one more to cover clang and the others for gcc. Fixes: a55277a788 ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Song Zhu <song.zhu@arm.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-07-11devtools: fix ninja command in build testGavin Hu
On some linux distributions, eg: CentOS, the ninja executable has a different name: ninja-build, this patch is to check and adapt to it accordingly. ./devtools/test-meson-builds.sh: line 24: ninja: command not found Fixes: a55277a788 ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Song Zhu <song.zhu@arm.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-06-14devtools: fix ARM builds test with mesonBruce Richardson
For cross-builds the CC environmental variable only applies for compiling native binaries i.e. pmdinfogen, so setting it to a cross-build compiler will only cause problems. Leave the value unset in the script to use the platform-default compiler. Fixes: a55277a788df ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-06-08devtools: ignore SPDX warning of checkpatchStephen Hemminger
Since DPDK developers have decided to use a different tag format than the kernel developers, ignore warnings about SPDX tags. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-05-29devtools: check orphan symbols in map filesThomas Monjalon
The script check-symbol-maps.sh finds the symbols exported in a map file but not referenced in the codebase. Suggested-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-29devtools: add test script for meson buildsBruce Richardson
To simplify testing with the meson and ninja builds, we can add a script to set up and do multiple builds. Currently this script sets up: * clang and gcc builds * builds using static and shared linkage for binaries (libs are always built as both) * a build using the lowest instruction-set level for x86 (-march=nehalem) * cross-builds for each cross-file listed in config/arm Each build is configured in a directory ending in *-build, and then for the build stage, we just call ninja in each directory in turn. [i.e. we assume every directory starting with "build-" is a meson build, which is probably an ok assumption]. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-25use SPDX tag for 6WIND copyrighted filesOlivier Matz
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2018-05-25use SPDX license tag in Mellanox copyrighted filesThomas Monjalon
Some files were left with full license and wrong copyright format. They are switched to this format: SPDX-License-Identifier: BSD-3-Clause Copyright 2017 Mellanox Technologies, Ltd Fixes: 5feecc57d90b ("align SPDX Mellanox copyrights") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>