From: Namhyung Kim <namhyung@kernel.org>
To: Chaitanya S Prakash <ChaitanyaS.Prakash@arm.com>
Cc: linux-perf-users@vger.kernel.org, anshuman.khandual@arm.com,
james.clark@arm.com
Subject: Re: [PATCH V3 10/10] perf test: Check output of the probe ... --funcs command
Date: Mon, 24 Jun 2024 16:30:47 -0700 [thread overview]
Message-ID: <ZnoBpxbuZ1shXBR7@google.com> (raw)
In-Reply-To: <20240601125946.1741414-11-ChaitanyaS.Prakash@arm.com>
On Sat, Jun 01, 2024 at 06:29:46PM +0530, Chaitanya S Prakash wrote:
> From: Chaitanya S Prakash <chaitanyas.prakash@arm.com>
>
> Test "perf probe of function from different CU" only checks if the perf
> command has failed and doesn't test the --funcs output. In the issue
> reported in the previous commit, the garbage output of the --funcs
> command was being ignored by the test when it could have been caught.
>
> The script first makes use of --funcs option with the perf probe command
> to check if the function "foo" exists in the testfile before adding a
> probe to it in the next command. The output of probe...--funcs command
> is redirected to stdout, therefore, add '| grep "foo"' to validate the
> result.
Ok, I think this can be applied separately.
Thanks,
Namhyung
>
> Signed-off-by: Chaitanya S Prakash <chaitanyas.prakash@arm.com>
> ---
> tools/perf/tests/shell/test_uprobe_from_different_cu.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/shell/test_uprobe_from_different_cu.sh b/tools/perf/tests/shell/test_uprobe_from_different_cu.sh
> index 319f36ebb9a4..82bc774a078a 100755
> --- a/tools/perf/tests/shell/test_uprobe_from_different_cu.sh
> +++ b/tools/perf/tests/shell/test_uprobe_from_different_cu.sh
> @@ -77,7 +77,7 @@ gcc -g -Og -flto -c ${temp_dir}/testfile-foo.c -o ${temp_dir}/testfile-foo.o
> gcc -g -Og -c ${temp_dir}/testfile-main.c -o ${temp_dir}/testfile-main.o
> gcc -g -Og -o ${temp_dir}/testfile ${temp_dir}/testfile-foo.o ${temp_dir}/testfile-main.o
>
> -perf probe -x ${temp_dir}/testfile --funcs foo
> +perf probe -x ${temp_dir}/testfile --funcs foo | grep "foo"
> perf probe -x ${temp_dir}/testfile foo
>
> cleanup
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-06-24 23:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-01 12:59 [PATCH V3 00/10] perf tools: Fix test "perf probe of function from different CU" Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 01/10] tools lib: adopt str_has_suffix() from bpftool/gen.c Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 02/10] perf util: Delete ends_with() and replace its use with str_has_suffix() Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 03/10] perf util: Replace an instance of strtailcmp() by str_has_suffix() Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 04/10] tools lib: Adopt str_has_prefix() from kernel Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 05/10] libsubcmd: Replace strstarts() usage with str_has_prefix() Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 06/10] objtool: " Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 07/10] perf tools: " Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 08/10] tools lib: Remove strstarts() as all its usecases have been replaced by str_has_prefix() Chaitanya S Prakash
2024-06-01 12:59 ` [PATCH V3 09/10] perf tools: Only treat files as map files when they have the extension .map Chaitanya S Prakash
2024-06-17 13:52 ` James Clark
2024-06-24 23:29 ` Namhyung Kim
2024-06-01 12:59 ` [PATCH V3 10/10] perf test: Check output of the probe ... --funcs command Chaitanya S Prakash
2024-06-24 23:30 ` Namhyung Kim [this message]
2024-06-25 12:40 ` James Clark
2024-06-25 19:08 ` Namhyung Kim
2024-06-26 3:57 ` Namhyung Kim
2024-07-10 7:39 ` [PATCH V3 00/10] perf tools: Fix test "perf probe of function from different CU" Chaitanya S Prakash
2024-07-12 19:55 ` Namhyung Kim
2024-07-15 9:34 ` James Clark
2024-07-15 9:35 ` James Clark
2024-07-15 10:27 ` James Clark
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=ZnoBpxbuZ1shXBR7@google.com \
--to=namhyung@kernel.org \
--cc=ChaitanyaS.Prakash@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=james.clark@arm.com \
--cc=linux-perf-users@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).