]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests/ftrace: Add test case for GRP/ only input
authorLinyu Yuan <quic_linyyuan@quicinc.com>
Mon, 27 Jun 2022 02:19:08 +0000 (10:19 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 24 Jul 2022 23:11:17 +0000 (19:11 -0400)
Add kprobe and eprobe event test for new GRP/ only format.

Link: https://lore.kernel.org/all/1656296348-16111-5-git-send-email-quic_linyyuan@quicinc.com/
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc
tools/testing/selftests/ftrace/test.d/dynevent/add_remove_kprobe.tc

index 60c02b482be8341ce795cab1238cc4772ebb942e..c300eb0202620c457d6566e6f558fe03aa5f49c8 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 # description: Generic dynamic event - add/remove eprobe events
-# requires: dynamic_events events/syscalls/sys_enter_openat "e[:[<group>/]<event>] <attached-group>.<attached-event> [<args>]":README
+# requires: dynamic_events events/syscalls/sys_enter_openat "<attached-group>.<attached-event> [<args>]":README
 
 echo 0 > events/enable
 
@@ -87,4 +87,11 @@ echo "-:eprobes/$EPROBE $SYSTEM/$EVENT $OPTIONS" >> dynamic_events
 ! grep -q "$EPROBE" dynamic_events
 ! test -d events/eprobes/$EPROBE
 
+if grep -q "e\[:\[<group>/]\[<event>]]" README; then
+       echo "e:mygroup/ $SYSTEM/$EVENT $OPTIONS" >> dynamic_events
+       test -d events/mygroup
+       echo "-:mygroup/" >> dynamic_events
+       ! test -d events/mygroup
+fi
+
 clear_trace
index b4da41d126d583d9dc92a777ffc88406d6040bb5..13d43f40a6fc6d3db04083f0f628dba29e800208 100644 (file)
@@ -23,4 +23,11 @@ grep -q myevent1 dynamic_events
 
 echo > dynamic_events
 
+if grep -q "p\[:\[<group>/]\[<event>]]" README; then
+       echo "p:mygroup/ $PLACE" >> dynamic_events
+       test -d events/mygroup
+       echo "-:mygroup/" >> dynamic_events
+       ! test -d events/mygroup
+fi
+
 clear_trace