| 1 | #include "sync/tests/test_internal.h" |
|---|---|
| 2 | |
| 3 | TEST_GROUP_DECLARE(mutex, .intensity_desc = { |
| 4 | .curve = SCALE_PIECEWISE_LOG, |
| 5 | .unit = "threads", |
| 6 | }); |
| 7 | |
| 8 | #define MUTEX_REPORT_PROBLEMS() \ |
| 9 | test_info("Mutex tests are encountering problems and will be skipped"); \ |
| 10 | return TEST_SKIP(TEST_SKIP_NONE); |
| 11 | |
| 12 | static struct mutex basic_test_mtx = MUTEX_INIT; |
| 13 | |
| 14 | TEST_DECLARE_SMOKE(mutex, basic) { |
| 15 | mutex_lock(&basic_test_mtx); |
| 16 | scheduler_yield(); |
| 17 | mutex_unlock(&basic_test_mtx); |
| 18 | return TEST_SUCCESS; |
| 19 | } |
| 20 |