| 1 | #ifdef TEST_LOG |
|---|---|
| 2 | #include <log.h> |
| 3 | #include <sch/sched.h> |
| 4 | #include <test.h> |
| 5 | #include <thread/thread.h> |
| 6 | |
| 7 | static struct log_handle log_event = { |
| 8 | .flags = LOG_PRINT, |
| 9 | .seen_internal = 0, |
| 10 | .last_ts_internal = 0, |
| 11 | .msg = "bluh", |
| 12 | |
| 13 | }; |
| 14 | |
| 15 | TEST_DECLARE(log_test, .tier = TEST_TIER_UNIT) { |
| 16 | struct log_site *ls = thread_get_current()->log_site; |
| 17 | log(ls, &log_event, LOG_INFO, "bluh %s", "pickle"); |
| 18 | return TEST_SUCCESS; |
| 19 | } |
| 20 | |
| 21 | #endif |
| 22 |