Commit c27b40cf authored by sunliming's avatar sunliming Committed by Steven Rostedt (Google)

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/20230626111344.19136-3-sunliming@kylinos.cnAcked-by: default avatarBeau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: default avatarsunliming <sunliming@kylinos.cn>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent f6d026ee
......@@ -400,6 +400,10 @@ TEST_F(user, write_fault) {
ASSERT_EQ(0, ioctl(self->data_fd, DIAG_IOCSREG, &reg));
ASSERT_EQ(0, reg.write_index);
/* Enable event */
self->enable_fd = open(enable_file, O_RDWR);
ASSERT_NE(-1, write(self->enable_fd, "1", sizeof("1")))
/* Write should work normally */
ASSERT_NE(-1, writev(self->data_fd, (const struct iovec *)io, 2));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment