Commit 3c37900b authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test/abi: limit the scope of the comparisons with SPDK headers

Resolves issue described in:
(ed7054e3) test/abi: remove checking exported API from headers

Using '--header-dir' options when doing abidiff limited the
scope of changes visible too much. Some of the changes in API
were not caught, like the ones described in commit above.

Reason for this was due to option '--no-show-locs' being
present when generating the XML files for comparison.
Because of lack of information where certain functions/structures
were present, their scope was lower than anticipated.
Thus removing '--header-dir' resulted in catching them again.
This is why the issue was only present when comparing with XMLs.
See patch resolving this on spdk-abi side:
https://review.spdk.io/gerrit/c/spdk/spdk-abi/+/19027/



NOTE:
Test for abi compatibility has switched from using .so from
prior release to XML together with SPDK v23.01 release.
After the v23.01 release the major version of ABI is bumped
across libraries.
Due to the above, only after SPDK v23.05 release the issue
could be caught. Thanks to Konrad's keene eye during reviews,
this can be fixed before v23.09 which would cause ABI discrepacny.

Once this patch is merged, there will be no SPDK release with
mismatching ABI version vs actual libraries content.

Reported-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia63063b27c9b2b065c585a9b2df16ea81a9c548a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19028


Reviewed-by: default avatarJim Harris <jim.harris@gmail.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 5ec4a069
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -101,20 +101,6 @@ function confirm_abi_deps() {
	name = spdk_bs_opts
[suppress_type]
	name = spdk_app_opts
# To be removed, comes from nvme_internal.h
[suppress_type]
	name = spdk_nvme_qpair
# The 4 types below are related to changes in __bdev_io_internal_fields
[suppress_type]
	name = spdk_ftl_dev
[suppress_type]
	name = ftl_io
[suppress_type]
        name = __bdev_io_internal_fields
        soname_regexp = libspdk_ftl\\.so\\.*
[suppress_type]
        name = spdk_bdev_io
        soname_regexp = libspdk_ftl\\.so\\.*
EOF

	for object in "$libdir"/libspdk_*.so; do
@@ -128,6 +114,8 @@ EOF

		cmd_args=('abidiff'
			$source_abi_dir/$release/$so_file "$libdir/$so_file"
			'--headers-dir1' $source_abi_dir/$release/include
			'--headers-dir2' $rootdir/include
			'--leaf-changes-only' '--suppressions' $suppression_file)

		if ! output=$("${cmd_args[@]}" --stat); then