selftests/ftrace: Exclude "(fault)" in testing add/remove eprobe events
Steven Rostedt
maintainerPATCH 1/1 selftests/ftrace: Exclude "(fault)" in testing add/remove eprobe events
From: "Steven Rostedt (VMware)" <[email protected]>
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.
--- .../selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc +1 -1
@@ -22,7 +22,7 @@ ls echo 0 > events/eprobes/$EPROBE/enable content=`grep '^ *ls-' trace | grep 'file='` -nocontent=`grep '^ *ls-' trace | grep 'file=' | grep -v -e '"/' -e '"."'` || true +nocontent=`grep '^ *ls-' trace | grep 'file=' | grep -v -e '"/' -e '"."' -e '(fault)' ` || true if [ -z "$content" ]; then exit_fail
Signature · 1 line
2.31.1
Quoted 14 lines · On Tue, 7 Sep 2021 23:04:29 -0400 Steven Rostedt <[email protected]> wrote:
From: "Steven Rostedt (VMware)" <[email protected]>
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.
Quoted 2 lines
Account for "(fault)" also being one of the values of the filename field of the event probe.
Looks good to me.
Thank you,
Quoted 23 lines
Fixes 079db70794ec5 ("selftests/ftrace: Add test case to test adding and removing of event probe")Signed-off-by Steven Rostedt (VMware) <[email protected]>--- .../selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc +1
-1@@ -22,7 +22,7 @@ ls echo 0 > events/eprobes/$EPROBE/enable content=`grep '^ *ls-' trace | grep 'file='` -nocontent=`grep '^ *ls-' trace | grep 'file=' | grep -v -e '"/' -e '"."'` || true +nocontent=`grep '^ *ls-' trace | grep 'file=' | grep -v -e '"/' -e '"."' -e '(fault)' ` || true if [ -z "$content" ]; then exit_failSignature · 1 line
2.31.1
Signature · 1 line
Masami Hiramatsu <[email protected]>