Skip to content

Commit 04178ea

Browse files
committed
selftests/ftrace: Exclude "(fault)" in testing add/remove eprobe events
The original test for adding and removing eprobes used synthetic events and retrieved the filename from the open system call at the end of the system call. This would allow it to always be loaded into the page tables when accessed. Masami suggested that the test was too complex for just testing add and remove, so it was changed to test just adding and removing an event probe on top of the start of the open system call event. Now it is possible that the filename will not be loaded into memory at the time the eprobe is triggered, and will result in "(fault)" being displayed in the event. This causes the test to fail. Account for "(fault)" also being one of the values of the filename field of the event probe. Link: https://lkml.kernel.org/r/20210907230429.5783d519@rorschach.local.home Fixes: 079db70 ("selftests/ftrace: Add test case to test adding and removing of event probe") Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent c910db9 commit 04178ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ls
2222
echo 0 > events/eprobes/$EPROBE/enable
2323

2424
content=`grep '^ *ls-' trace | grep 'file='`
25-
nocontent=`grep '^ *ls-' trace | grep 'file=' | grep -v -e '"/' -e '"."'` || true
25+
nocontent=`grep '^ *ls-' trace | grep 'file=' | grep -v -e '"/' -e '"."' -e '(fault)' ` || true
2626

2727
if [ -z "$content" ]; then
2828
exit_fail

0 commit comments

Comments
 (0)