]> Git Repo - linux.git/commitdiff
selftests/user_events: Enable the event before write_fault test in ftrace self-test
authorsunliming <[email protected]>
Mon, 26 Jun 2023 11:13:43 +0000 (19:13 +0800)
committerSteven Rostedt (Google) <[email protected]>
Wed, 28 Jun 2023 15:01:35 +0000 (11:01 -0400)
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]>
tools/testing/selftests/user_events/ftrace_test.c

index eb6904d89f1454ad177e50408f4e1b24853fee21..88898749e5b7edebec955517cd91cb0723de9495 100644 (file)
@@ -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));
 
This page took 0.053067 seconds and 4 git commands to generate.