From b606baabbc2020417edf59a310fd09ffaaf56df4 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Thu, 2 Aug 2018 13:34:59 +0200 Subject: [PATCH] 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: Karol Latecki Reviewed-on: https://review.gerrithub.io/421100 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- test/common/autotest_common.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 7113cc7a0..cf2d8bb8b 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -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