Commit 6f97efb7 authored by Seth Howell's avatar Seth Howell Committed by Tomasz Zawadzki
Browse files

test/make: add leaf type changes check to check_so_deps.



This is an important aspect of ABI versioning.

There was a change to the spdk_bdev_opts struct
which is accessible from the public API that results
in an ABI change.

There was also a change in the spdk_accel_module_if struct that
will affect new modules so its major version needs to be revved.

There was also a change in the publically accessible rmda_hooks
structure which forced an ABI change in the NVMe library.

Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Change-Id: I5cc6886fe01b4adc2836b6e15995471f0361dc29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2663


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 4bca12f1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

SO_VER := 2
SO_MINOR := 3
SO_VER := 3
SO_MINOR := 0

LIBNAME = accel
C_SRCS = accel_engine.c
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

SO_VER := 2
SO_VER := 3
SO_MINOR := 0

ifeq ($(CONFIG_VTUNE),y)
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

SO_VER := 3
SO_VER := 4
SO_MINOR := 0

C_SRCS = nvme_ctrlr_cmd.c nvme_ctrlr.c nvme_fabric.c nvme_ns_cmd.c nvme_ns.c nvme_pcie.c nvme_qpair.c nvme.c nvme_quirks.c nvme_transport.c nvme_uevent.c nvme_ctrlr_ocssd_cmd.c \
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.lib_deps.mk


ifeq ($(SPDK_MAP_FILE),)
$(error SPDK_MAP_FILE is not set for lib $(LIBNAME))
endif
+11 −0
Original line number Diff line number Diff line
@@ -291,15 +291,26 @@ EOF
			old_so_maj=$(readlink $source_abi_dir/$so_file | awk -F'\\.so\\.' '{print $2}' | cut -d '.' -f1)
			old_so_min=$(readlink $source_abi_dir/$so_file | awk -F'\\.so\\.' '{print $2}' | cut -d '.' -f2)
			so_name_changed=$(grep "ELF SONAME changed" <<< "$output") || so_name_changed="No"
			leaf_type_summary=$(grep "leaf types summary" <<< "$output") || true
			function_summary=$(grep "functions summary" <<< "$output")
			variable_summary=$(grep "variables summary" <<< "$output")
			# remove any filtered out variables.
			leaf_type_summary=$(sed "s/ [()][^)]*[)]//g" <<< "$leaf_type_summary")
			function_summary=$(sed "s/ [()][^)]*[)]//g" <<< "$function_summary")
			variable_summary=$(sed "s/ [()][^)]*[)]//g" <<< "$variable_summary")

			read -r _ _ _ _ changed_leaf_types _ _ _ <<< "$leaf_type_summary" || changed_leaf_types=0
			read -r _ _ _ removed_functions _ changed_functions _ added_functions _ <<< "$function_summary"
			read -r _ _ _ removed_vars _ changed_vars _ added_vars _ <<< "$variable_summary"

			if [ $changed_leaf_types -ne 0 ]; then
				if [ "$new_so_maj" == "$old_so_maj" ]; then
					touch $fail_file
					echo "Please update the major SO version for $so_file. A header accesible type has been modified since last release."
				fi
				found_abi_change=true
			fi

			if [ $removed_functions -ne 0 ] || [ $removed_vars -ne 0 ]; then
				if [ "$new_so_maj" == "$old_so_maj" ]; then
					touch $fail_file