History log of /linux-6.15/tools/perf/tests/shell/base_probe/test_adding_kernel.sh (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13
# 1ab138fe 13-Jan-2025 Veronika Molnarova <[email protected]>

perf test perftool_testsuite: Return correct value for skipping

In 'perf test', a return value 2 represents that the test case was
skipped. Fix this value for perftool_testsuite test cases to
differ

perf test perftool_testsuite: Return correct value for skipping

In 'perf test', a return value 2 represents that the test case was
skipped. Fix this value for perftool_testsuite test cases to
differentiate between skip and pass values.

Signed-off-by: Veronika Molnarova <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael Petlan <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>

show more ...


# 5afd6d38 13-Jan-2025 Veronika Molnarova <[email protected]>

perf test perftool_testsuite: Add missing description

Properly name the test cases of perftool_testsuite instead of the
license being taken as the name for 'perf test'.

Signed-off-by: Veronika Moln

perf test perftool_testsuite: Add missing description

Properly name the test cases of perftool_testsuite instead of the
license being taken as the name for 'perf test'.

Signed-off-by: Veronika Molnarova <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael Petlan <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>

show more ...


Revision tags: v6.13-rc7
# 8c1a1066 10-Jan-2025 Athira Rajeev <[email protected]>

perf tests base_probe: Fix check for the count of existing probes in test_adding_kernel

perftool-testsuite_probe fails in test_adding_kernel as below:

Regexp not found: "probe:inode_permission_11"

perf tests base_probe: Fix check for the count of existing probes in test_adding_kernel

perftool-testsuite_probe fails in test_adding_kernel as below:

Regexp not found: "probe:inode_permission_11"
-- [ FAIL ] -- perf_probe :: test_adding_kernel :: force-adding probes ::
second probe adding (with force) (output regexp parsing)
event syntax error: 'probe:inode_permission_11'
\___ unknown tracepoint

Error: File /sys/kernel/tracing//events/probe/inode_permission_11
not found.
Hint: Perhaps this kernel misses some CONFIG_ setting to
enable this feature?.

The test does the following:

1) Adds a probe point first using:

$CMD_PERF probe --add $TEST_PROBE

2) Then tries to add same probe again without —force and expects it to
fail. Next tries to add same probe again with —force. In this case,
perf probe succeeds and adds the probe with a suffix number. Example:

./perf probe --add inode_permission
Added new event:
probe:inode_permission (on inode_permission)

./perf probe --add inode_permission --force
Added new event:
probe:inode_permission_1 (on inode_permission)

./perf probe --add inode_permission --force
Added new event:
probe:inode_permission_2 (on inode_permission)

Each time, suffix is added to existing probe name.

To get the suffix number, test cases uses:

NO_OF_PROBES=`$CMD_PERF probe -l | wc -l`

This will work if there is no other probe existing in the system. If
there are any other probes other than kernel probes or inode_permission,
( example: any probe), "perf probe -l" will include count for other
probes too.

Example, in the system where this failed, already some probes were
default added. So count became 10

./perf probe -l | wc -l
10

So to be specific for "inode_permission", restrict the probe count check
to that probe point alone using:

NO_OF_PROBES=`$CMD_PERF probe -l $TEST_PROBE| wc -l`

Similarly while removing the probe using "probe --del *", (removing all
probes), check uses:

../common/check_all_lines_matched.pl "Removed event: probe:$TEST_PROBE"

But if there are other probes in the system, the log will contain
reference to other existing probe too. Hence change usage of
check_all_lines_matched.pl to check_all_patterns_found.pl This will make
sure expecting string comes in the result

Signed-off-by: Athira Rajeev <[email protected]>
Acked-by: Veronika Molnarova <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Disha Goel <[email protected]>
Cc: Hari Bathini <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Michael Petlan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>

show more ...


Revision tags: v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7
# a3a02a52 02-Jul-2024 Veronika Molnarova <[email protected]>

perf testsuite: Merge settings files for shell tests

Merge perf testsuite setting files into common settings to reduce
duplicates and prevent errors.

Signed-off-by: Michael Petlan <[email protected]

perf testsuite: Merge settings files for shell tests

Merge perf testsuite setting files into common settings to reduce
duplicates and prevent errors.

Signed-off-by: Michael Petlan <[email protected]>
Signed-off-by: Veronika Molnarova <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>

show more ...


Revision tags: v6.10-rc6, v6.10-rc5
# 90d32e92 17-Jun-2024 Athira Rajeev <[email protected]>

tools/perf: Handle perftool-testsuite_probe testcases fail when kernel debuginfo is not present

Running "perftool-testsuite_probe" fails as below:

./perf test -v "perftool-testsuite_probe"
83: pe

tools/perf: Handle perftool-testsuite_probe testcases fail when kernel debuginfo is not present

Running "perftool-testsuite_probe" fails as below:

./perf test -v "perftool-testsuite_probe"
83: perftool-testsuite_probe : FAILED

There are three fails:

1. Regexp not found: "\s*probe:inode_permission(?:_\d+)?\s+\(on inode_permission(?:[:\+][0-9A-Fa-f]+)?@.+\)"
-- [ FAIL ] -- perf_probe :: test_adding_kernel :: listing added probe :: perf probe -l (output regexp parsing)

2. Regexp not found: "probe:vfs_mknod"
Regexp not found: "probe:vfs_create"
Regexp not found: "probe:vfs_rmdir"
Regexp not found: "probe:vfs_link"
Regexp not found: "probe:vfs_write"
-- [ FAIL ] -- perf_probe :: test_adding_kernel :: wildcard adding support (command exitcode + output regexp parsing)

3. Regexp not found: "Failed to find"
Regexp not found: "somenonexistingrandomstuffwhichisalsoprettylongorevenlongertoexceed64"
Regexp not found: "in this function|at this address"
Line did not match any pattern: "The /boot/vmlinux file has no debug information."
Line did not match any pattern: "Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package."

These three tests depends on kernel debug info.
1. Fail 1 expects file name along with probe which needs debuginfo
2. Fail 2 :
perf probe -nf --max-probes=512 -a 'vfs_* $params'
Debuginfo-analysis is not supported.
Error: Failed to add events.

3. Fail 3 :
perf probe 'vfs_read somenonexistingrandomstuffwhichisalsoprettylongorevenlongertoexceed64'
Debuginfo-analysis is not supported.
Error: Failed to add events.

There is already helper function skip_if_no_debuginfo in
lib/probe_vfs_getname.sh which does perf probe and returns
"2" if debug info is not present. Use the skip_if_no_debuginfo
function and skip only the three tests which needs debuginfo
based on the result.

With the patch:

83: perftool-testsuite_probe:
--- start ---
test child forked, pid 3927
-- [ PASS ] -- perf_probe :: test_adding_kernel :: adding probe inode_permission ::
-- [ PASS ] -- perf_probe :: test_adding_kernel :: adding probe inode_permission :: -a
-- [ PASS ] -- perf_probe :: test_adding_kernel :: adding probe inode_permission :: --add
-- [ PASS ] -- perf_probe :: test_adding_kernel :: listing added probe :: perf list
Regexp not found: "\s*probe:inode_permission(?:_\d+)?\s+\(on inode_permission(?:[:\+][0-9A-Fa-f]+)?@.+\)"
-- [ SKIP ] -- perf_probe :: test_adding_kernel :: 2 2 Skipped due to missing debuginfo :: testcase skipped
-- [ PASS ] -- perf_probe :: test_adding_kernel :: using added probe
-- [ PASS ] -- perf_probe :: test_adding_kernel :: deleting added probe
-- [ PASS ] -- perf_probe :: test_adding_kernel :: listing removed probe (should NOT be listed)
-- [ PASS ] -- perf_probe :: test_adding_kernel :: dry run :: adding probe
-- [ PASS ] -- perf_probe :: test_adding_kernel :: force-adding probes :: first probe adding
-- [ PASS ] -- perf_probe :: test_adding_kernel :: force-adding probes :: second probe adding (without force)
-- [ PASS ] -- perf_probe :: test_adding_kernel :: force-adding probes :: second probe adding (with force)
-- [ PASS ] -- perf_probe :: test_adding_kernel :: using doubled probe
-- [ PASS ] -- perf_probe :: test_adding_kernel :: removing multiple probes
Regexp not found: "probe:vfs_mknod"
Regexp not found: "probe:vfs_create"
Regexp not found: "probe:vfs_rmdir"
Regexp not found: "probe:vfs_link"
Regexp not found: "probe:vfs_write"
-- [ SKIP ] -- perf_probe :: test_adding_kernel :: 2 2 Skipped due to missing debuginfo :: testcase skipped
Regexp not found: "Failed to find"
Regexp not found: "somenonexistingrandomstuffwhichisalsoprettylongorevenlongertoexceed64"
Regexp not found: "in this function|at this address"
Line did not match any pattern: "The /boot/vmlinux file has no debug information."
Line did not match any pattern: "Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package."
-- [ SKIP ] -- perf_probe :: test_adding_kernel :: 2 2 Skipped due to missing debuginfo :: testcase skipped
-- [ PASS ] -- perf_probe :: test_adding_kernel :: function with retval :: add
-- [ PASS ] -- perf_probe :: test_adding_kernel :: function with retval :: record
-- [ PASS ] -- perf_probe :: test_adding_kernel :: function argument probing :: script
## [ PASS ] ## perf_probe :: test_adding_kernel SUMMARY
---- end(0) ----
83: perftool-testsuite_probe : Ok

Only the three specific tests are skipped and remaining
ran successfully.

Signed-off-by: Athira Rajeev <[email protected]>
Reviewed-by: James Clark <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

show more ...


Revision tags: v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6
# 7255fcc8 23-Apr-2024 Arnaldo Carvalho de Melo <[email protected]>

perf tests shell kprobes: Add missing description as used by 'perf test' output

Before:

root@x1:~# perf test 76
76: SPDX-License-Identifier: GPL-2.0 : Ok
root@

perf tests shell kprobes: Add missing description as used by 'perf test' output

Before:

root@x1:~# perf test 76
76: SPDX-License-Identifier: GPL-2.0 : Ok
root@x1:~#

After:

root@x1:~# perf test 76
76: Add 'perf probe's, list and remove them. : Ok
root@x1:~#

Reviewed-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Michael Petlan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Veronika Molnarova <[email protected]>
Link: https://lore.kernel.org/lkml/ZigRDKUGkcDqD-yW@x1
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>

show more ...


Revision tags: v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5
# e7d759f3 15-Feb-2024 Veronika Molnarova <[email protected]>

perf testsuite: Add test for kprobe handling

Test perf interface to kprobes: listing, adding and removing probes. It
is run as a part of perftool-testsuite_probe test case.

Signed-off-by: Veronika

perf testsuite: Add test for kprobe handling

Test perf interface to kprobes: listing, adding and removing probes. It
is run as a part of perftool-testsuite_probe test case.

Signed-off-by: Veronika Molnarova <[email protected]>
Signed-off-by: Michael Petlan <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

show more ...