On Tue, Jun 8, 2021 at 7:50 AM Narcisa Ana Maria Vasile
<navas...@linux.microsoft.com> wrote:
>
> On Fri, Jun 04, 2021 at 04:44:34PM -0700, Narcisa Ana Maria Vasile wrote:
> > From: Narcisa Vasile <navas...@microsoft.com>
> >
> > Rename pthread_* occurrences with the new rte_thread_* API.
> > Enable the new API in the build system.
> >
> > Signed-off-by: Narcisa Vasile <navas...@microsoft.com>
> > ---
>
> I'll send v10.
> Can someone please help with an example on how to check for ABI breaks? Thank 
> you!
>
> I've run:
> DPDK_ABI_REF_VERSION=v21.05 DPDK_ABI_REF_DIR=~/ref 
> ./devtools/test-meson-builds.sh
> which doesn't give any warnings about the ABI break.

This should work the way you tried if you have working toolchains and
libabigail installed.
Something is off in your env.

Side note: ovsrobot is out those days (we have some trouble in one of
RH labs and it happens ovsrobot is hosted there), but you could try
with a github repo of yours + GHA, and the ABI failure should be
caught too.


I just tried on my rhel7 (gcc 4.8.5 + libabigail 1.8.2) with your
series applied.
$ DPDK_ABI_REF_VERSION=v21.05
DPDK_ABI_REF_DIR=~/git/pub/dpdk.org/reference
./devtools/test-meson-builds.sh
...
Error: ABI issue reported for 'abidiff --suppr
/home/dmarchan/git/pub/dpdk.org/devtools/../devtools/libabigail.abignore
--no-added-syms --headers-dir1
/home/dmarchan/git/pub/dpdk.org/reference/v21.05/build-gcc-shared/usr/local/include
--headers-dir2 
/home/dmarchan/git/pub/dpdk.org/build-gcc-shared/install/usr/local/include
/home/dmarchan/git/pub/dpdk.org/reference/v21.05/build-gcc-shared/dump/librte_eal.dump
/home/dmarchan/git/pub/dpdk.org/build-gcc-shared/install/dump/librte_eal.dump'
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged
this as a potential issue).


$ abidiff --suppr
/home/dmarchan/git/pub/dpdk.org/devtools/../devtools/libabigail.abignore
--no-added-syms --headers-dir1
/home/dmarchan/git/pub/dpdk.org/reference/v21.05/build-gcc-shared/usr/local/include
--headers-dir2 
/home/dmarchan/git/pub/dpdk.org/build-gcc-shared/install/usr/local/include
/home/dmarchan/git/pub/dpdk.org/reference/v21.05/build-gcc-shared/dump/librte_eal.dump
/home/dmarchan/git/pub/dpdk.org/build-gcc-shared/install/dump/librte_eal.dump
Functions changes summary: 0 Removed, 2 Changed (1 filtered out), 0
Added (20 filtered out) functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

2 functions with some indirect sub-type change:

  [C] 'function int rte_ctrl_thread_create(pthread_t*, const char*,
const pthread_attr_t*, void* (void*)*, void*)' at rte_lcore.h:443:1
has some indirect sub-type changes:
    parameter 1 of type 'pthread_t*' changed:
      in pointed to type 'typedef pthread_t' at rte_thread.h:42:1:
        typedef name changed from pthread_t to rte_thread_t at rte_thread.h:42:1
        underlying type 'unsigned long int' changed:
          entity changed from 'unsigned long int' to 'struct
rte_thread_tag' at rte_thread.h:40:1
          type size hasn't changed
    parameter 3 of type 'const pthread_attr_t*' changed:
      in pointed to type 'const pthread_attr_t':
        'const pthread_attr_t' changed to 'const rte_thread_attr_t'

  [C] 'function int rte_thread_setname(pthread_t, const char*)' at
rte_lcore.h:377:1 has some indirect sub-type changes:
    parameter 1 of type 'typedef pthread_t' changed:
      typedef name changed from pthread_t to rte_thread_t at rte_thread.h:42:1
      underlying type 'unsigned long int' changed:
        entity changed from 'unsigned long int' to 'struct
rte_thread_tag' at rte_thread.h:40:1
        type size hasn't changed



Can you check that in your env build-gcc-shared/ and the build
directory for references are configured with debug symbols?
You should see:
$ meson configure build-gcc-shared | awk '$1=="buildtype" {print $2}'
debugoptimized
$ meson configure reference/v21.05/build | awk '$1=="buildtype" {print $2}'
debugoptimized




>
> I've cloned the dpdk repo in "~/ref" and checkout v21.05 tag.
> "~/dpdk" is on a local branch that contains my changes:
>
> "./devtools/check-abi.sh ~/ref ~/dpdk" - didn't work.
>
> I've then used gen-abi.sh (with a small change to skip the *.symbols,
> since abidw can't handle them) to generate the *.dump files. Reruning 
> check-abi.sh

gen-abi.sh is an internal script that works for an installed dpdk, not
a build directory.
$ ./devtools/gen-abi.sh
Usage: ./devtools/gen-abi.sh installdir


> worked this time, but didn't show the ABI break. This is the entire output:
>
> ------
> WARNING: could not identify an include directory for /home/administrator/ref, 
> expect false positives...
> WARNING: could not identify an include directory for 
> /home/administrator/dpdk, expect false positives...

check-abi.sh tries to find an include/ directory to filter changes on
private structures.
But there are multiple include/ dirs in a build directory, so the
script gives up on trying to filter and logs a warning.
This is not clearly written but, like gen-abi.sh, check-abi.sh works
on an installed directory.


> Functions changes summary: 0 Removed, 0 Changed, 0 Added function
> Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
> Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
> referenced by debug info
> ------
>
> I've also tried to compare each file:
> abidiff --suppr ./devtools/libabigail.abignore --no-added-syms  
> ~/ref/dump/librte_eal.dump ~/dpdk/dump/librte_eal.dump
>

Without debug info, libabigail won't catch/report much but symbol
removals, or basic changes in function signatures.


-- 
David Marchand

Reply via email to