perf tests: Fix record+probe_libc_inet_pton.sh without ping's debuginfo
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 1632936480a53d85ef3012cd9f290e247251cbb9 Gitweb: https://git.kernel.org/tip/1632936480a53d85ef3012cd9f290e247251cbb9 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Wed, 5 Sep 2018 10:47:56 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 5 Sep 2018 10:47:56 -0300
perf tests: Fix record+probe_libc_inet_pton.sh without ping's debuginfo
When we don't have the iputils-debuginfo package installed, i.e. when we don't have the DWARF information needed to resolve ping's samples, we end up failing this 'perf test' entry:
# perf test ping 62: probe libc's inet_pton & backtrace it with ping : Ok # rpm -e iputils-debuginfo # perf test ping 62: probe libc's inet_pton & backtrace it with ping : FAILED! #
Fix it to accept "[unknown]" where the symbol + offset, when resolved, is expected.
I think this will fail in the other arches as well, but since I can't test now, I'm leaving s390x and ppc cases as-is.
Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc David Ahern <[email protected]>
Cc Hendrik Brueckner <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kim Phillips <[email protected]>
Cc Michael Petlan <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Naveen N. Rao <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ravi Bangoria <[email protected]>
Cc Sandipan Das <[email protected]>
Cc Sukadev Bhattiprolu <[email protected]>
Cc Thomas Richter <[email protected]>
Cc Wang Nan <[email protected]>
Fixes 7903a7086723 ("perf script: Show symbol offsets by default")
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/record+probe_libc_inet_pton.sh +1 -1
@@ -48,7 +48,7 @@ trace_libc_inet_pton_backtrace() { *) eventattr='max-stack=3' echo "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" >> $expected - echo ".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" >> $expected + echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected ;; esac