From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: peterz@infradead.org, mingo@redhat.com,
alexander.shishkin@linux.intel.com, jolsa@redhat.com,
namhyung@kernel.org, linux-kernel@vger.kernel.org,
Sandipan Das <sandipan@linux.vnet.ibm.com>,
Thomas Richter <tmricht@linux.ibm.com>
Subject: Re: [PATCH] perf test record+probe_libc_inet_pton: expect [unknown] for ping as well
Date: Fri, 29 Jun 2018 12:17:36 -0300 [thread overview]
Message-ID: <20180629151736.GA3593@kernel.org> (raw)
In-Reply-To: <1530170160-4979-1-git-send-email-lizhijian@cn.fujitsu.com>
Em Thu, Jun 28, 2018 at 03:16:00PM +0800, Li Zhijian escreveu:
> On system which has not installed debuginfo of iputils(ping) will fail like:
> ~/lkp/linux/tools/perf$ sudo ./perf test ping -v
I think that we should try to check if the required debuginfo package is
installed and if so, expect the symbol resolution that takes place in
that case. Other wise expect [unknown], this way we don't leave this
test accepting almost anything in any case.
- Arnaldo
> 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@linux.vnet.ibm.com>
> CC: Thomas Richter <tmricht@linux.ibm.com>
> Reported-by: kernel test robot <xiaolong.ye@intel.com>
> Signed-off-by: Li Zhijian <lizhijian@cn.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
next prev parent reply other threads:[~2018-06-29 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 7:16 [PATCH] perf test record+probe_libc_inet_pton: expect [unknown] for ping as well Li Zhijian
2018-06-29 15:17 ` Arnaldo Carvalho de Melo [this message]
2018-07-01 5:40 ` Li Zhijian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180629151736.GA3593@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhijian@cn.fujitsu.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=sandipan@linux.vnet.ibm.com \
--cc=tmricht@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox