tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo
PATCH v2 1/1 tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo
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.
---
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(-)
tools/perf/tests/shell/lib/probe_vfs_getname.sh +1 -1
@@ -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 }
Signature · 1 line
2.31.1
Quoted 23 lines · Athira Rajeev
The perf probe related tests like
probe_vfs_getname.shwhich is in "tools/perf/tests/shell" directory have dependency on debuginfo information in the kernel. Currently debuginfo check is handled byskip_if_no_debuginfofunction in the file "lib/probe_vfs_getname.sh".skip_if_no_debuginfofunction 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 withCONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package.
Error: Failed to add events.
<<>>
Quoted 5 lines
Update the
skip_if_no_debuginfofunction to include the above error, to skip the test in these scenarios too.Reported-by Disha Goel<[email protected]>Signed-off-by Athira Rajeev<[email protected]>
Quoted 22 lines
---
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(-)tools/perf/tests/shell/lib/probe_vfs_getname.sh +1
-1@@ -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 }
Quoted 23 lines · Athira Rajeev
The perf probe related tests like
probe_vfs_getname.shwhich is in "tools/perf/tests/shell" directory have dependency on debuginfo information in the kernel. Currently debuginfo check is handled byskip_if_no_debuginfofunction in the file "lib/probe_vfs_getname.sh".skip_if_no_debuginfofunction 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 withCONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package.
Error: Failed to add events.
<<>>
Quoted 2 lines
Update the
skip_if_no_debuginfofunction to include the above error, to skip the test in these scenarios too.
Patch looks good to me.
Thanks,
Kajol Jain
Quoted 25 lines
Reported-by Disha Goel <[email protected]>Signed-off-by Athira Rajeev <[email protected]>---
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(-)tools/perf/tests/shell/lib/probe_vfs_getname.sh +1
-1@@ -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 }
Em Fri, Sep 16, 2022 at 06:35:41PM +0530, kajoljain escreveu:
Quoted 26 lines · Athira Rajeev
Quoted 23 lines
The perf probe related tests like
probe_vfs_getname.shwhich is in "tools/perf/tests/shell" directory have dependency on debuginfo information in the kernel. Currently debuginfo check is handled byskip_if_no_debuginfofunction in the file "lib/probe_vfs_getname.sh".skip_if_no_debuginfofunction 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 withCONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package.
Error: Failed to add events.
<<>>
Quoted 6 lines
Quoted 2 lines
Update the
skip_if_no_debuginfofunction to include the above error, to skip the test in these scenarios too.Patch looks good to me.
Reviewed-by Kajol Jain <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 28 lines
Thanks,
Kajol JainQuoted 25 lines
Reported-by Disha Goel <[email protected]>Signed-off-by Athira Rajeev <[email protected]>---
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(-)tools/perf/tests/shell/lib/probe_vfs_getname.sh +1
-1@@ -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 }
Signature · 1 line
- Arnaldo