selftests/ftrace: Add '!event' synthetic event syntax check

Add a check confirming that '!event' alone will remove a synthetic
event.

Link: https://lkml.kernel.org/r/1dff3f03d18542cece08c10d6323d8a8dba11e42.1612208610.git.zanussi@kernel.org

Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
Tom Zanussi 2021-02-01 13:48:16 -06:00 committed by Steven Rostedt (VMware)
parent b5734e997e
commit 7d5367539a
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,10 @@ grep "myevent[[:space:]]u64 var1" synthetic_events
# it is not possible to add same name event
! echo "myevent u64 var2" >> synthetic_events
# make sure !synthetic event doesn't require a field
echo "!myevent" >> synthetic_events
echo "myevent u64 var1" >> synthetic_events
# Non-append open will cleanup all events and add new one
echo "myevent u64 var2" > synthetic_events