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: Seth Howell <seth.howell@intel.com> Change-Id: I5cc6886fe01b4adc2836b6e15995471f0361dc29 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2663 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
4bca12f1fe
commit
6f97efb784
@ -34,8 +34,8 @@
|
|||||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||||
|
|
||||||
SO_VER := 2
|
SO_VER := 3
|
||||||
SO_MINOR := 3
|
SO_MINOR := 0
|
||||||
|
|
||||||
LIBNAME = accel
|
LIBNAME = accel
|
||||||
C_SRCS = accel_engine.c
|
C_SRCS = accel_engine.c
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||||
|
|
||||||
SO_VER := 2
|
SO_VER := 3
|
||||||
SO_MINOR := 0
|
SO_MINOR := 0
|
||||||
|
|
||||||
ifeq ($(CONFIG_VTUNE),y)
|
ifeq ($(CONFIG_VTUNE),y)
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||||
|
|
||||||
SO_VER := 3
|
SO_VER := 4
|
||||||
SO_MINOR := 0
|
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 \
|
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 \
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.lib_deps.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.lib_deps.mk
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(SPDK_MAP_FILE),)
|
ifeq ($(SPDK_MAP_FILE),)
|
||||||
$(error SPDK_MAP_FILE is not set for lib $(LIBNAME))
|
$(error SPDK_MAP_FILE is not set for lib $(LIBNAME))
|
||||||
endif
|
endif
|
||||||
|
@ -291,15 +291,26 @@ EOF
|
|||||||
old_so_maj=$(readlink $source_abi_dir/$so_file | awk -F'\\.so\\.' '{print $2}' | cut -d '.' -f1)
|
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)
|
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"
|
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")
|
function_summary=$(grep "functions summary" <<< "$output")
|
||||||
variable_summary=$(grep "variables summary" <<< "$output")
|
variable_summary=$(grep "variables summary" <<< "$output")
|
||||||
# remove any filtered out variables.
|
# remove any filtered out variables.
|
||||||
|
leaf_type_summary=$(sed "s/ [()][^)]*[)]//g" <<< "$leaf_type_summary")
|
||||||
function_summary=$(sed "s/ [()][^)]*[)]//g" <<< "$function_summary")
|
function_summary=$(sed "s/ [()][^)]*[)]//g" <<< "$function_summary")
|
||||||
variable_summary=$(sed "s/ [()][^)]*[)]//g" <<< "$variable_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_functions _ changed_functions _ added_functions _ <<< "$function_summary"
|
||||||
read -r _ _ _ removed_vars _ changed_vars _ added_vars _ <<< "$variable_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 [ $removed_functions -ne 0 ] || [ $removed_vars -ne 0 ]; then
|
||||||
if [ "$new_so_maj" == "$old_so_maj" ]; then
|
if [ "$new_so_maj" == "$old_so_maj" ]; then
|
||||||
touch $fail_file
|
touch $fail_file
|
||||||
|
Loading…
Reference in New Issue
Block a user