Commit b606baab authored by Karol Latecki's avatar Karol Latecki Committed by Jim Harris
Browse files

test/common: fix for eu-readelf path over 80 chars



Readelf psargs field holds file path up to 80 chars.
Above 80 chars path is truncated and --wide option does not
enable displaying longer path.

Added checking if the path was not truncated by testing if
file path from psargs exists. If it does not - check rest of
eu-readelf output for a matching path and use it instead.

Change-Id: Ia89b41115803e2463e2030e739121ce1fa8039e0
Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/421100


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 48a5bbff
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -245,6 +245,9 @@ function process_core() {
	ret=0
	for core in $(find . -type f \( -name 'core*' -o -name '*.core' \)); do
		exe=$(eu-readelf -n "$core" | grep psargs | sed "s/.*psargs: \([^ \'\" ]*\).*/\1/")
		if [[ ! -f "$exe" ]]; then
			exe=$(eu-readelf -n "$core" | grep -oP -m1 "$exe.+")
		fi
		echo "exe for $core is $exe"
		if [[ ! -z "$exe" ]]; then
			if hash gdb; then