tracing: fix dynevent test requirements

Message ID 20221017090741.2881918-1-mark.rutland@arm.com
State New
Headers
Series tracing: fix dynevent test requirements |

Commit Message

Mark Rutland Oct. 17, 2022, 9:07 a.m. UTC
  Currently a couple of dynevent tests will always report UNSUPPORTED and
not run, even when support is actually present.

In commit:

  95c104c378dc7d4c ("tracing: Auto generate event name when creating a group of events")

The README text for synthetic events was changed from:

  "e[:[<group>/]<event>] <attached-group>.<attached-event> [<args>]\n"

To:

  "e[:[<group>/][<event>]] <attached-group>.<attached-event> [<args>]\n"

... but the dynevent selftests were not updated accodingly, and still
search for the old text in their "requires" lines. Consequently, they
fail to match the new text, and the tests report the feature is
UNSUPPORTED.

For example:

| # ./ftracetest -vv test.d/dynevent/test_duplicates.tc
| === Ftrace unit tests ===
| [1] Generic dynamic event - check if duplicate events are caughtRequired feature pattern "e[:[<group>/]<event>] <attached-group>.<attached-event> [<args>]" is not in README.
|         [UNSUPPORTED]
|
|
| # of passed:  0
| # of failed:  0
| # of unresolved:  0
| # of untested:  0
| # of unsupported:  1
| # of xfailed:  0
| # of undefined(test bug):  0

Update the patterns to match, allowing the tests to run:

| # ./ftracetest -vv test.d/dynevent/test_duplicates.tc
| === Ftrace unit tests ===
| [1] Generic dynamic event - check if duplicate events are caught
|         [PASS]
|
|
| # of passed:  1
| # of failed:  0
| # of unresolved:  0
| # of untested:  0
| # of unsupported:  0
| # of xfailed:  0
| # of undefined(test bug):  0

Fixes: 95c104c378dc7d4c ("tracing: Auto generate event name when creating a group of events")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
 .../testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc | 2 +-
 .../test.d/trigger/inter-event/trigger-synthetic-eprobe.tc      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Steven Rostedt Oct. 17, 2022, 2:30 p.m. UTC | #1
On Mon, 17 Oct 2022 10:07:41 +0100
Mark Rutland <mark.rutland@arm.com> wrote:

> Currently a couple of dynevent tests will always report UNSUPPORTED and
> not run, even when support is actually present.
> 
> In commit:
> 
>   95c104c378dc7d4c ("tracing: Auto generate event name when creating a group of events")
> 
> The README text for synthetic events was changed from:
> 
>   "e[:[<group>/]<event>] <attached-group>.<attached-event> [<args>]\n"
> 
> To:

This was already fixed here:

 https://lore.kernel.org/all/20221010074207.714077-1-svens@linux.ibm.com/

Shuah, can you take Sven's patch through your tree?

Thanks,

-- Steve
  
Shuah Khan Oct. 17, 2022, 2:32 p.m. UTC | #2
On 10/17/22 08:30, Steven Rostedt wrote:
> On Mon, 17 Oct 2022 10:07:41 +0100
> Mark Rutland <mark.rutland@arm.com> wrote:
> 
>> Currently a couple of dynevent tests will always report UNSUPPORTED and
>> not run, even when support is actually present.
>>
>> In commit:
>>
>>    95c104c378dc7d4c ("tracing: Auto generate event name when creating a group of events")
>>
>> The README text for synthetic events was changed from:
>>
>>    "e[:[<group>/]<event>] <attached-group>.<attached-event> [<args>]\n"
>>
>> To:
> 
> This was already fixed here:
> 
>   https://lore.kernel.org/all/20221010074207.714077-1-svens@linux.ibm.com/
> 
> Shuah, can you take Sven's patch through your tree?
> 
> Thanks,
> 
> -- Steve
> 

Yes.  I will take this in for the next rc

thanks,
-- Shuah
  

Patch

diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc b/tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc
index db522577ff78..d3a79da215c8 100644
--- a/tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc
+++ b/tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc
@@ -1,7 +1,7 @@ 
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 # description: Generic dynamic event - check if duplicate events are caught
-# requires: dynamic_events "e[:[<group>/]<event>] <attached-group>.<attached-event> [<args>]":README
+# requires: dynamic_events "e[:[<group>/][<event>]] <attached-group>.<attached-event> [<args>]":README
 
 echo 0 > events/enable
 
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc
index 914fe2e5d030..6461c375694f 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc
@@ -1,7 +1,7 @@ 
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test inter-event histogram trigger eprobe on synthetic event
-# requires: dynamic_events synthetic_events events/syscalls/sys_enter_openat/hist "e[:[<group>/]<event>] <attached-group>.<attached-event> [<args>]":README
+# requires: dynamic_events synthetic_events events/syscalls/sys_enter_openat/hist "e[:[<group>/][<event>]] <attached-group>.<attached-event> [<args>]":README
 
 echo 0 > events/enable