Skip to content

Commit c27b40c

Browse files
sunlimingrostedt
authored andcommitted
selftests/user_events: Enable the event before write_fault test in ftrace self-test
The user_event has not be enabled in write_fault test in ftrace self-test, Just enable it. Link: https://lkml.kernel.org/r/[email protected] Acked-by: Beau Belgrave <[email protected]> Signed-off-by: sunliming <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent f6d026e commit c27b40c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/testing/selftests/user_events/ftrace_test.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,10 @@ TEST_F(user, write_fault) {
400400
ASSERT_EQ(0, ioctl(self->data_fd, DIAG_IOCSREG, &reg));
401401
ASSERT_EQ(0, reg.write_index);
402402

403+
/* Enable event */
404+
self->enable_fd = open(enable_file, O_RDWR);
405+
ASSERT_NE(-1, write(self->enable_fd, "1", sizeof("1")))
406+
403407
/* Write should work normally */
404408
ASSERT_NE(-1, writev(self->data_fd, (const struct iovec *)io, 2));
405409

0 commit comments

Comments
 (0)