[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1530170160-4979-1-git-send-email-lizhijian@cn.fujitsu.com>
Date: Thu, 28 Jun 2018 15:16:00 +0800
From: Li Zhijian <lizhijian@...fujitsu.com>
To: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
namhyung@...nel.org, linux-kernel@...r.kernel.org
Cc: Li Zhijian <lizhijian@...fujitsu.com>,
Sandipan Das <sandipan@...ux.vnet.ibm.com>,
Thomas Richter <tmricht@...ux.ibm.com>
Subject: [PATCH] perf test record+probe_libc_inet_pton: expect [unknown] for ping as well
On system which has not installed debuginfo of iputils(ping) will fail like:
~/lkp/linux/tools/perf$ sudo ./perf test ping -v
63: probe libc's inet_pton & backtrace it with ping :
--- start ---
test child forked, pid 4207
ping 4224 [007] 3034121.295510: probe_libc:inet_pton: (7fedfccb2200)
7fedfccb2200 __GI___inet_pton+0x0 (/lib/x86_64-linux-gnu/libc-2.23.so)
7fedfcc7ad5e getaddrinfo+0xee (/lib/x86_64-linux-gnu/libc-2.23.so)
55e3239a9f4d [unknown] (/bin/ping)
FAIL: expected backtrace entry 3
".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" got "55e3239a9f4d [unknown] (/bin/ping)"
test child finished with -1
---- end ----
probe libc's inet_pton & backtrace it with ping: FAILED!
To be compatible with this system, expects [unknown] as well
Fixes: 7903a7086723 ("perf script: Show symbol offsets by default")
CC: Sandipan Das <sandipan@...ux.vnet.ibm.com>
CC: Thomas Richter <tmricht@...ux.ibm.com>
Reported-by: kernel test robot <xiaolong.ye@...el.com>
Signed-off-by: Li Zhijian <lizhijian@...fujitsu.com>
---
tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
index 2630570..ebb6549 100755
--- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
@@ -22,12 +22,12 @@ trace_libc_inet_pton_backtrace() {
eventattr='call-graph=dwarf,max-stack=4'
expected[2]="gaih_inet.*\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$"
expected[3]="(__GI_)?getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$"
- expected[4]="main\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$"
+ expected[4]=".*(\+0x[[:xdigit:]]|\[unknown\])+[[:space:]]\(.*/bin/ping.*\)$"
;;
*)
eventattr='max-stack=3'
expected[2]="getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$"
- expected[3]=".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$"
+ expected[3]=".*(\+0x[[:xdigit:]]|\[unknown\])+[[:space:]]\(.*/bin/ping.*\)$"
;;
esac
--
2.7.4
Powered by blists - more mailing lists