From cd982ad6ed052efebf4fa59196b5d538c6477e56 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Thu, 26 Mar 2020 18:48:39 -0700 Subject: [PATCH] test/make: properly escape '.' in awk. The period was being treated as a wildcard by awk so it was improperly parsing the libspdk_sock*.so library versions. Signed-off-by: Seth Howell Change-Id: I37d3cfaf7bf9c29c6d5efb647e68d8a8be715a2b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1513 Reviewed-by: Ziye Yang Reviewed-by: Darek Stojaczyk Reviewed-by: Jim Harris Tested-by: SPDK CI Jenkins --- test/make/check_so_deps.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/make/check_so_deps.sh b/test/make/check_so_deps.sh index 563a5a3cf..ec2390c7a 100755 --- a/test/make/check_so_deps.sh +++ b/test/make/check_so_deps.sh @@ -35,10 +35,10 @@ function confirm_abi_deps() { if ! abidiff $libdir/$so_file $source_abi_dir/$so_file --leaf-changes-only --stat > /dev/null; then found_abi_change=false output=$(abidiff $libdir/$so_file $source_abi_dir/$so_file --leaf-changes-only --stat) || true - new_so_maj=$(readlink $libdir/$so_file | awk -F'.so.' '{print $2}' | cut -d '.' -f1) - new_so_min=$(readlink $libdir/$so_file | awk -F'.so.' '{print $2}' | cut -d '.' -f2) - 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) + new_so_maj=$(readlink $libdir/$so_file | awk -F'\\.so\\.' '{print $2}' | cut -d '.' -f1) + new_so_min=$(readlink $libdir/$so_file | awk -F'\\.so\\.' '{print $2}' | cut -d '.' -f2) + 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" function_summary=$(grep "functions summary" <<< "$output") variable_summary=$(grep "variables summary" <<< "$output")