diff --git a/test/threads/opal_condition.c b/test/threads/opal_condition.c index a6b99894f9..6ef8fa7622 100644 --- a/test/threads/opal_condition.c +++ b/test/threads/opal_condition.c @@ -4,6 +4,7 @@ #include #include "support.h" +#include "opal/runtime/opal.h" #include "opal/constants.h" #include "opal/threads/threads.h" #include "opal/threads/condition.h" @@ -33,7 +34,7 @@ static volatile int thr1_count = 0; static volatile int thr2_count = 0; -#define TEST_COUNT 1000000 +#define TEST_COUNT 100000 static void* thr1_run(opal_object_t* obj) @@ -79,6 +80,9 @@ int main(int argc, char** argv) test_init("opal_condition_t"); + opal_init(); + opal_set_using_threads(true); + OBJ_CONSTRUCT(&mutex, opal_mutex_t); OBJ_CONSTRUCT(&thr1_cond, opal_condition_t); OBJ_CONSTRUCT(&thr2_cond, opal_condition_t); @@ -102,6 +106,8 @@ int main(int argc, char** argv) test_verify_int(OPAL_SUCCESS, rc); test_verify_int(TEST_COUNT, thr2_count); + opal_finalize(); + return test_finalize(); }