diff mbox series

libtracefs: Move follow events test after iterate raw events test

Message ID 20221210201714.59fa518f@gandalf.local.home (mailing list archive)
State Accepted
Commit 7dafc4f9cbdcc274ae8e1fe8b9a727aa2220ca7e
Headers show
Series libtracefs: Move follow events test after iterate raw events test | expand

Commit Message

Steven Rostedt Dec. 11, 2022, 1:17 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The iterate raw events test tests error paths. On is passing in no
callbacks. But the code was changed where if there are follow events
attached to an instance that it is OK not to have a callback attached.
This means that the test of the follow events must be after the iterate
test, otherwise passing in a NULL callback will succeed, making the test
fail.

Move the follow events test after the iterate test.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 utest/tracefs-utest.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c
index a5666e40cac4..629cf2ba8c58 100644
--- a/utest/tracefs-utest.c
+++ b/utest/tracefs-utest.c
@@ -2342,7 +2342,6 @@  void test_tracefs_lib(void)
 	}
 
 	CU_add_test(suite, "Test tracefs/debugfs mounting", test_mounting);
-	CU_add_test(suite, "Follow events", test_follow_events);
 	CU_add_test(suite, "trace cpu read",
 		    test_trace_cpu_read);
 	CU_add_test(suite, "trace cpu pipe",
@@ -2359,6 +2358,10 @@  void test_tracefs_lib(void)
 		    test_system_event);
 	CU_add_test(suite, "tracefs_iterate_raw_events API",
 		    test_iter_raw_events);
+
+	/* Follow events test must be after the iterate raw events above */
+	CU_add_test(suite, "Follow events", test_follow_events);
+
 	CU_add_test(suite, "tracefs_tracers API",
 		    test_tracers);
 	CU_add_test(suite, "tracefs_local events API",