All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] tools/perf/tests: Fix perf probe error log check in  skip_if_no_debuginfo
@ 2022-09-16 10:49 ` Athira Rajeev
  0 siblings, 0 replies; 7+ messages in thread
From: Athira Rajeev @ 2022-09-16 10:49 UTC (permalink / raw)
  To: acme, jolsa, mpe
  Cc: maddy, rnsastry, kjain, linux-perf-users, disgoel, linuxppc-dev

The perf probe related tests like probe_vfs_getname.sh which
is in "tools/perf/tests/shell" directory have dependency on
debuginfo information in the kernel. Currently debuginfo
check is handled by skip_if_no_debuginfo function in the
file "lib/probe_vfs_getname.sh". skip_if_no_debuginfo function
looks for this specific error log from perf probe to skip
the testcase:

<<>>
Failed to find the path for the kernel|Debuginfo-analysis is
not supported
<>>

But in some case, like this one in powerpc, while running this
test, observed error logs is:

<<>>
The /lib/modules/<version>/build/vmlinux file has no debug information.
Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo
package.
  Error: Failed to add events.
<<>>

Update the skip_if_no_debuginfo function to include the above
error, to skip the test in these scenarios too.

Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com>
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---
changelog:
 v1 -> v2:
 Corrected formatting of spaces in error log.
 With spaces in v1 of the patch, the egrep search was
 considering spaces also.

 tools/perf/tests/shell/lib/probe_vfs_getname.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
index 5b17d916c555..b616d42bd19d 100644
--- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
@@ -19,6 +19,6 @@ add_probe_vfs_getname() {
 }
 
 skip_if_no_debuginfo() {
-	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)" && return 2
+	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)" && return 2
 	return 1
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH V2] tools/perf/tests: Fix perf probe error log check in  skip_if_no_debuginfo
@ 2022-09-16 10:49 ` Athira Rajeev
  0 siblings, 0 replies; 7+ messages in thread
From: Athira Rajeev @ 2022-09-16 10:49 UTC (permalink / raw)
  To: acme, jolsa, mpe
  Cc: linux-perf-users, linuxppc-dev, maddy, rnsastry, kjain, disgoel

The perf probe related tests like probe_vfs_getname.sh which
is in "tools/perf/tests/shell" directory have dependency on
debuginfo information in the kernel. Currently debuginfo
check is handled by skip_if_no_debuginfo function in the
file "lib/probe_vfs_getname.sh". skip_if_no_debuginfo function
looks for this specific error log from perf probe to skip
the testcase:

<<>>
Failed to find the path for the kernel|Debuginfo-analysis is
not supported
<>>

But in some case, like this one in powerpc, while running this
test, observed error logs is:

<<>>
The /lib/modules/<version>/build/vmlinux file has no debug information.
Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo
package.
  Error: Failed to add events.
<<>>

Update the skip_if_no_debuginfo function to include the above
error, to skip the test in these scenarios too.

Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com>
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---
changelog:
 v1 -> v2:
 Corrected formatting of spaces in error log.
 With spaces in v1 of the patch, the egrep search was
 considering spaces also.

 tools/perf/tests/shell/lib/probe_vfs_getname.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
index 5b17d916c555..b616d42bd19d 100644
--- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
@@ -19,6 +19,6 @@ add_probe_vfs_getname() {
 }
 
 skip_if_no_debuginfo() {
-	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)" && return 2
+	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)" && return 2
 	return 1
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo
  2022-09-16 10:49 ` Athira Rajeev
  (?)
@ 2022-09-16 11:29 ` Disha Goel
  -1 siblings, 0 replies; 7+ messages in thread
From: Disha Goel @ 2022-09-16 11:29 UTC (permalink / raw)
  To: Athira Rajeev, acme, jolsa, mpe
  Cc: maddy, rnsastry, kjain, linux-perf-users, disgoel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 2066 bytes --]


On 9/16/22 4:19 PM, Athira Rajeev wrote:
> The perf probe related tests like probe_vfs_getname.sh which
> is in "tools/perf/tests/shell" directory have dependency on
> debuginfo information in the kernel. Currently debuginfo
> check is handled by skip_if_no_debuginfo function in the
> file "lib/probe_vfs_getname.sh". skip_if_no_debuginfo function
> looks for this specific error log from perf probe to skip
> the testcase:
>
> <<>>
> Failed to find the path for the kernel|Debuginfo-analysis is
> not supported
> <>>
>
> But in some case, like this one in powerpc, while running this
> test, observed error logs is:
>
> <<>>
> The /lib/modules/<version>/build/vmlinux file has no debug information.
> Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo
> package.
>    Error: Failed to add events.
> <<>>
>
> Update the skip_if_no_debuginfo function to include the above
> error, to skip the test in these scenarios too.
>
> Reported-by: Disha Goel<disgoel@linux.vnet.ibm.com>
> Signed-off-by: Athira Rajeev<atrajeev@linux.vnet.ibm.com>

Tested-by: Disha Goel<disgoel@linux.vnet.ibm.com>

> ---
> changelog:
>   v1 -> v2:
>   Corrected formatting of spaces in error log.
>   With spaces in v1 of the patch, the egrep search was
>   considering spaces also.
>
>   tools/perf/tests/shell/lib/probe_vfs_getname.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> index 5b17d916c555..b616d42bd19d 100644
> --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> @@ -19,6 +19,6 @@ add_probe_vfs_getname() {
>   }
>
>   skip_if_no_debuginfo() {
> -	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)" && return 2
> +	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)" && return 2
>   	return 1
>   }

[-- Attachment #2: Type: text/html, Size: 2842 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo
  2022-09-16 10:49 ` Athira Rajeev
@ 2022-09-16 13:05   ` kajoljain
  -1 siblings, 0 replies; 7+ messages in thread
From: kajoljain @ 2022-09-16 13:05 UTC (permalink / raw)
  To: Athira Rajeev, acme, jolsa, mpe
  Cc: maddy, rnsastry, linux-perf-users, disgoel, linuxppc-dev



On 9/16/22 16:19, Athira Rajeev wrote:
> The perf probe related tests like probe_vfs_getname.sh which
> is in "tools/perf/tests/shell" directory have dependency on
> debuginfo information in the kernel. Currently debuginfo
> check is handled by skip_if_no_debuginfo function in the
> file "lib/probe_vfs_getname.sh". skip_if_no_debuginfo function
> looks for this specific error log from perf probe to skip
> the testcase:
> 
> <<>>
> Failed to find the path for the kernel|Debuginfo-analysis is
> not supported
> <>>
> 
> But in some case, like this one in powerpc, while running this
> test, observed error logs is:
> 
> <<>>
> The /lib/modules/<version>/build/vmlinux file has no debug information.
> Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo
> package.
>   Error: Failed to add events.
> <<>>
> 
> Update the skip_if_no_debuginfo function to include the above
> error, to skip the test in these scenarios too.

Patch looks good to me.

Reviewed-By: Kajol Jain <kjain@linux.ibm.com>

Thanks,
Kajol Jain

> 
> Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com>
> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
> ---
> changelog:
>  v1 -> v2:
>  Corrected formatting of spaces in error log.
>  With spaces in v1 of the patch, the egrep search was
>  considering spaces also.
> 
>  tools/perf/tests/shell/lib/probe_vfs_getname.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> index 5b17d916c555..b616d42bd19d 100644
> --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> @@ -19,6 +19,6 @@ add_probe_vfs_getname() {
>  }
>  
>  skip_if_no_debuginfo() {
> -	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)" && return 2
> +	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)" && return 2
>  	return 1
>  }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo
@ 2022-09-16 13:05   ` kajoljain
  0 siblings, 0 replies; 7+ messages in thread
From: kajoljain @ 2022-09-16 13:05 UTC (permalink / raw)
  To: Athira Rajeev, acme, jolsa, mpe
  Cc: linux-perf-users, maddy, linuxppc-dev, disgoel, rnsastry



On 9/16/22 16:19, Athira Rajeev wrote:
> The perf probe related tests like probe_vfs_getname.sh which
> is in "tools/perf/tests/shell" directory have dependency on
> debuginfo information in the kernel. Currently debuginfo
> check is handled by skip_if_no_debuginfo function in the
> file "lib/probe_vfs_getname.sh". skip_if_no_debuginfo function
> looks for this specific error log from perf probe to skip
> the testcase:
> 
> <<>>
> Failed to find the path for the kernel|Debuginfo-analysis is
> not supported
> <>>
> 
> But in some case, like this one in powerpc, while running this
> test, observed error logs is:
> 
> <<>>
> The /lib/modules/<version>/build/vmlinux file has no debug information.
> Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo
> package.
>   Error: Failed to add events.
> <<>>
> 
> Update the skip_if_no_debuginfo function to include the above
> error, to skip the test in these scenarios too.

Patch looks good to me.

Reviewed-By: Kajol Jain <kjain@linux.ibm.com>

Thanks,
Kajol Jain

> 
> Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com>
> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
> ---
> changelog:
>  v1 -> v2:
>  Corrected formatting of spaces in error log.
>  With spaces in v1 of the patch, the egrep search was
>  considering spaces also.
> 
>  tools/perf/tests/shell/lib/probe_vfs_getname.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> index 5b17d916c555..b616d42bd19d 100644
> --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> @@ -19,6 +19,6 @@ add_probe_vfs_getname() {
>  }
>  
>  skip_if_no_debuginfo() {
> -	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)" && return 2
> +	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)" && return 2
>  	return 1
>  }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo
  2022-09-16 13:05   ` kajoljain
@ 2022-09-26 19:29     ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-09-26 19:29 UTC (permalink / raw)
  To: kajoljain
  Cc: Athira Rajeev, jolsa, mpe, maddy, rnsastry, linux-perf-users,
	disgoel, linuxppc-dev

Em Fri, Sep 16, 2022 at 06:35:41PM +0530, kajoljain escreveu:
> 
> 
> On 9/16/22 16:19, Athira Rajeev wrote:
> > The perf probe related tests like probe_vfs_getname.sh which
> > is in "tools/perf/tests/shell" directory have dependency on
> > debuginfo information in the kernel. Currently debuginfo
> > check is handled by skip_if_no_debuginfo function in the
> > file "lib/probe_vfs_getname.sh". skip_if_no_debuginfo function
> > looks for this specific error log from perf probe to skip
> > the testcase:
> > 
> > <<>>
> > Failed to find the path for the kernel|Debuginfo-analysis is
> > not supported
> > <>>
> > 
> > But in some case, like this one in powerpc, while running this
> > test, observed error logs is:
> > 
> > <<>>
> > The /lib/modules/<version>/build/vmlinux file has no debug information.
> > Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo
> > package.
> >   Error: Failed to add events.
> > <<>>
> > 
> > Update the skip_if_no_debuginfo function to include the above
> > error, to skip the test in these scenarios too.
> 
> Patch looks good to me.
> 
> Reviewed-By: Kajol Jain <kjain@linux.ibm.com>

Thanks, applied.

- Arnaldo

 
> Thanks,
> Kajol Jain
> 
> > 
> > Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com>
> > Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
> > ---
> > changelog:
> >  v1 -> v2:
> >  Corrected formatting of spaces in error log.
> >  With spaces in v1 of the patch, the egrep search was
> >  considering spaces also.
> > 
> >  tools/perf/tests/shell/lib/probe_vfs_getname.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > index 5b17d916c555..b616d42bd19d 100644
> > --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > @@ -19,6 +19,6 @@ add_probe_vfs_getname() {
> >  }
> >  
> >  skip_if_no_debuginfo() {
> > -	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)" && return 2
> > +	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)" && return 2
> >  	return 1
> >  }

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo
@ 2022-09-26 19:29     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-09-26 19:29 UTC (permalink / raw)
  To: kajoljain
  Cc: Athira Rajeev, rnsastry, linux-perf-users, maddy, jolsa, disgoel,
	linuxppc-dev

Em Fri, Sep 16, 2022 at 06:35:41PM +0530, kajoljain escreveu:
> 
> 
> On 9/16/22 16:19, Athira Rajeev wrote:
> > The perf probe related tests like probe_vfs_getname.sh which
> > is in "tools/perf/tests/shell" directory have dependency on
> > debuginfo information in the kernel. Currently debuginfo
> > check is handled by skip_if_no_debuginfo function in the
> > file "lib/probe_vfs_getname.sh". skip_if_no_debuginfo function
> > looks for this specific error log from perf probe to skip
> > the testcase:
> > 
> > <<>>
> > Failed to find the path for the kernel|Debuginfo-analysis is
> > not supported
> > <>>
> > 
> > But in some case, like this one in powerpc, while running this
> > test, observed error logs is:
> > 
> > <<>>
> > The /lib/modules/<version>/build/vmlinux file has no debug information.
> > Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo
> > package.
> >   Error: Failed to add events.
> > <<>>
> > 
> > Update the skip_if_no_debuginfo function to include the above
> > error, to skip the test in these scenarios too.
> 
> Patch looks good to me.
> 
> Reviewed-By: Kajol Jain <kjain@linux.ibm.com>

Thanks, applied.

- Arnaldo

 
> Thanks,
> Kajol Jain
> 
> > 
> > Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com>
> > Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
> > ---
> > changelog:
> >  v1 -> v2:
> >  Corrected formatting of spaces in error log.
> >  With spaces in v1 of the patch, the egrep search was
> >  considering spaces also.
> > 
> >  tools/perf/tests/shell/lib/probe_vfs_getname.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > index 5b17d916c555..b616d42bd19d 100644
> > --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > @@ -19,6 +19,6 @@ add_probe_vfs_getname() {
> >  }
> >  
> >  skip_if_no_debuginfo() {
> > -	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)" && return 2
> > +	add_probe_vfs_getname -v 2>&1 | egrep -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)" && return 2
> >  	return 1
> >  }

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-26 19:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16 10:49 [PATCH V2] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo Athira Rajeev
2022-09-16 10:49 ` Athira Rajeev
2022-09-16 11:29 ` Disha Goel
2022-09-16 13:05 ` kajoljain
2022-09-16 13:05   ` kajoljain
2022-09-26 19:29   ` Arnaldo Carvalho de Melo
2022-09-26 19:29     ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.