Commit Graph

121 Commits

Author SHA1 Message Date
David Marchand
ee2b25c85a devtools: select patches to check with git range
Rather than default to origin/master.., it can be handy to choose the
range you want to check.

Example on a branch rebased on next-net:

Before:
$ ./devtools/checkpatches.sh
...
...
67/69 valid patches

After:
$ ./devtools/checkpatches.sh -r next-net/master..

3/3 valid patches

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-05-10 15:16:23 +02:00
David Marchand
af14b150df devtools: fix check of symbol added as stable API
The incriminated commit broke the detection of new symbols skipping the
EXPERIMENTAL step before entering a stable ABI section.
sed won't return an error, check a null output instead.

Fixes: 3630757803 ("devtools: accept experimental symbol promotion")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-05-10 00:19:31 +02:00
David Marchand
d4ef40f3c6 devtools: fix symbol name in check log
We have an incorrect variable name in this log.

Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-05-10 00:19:31 +02:00
David Marchand
f089713132 devtools: skip warning for reordered symbols
No need to shout when we are just reordering symbols in a section.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-05-10 00:19:31 +02:00
Peng Huang
92c9ba902d devtools: fix ABI compatibility check
The new default-taget "linux" is introduced in v19.05-rc1
but not exist in before release such as v19.02 which have
default-target "linuxapp", there is no compatibility report
when run validate-abi.sh to check ABI compatibility between
v19.05-rc1 and v19.02, changed default-target from "linux"
to "linuxapp" in validate-abi.sh

Fixes: 218c4e68c1 ("mk: use linux and freebsd in config names")
Cc: stable@dpdk.org

Signed-off-by: Peng Huang <peng.huang@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-05-02 01:44:20 +02:00
Bruce Richardson
e5f7bd199d devtools: fix meson build test for plain bourne shell
The pipefail option is not supported in /bin/sh, just in bash/ksh and
similar shells - which means it's there by default on most Linux distros
but not on e.g. FreeBSD. Therefore we check for it's presence before
setting the option, and if it's missing, we upgrade verbosity level if
needed to ensure we never hide any build failures.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-19 23:21:13 +02:00
Bruce Richardson
c039a73fc6 devtools: fix bash-isms in meson test
The use of "==" is non-standard extension from bash, so use "="
for comparisons instead.

Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 17:16:47 +02:00
Bruce Richardson
2660c6f653 devtools: support older compilers with meson test
Older versions of GCC, such as on Redhat/CentOS 7, don't support
-march=nehalem, but need -march=corei7 instead.

Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 17:16:01 +02:00
Bruce Richardson
e887ebb663 devtools: skip meson build for missing compilers
If either gcc or clang are missing, skip doing those builds.
This allows a setup to only do, e.g. gcc tests.

Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-04-17 17:15:55 +02:00
Ferruh Yigit
578505ef07 devtools: add git log checks for TPID, LACP and RETA
Add case check to TPID, LACP and RETA abbreviations.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-16 00:21:16 +02:00
David Marchand
3630757803 devtools: accept experimental symbol promotion
Currently, when symbols get promoted from the EXPERIMENTAL section to a
stable ABI section, the script complains they should go to the
EXPERIMENTAL section.

Example:
ERROR: symbol rte_devargs_add is added in the DPDK_19.05 section, but is
expected to be added in the EXPERIMENTAL section of the version map

This is legit.
Moving from a stable ABI to another is also allowed, but must have gone
through the proper process.

Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2019-04-16 00:12:22 +02:00
Rastislav Cernay
6435f9a0ac net/nfb: add new netcope driver
Added new net driver for Netcope nfb cards

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
2019-04-12 17:01:13 +02:00
Bruce Richardson
277b6e7ef4 devtools/cocci: create safer version of strlcpy script
The existing cocci script for coccinelle replaces all matching instances
of snprintf() with strlcpy() without regards to header inclusion. To allow
changes without build errors, we create a safer version of this script
that only makes changes when the rte_string_fns.h header is already
included.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-04-04 22:45:33 +02:00
Bruce Richardson
a5df16c1f7 devtools/cocci: make strlcpy replacement smarter
The original coccinelle script worked by replacing instances of
snprintf(.."%s",...) with strlcpy(), but only where the source and dest
parameters were plain identifiers. Allowing expressions for those params
opens up a wide range of other possible changes.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-04-04 22:44:02 +02:00
Thomas Monjalon
3c45889189 eal: remove exec-env directory
Only one header file (rte_kni_common.h) was in the sub-directory
	include/exec-env/
This file was installed in a sub-directory of the same name
in the makefile-based build.
Source and install directories are moved as below:

   lib/librte_eal/linux/eal/include/exec-env/
-> lib/librte_eal/linux/eal/include/

   build/include/exec-env/
-> build/include/

The consequence is to have a file hierarchy a bit more flat.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-02 21:49:35 +02:00
Bruce Richardson
d6cefc11e0 devtools: allow test build outside source directory
The test-meson-builds.sh script correctly detects the source directory and
builds the native builds successfully in a directory outside of the source
tree. However, the paths to the cross-files are not prefixed with the
source directory path, so the cross-builds all fail. Fix this by prepending
the source directory path appropriately.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-01 19:03:35 +02:00
Bruce Richardson
da68794de0 devtools: fix config check when building tags
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: 218c4e68c1 ("mk: use linux and freebsd in config names")
Fixes: aafaea3d3b ("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-27 00:56:34 +01:00
Bruce Richardson
5d91766730 devtools: fix meson build test to exit on failure
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: 4bcb9b7686 ("devtools: add verbose option to meson build test")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-13 11:09:55 +01:00
Bruce Richardson
218c4e68c1 mk: use linux and freebsd in config names
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-12 23:05:06 +01:00
Bruce Richardson
ae2f2fee24 build: rename linuxapp to linux in meson cross files
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-12 23:03:34 +01:00
Bruce Richardson
91d7846ce6 eal/linux: rename linuxapp to linux
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-12 17:31:13 +01:00
Bruce Richardson
25c99fbd68 eal/bsd: rename bsdapp to freebsd
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-12 17:30:20 +01:00
Ferruh Yigit
b66612e573 devtools: fix index generation
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: a9de470cc7 ("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-04 22:59:49 +01:00
Michael Santana
1f6168503e devtools: fix result of svg include check
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: dafc04c151 ("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-04 22:46:10 +01:00
Michael Santana
abdd314151 devtools: enable codespell in checkpatch
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-04 22:46:03 +01:00
Bruce Richardson
4bcb9b7686 devtools: add verbose option to meson build test
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-03-01 15:19:35 +01:00
Bruce Richardson
3655096fb1 devtools: fix build test on FreeBSD
readlink option "-m" is not supported on FreeBSD (checked on BSD 11),
so change to the largely-equivalent "-f" flag.

Fixes: a55277a788 ("devtools: add test script for meson builds")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 17:43:36 +01:00
Bruce Richardson
a9de470cc7 test: move to app directory
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-26 15:29:27 +01:00
Ferruh Yigit
9c3650aa10 devtools: add git log checks for DCB, TOS and TTL
Add case check to DCB, TOS and TTL abbreviations.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-02-25 00:07:17 +01:00
Thomas Monjalon
8fdac86abd devtools: fix test of some build options
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: 3c32e89f68 ("compress/isal: add skeleton ISA-L compression PMD")
Fixes: 7a34c21557 ("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-24 23:24:18 +01:00
Thomas Monjalon
fbe7134234 devtools: test build of zlib PMD
The PMD zlib was not enabled in devtools/test-build.sh.
It is fixed by using the environment variable DPDK_DEP_ZLIB.

Fixes: 0c4e4c16b0 ("compress/zlib: introduce zlib PMD")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-24 23:24:11 +01:00
Thomas Monjalon
814ad2a9bc devtools: add libelf dependency to build test
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: 5dba93ae5f ("bpf: add ability to load eBPF program from ELF object file")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-24 23:24:02 +01:00
Bruce Richardson
85e5fd8be0 devtools: fix build check for whether meson has run
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: a55277a788 ("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-14 12:24:57 +01:00
Gavin Hu
40fd874867 devtools: fix wrong headline lowercase for arm
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: f146ada21d ("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>
2019-01-10 10:19:01 +01:00
Arnon Warshavsky
dafc04c151 devtools: fix return of forbidden addition checks
Explicitly collect the error code of the multiple awk script calls.

Bugzilla ID: 165
Fixes: 4d4c612e6a ("devtools: check wrong svg include in guides")
Cc: stable@dpdk.org

Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
2018-12-21 01:58:23 +01:00
David Marchand
b0aa225b45 devtools: fix symbol check when adding experimental section
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: 7281cf520f ("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-12-01 00:44:31 +01:00
David Marchand
0fc7178e73 devtools: report the incorrect section when complaining
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-30 17:03:19 +00:00
Neil Horman
5a5f4676eb devtools: fix regex in symbol addition check
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: 4bec48184e ("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-18 23:38:26 +01:00
Arnon Warshavsky
b467d38284 devtools: add explicit warnings for forbidden tokens
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-04 21:54:04 +01:00
Thomas Monjalon
4d4c612e6a devtools: check wrong svg include in guides
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-11-01 22:13:33 +01:00
Ciara Power
ee5ff0d329 telemetry: add client feature and sockets
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-27 15:18:23 +02:00
Ferruh Yigit
9a26b2f839 devtools: add git log checks for PHY
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-25 16:52:43 +02:00
Anoob Joseph
d309534650 devtools: add git check exception for OCTEON TX
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-25 16:51:25 +02:00
Thomas Monjalon
9dcfe21ead devtools: fix alignment of Marvell build options
Really minor issue:
There were extra spaces making the alignment wrong.

Fixes: e95faac151 ("crypto/mrvl: rename PMD to mvsam")
Fixes: 4ccc8d770d ("net/mvneta: add PMD skeleton")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-25 16:47:13 +02:00
Zyta Szpak
4ccc8d770d net/mvneta: add PMD skeleton
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-11 18:53:48 +02:00
Thomas Monjalon
ff37ca5d37 devtools: use a common prefix for temporary files
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-01 23:51:45 +02:00
Thomas Monjalon
8f3ea0a03d devtools: fix printing subject of checked patch
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-01 23:46:50 +02:00
Arnon Warshavsky
42f4d724ec devtools: move awk script ckecking forbidden tokens
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-10-01 23:40:45 +02:00
Bruce Richardson
e4f2047190 devtools: use shared libs to save space in build test
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-09-18 15:11:46 +02:00
Neil Horman
7281cf520f devtools: relax rule for identifying symbol section
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: 4bec48184e ("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-21 11:03:10 +02:00