[PATCH] libtracefs: Move follow events test after iterate raw events test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 utest/tracefs-utest.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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",
-- 
2.35.1




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux