LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Thomas Richter <tmricht@linux.vnet.ibm.com>
Cc: linux-perf-users@vger.kernel.org, brueckner@linux.vnet.ibm.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf test: fix test case probe libc's inet_pton on s390x
Date: Tue, 14 Nov 2017 10:47:24 -0300
Message-ID: <20171114134724.GP8836@kernel.org> (raw)
In-Reply-To: <20171114133409.GN8836@kernel.org>

Em Tue, Nov 14, 2017 at 10:34:09AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Different name, same contents, need to look at the inode... ;-\
> 
> Nah, lets ask the kernel how is it that it sees libc, please test the
> following, works for me:

BTW, this is what I sticked on that cset:

    Committer changes:
    
    We can't really use ldd for libc, as in some systems, such as x86_64, it
    has hardlinks and then ldd sees one and the kernel the other, so grep
    for libc in /proc/self/maps to get the one we'll receive from
    PERF_RECORD_MMAP.

- Arnaldo
 
> diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> index 7a84d73324e3..8b3da21a08f1 100755
> --- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> +++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> @@ -10,8 +10,8 @@
>  
>  . $(dirname $0)/lib/probe.sh
>  
> -ld=$(realpath /lib64/ld*.so.* | uniq)
> -libc=$(echo $ld | sed 's/ld/libc/g')
> +libc=$(grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](\/.*)/\1/g')
> +nm -g $libc 2>/dev/null | fgrep -q inet_pton || exit 254
>  
>  trace_libc_inet_pton_backtrace() {
>  	idx=0
> @@ -37,6 +37,9 @@ trace_libc_inet_pton_backtrace() {
>  	done
>  }
>  
> +# Check for IPv6 interface existence
> +ip a sh lo | fgrep -q inet6 || exit 2
> +
>  skip_if_no_perf_probe && \
>  perf probe -q $libc inet_pton && \
>  trace_libc_inet_pton_backtrace

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171114071847.2381-1-tmricht@linux.vnet.ibm.com>
     [not found] ` <20171114071847.2381-2-tmricht@linux.vnet.ibm.com>
     [not found]   ` <20171114132625.GM8836@kernel.org>
2017-11-14 13:34     ` Arnaldo Carvalho de Melo
2017-11-14 13:47       ` Arnaldo Carvalho de Melo [this message]
2017-11-14 13:55         ` Thomas-Mich Richter
2017-11-14 14:58           ` Arnaldo Carvalho de Melo
2017-11-18  8:33       ` [tip:perf/core] perf test shell: Fix " tip-bot for Thomas Richter
2017-11-29  6:31       ` tip-bot for Thomas Richter

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=20171114134724.GP8836@kernel.org \
    --to=acme@kernel.org \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=tmricht@linux.vnet.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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git