Message ID | 1436390434-23769-2-git-send-email-mike.holmes@linaro.org |
---|---|
State | New |
Headers | show |
On 8 July 2015 at 23:20, Mike Holmes <mike.holmes@linaro.org> wrote: > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > test/validation/thread/thread.c | 34 ++++++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > > diff --git a/test/validation/thread/thread.c > b/test/validation/thread/thread.c > index d0bd75e..d5609a2 100644 > --- a/test/validation/thread/thread.c > +++ b/test/validation/thread/thread.c > @@ -11,6 +11,37 @@ > /* Helper macro for CU_TestInfo initialization */ > #define _CU_TEST_INFO(test_func) {#test_func, test_func} > > +static void thread_test_odp_thred_type(void) > I guess you wanted "thread_test_odp_thread_type?" (threAd, not thred) > +{ > + odp_thread_type_t t_type; > + > + t_type = odp_thread_type(); > + if ((t_type != ODP_THREAD_WORKER) && > + (t_type != ODP_THREAD_CONTROL)) > + CU_FAIL(); > + > + CU_PASS(); > +} > + > +static void thread_test_odp_thrmask_worker(void) > +{ > + odp_thrmask_t t_type; > + > + (void)odp_thrmask_worker(&t_type); > + > + CU_PASS(); > +} > + > + > +static void thread_test_odp_thrmask_control(void) > +{ > + odp_thrmask_t t_type; > + > + (void)odp_thrmask_control(&t_type); > + > + CU_PASS(); > +} > + > static void thread_test_odp_cpu_id(void) > { > (void)odp_cpu_id(); > @@ -33,6 +64,9 @@ static CU_TestInfo thread_suite[] = { > _CU_TEST_INFO(thread_test_odp_cpu_id), > _CU_TEST_INFO(thread_test_odp_thread_id), > _CU_TEST_INFO(thread_test_odp_thread_count), > + _CU_TEST_INFO(thread_test_odp_thred_type), > thread Christophe. > + _CU_TEST_INFO(thread_test_odp_thrmask_worker), > + _CU_TEST_INFO(thread_test_odp_thrmask_control), > CU_TEST_INFO_NULL, > }; > > -- > 2.1.4 > >
On 9 July 2015 at 02:57, Christophe Milard <christophe.milard@linaro.org> wrote: > > > On 8 July 2015 at 23:20, Mike Holmes <mike.holmes@linaro.org> wrote: > >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >> --- >> test/validation/thread/thread.c | 34 ++++++++++++++++++++++++++++++++++ >> 1 file changed, 34 insertions(+) >> >> diff --git a/test/validation/thread/thread.c >> b/test/validation/thread/thread.c >> index d0bd75e..d5609a2 100644 >> --- a/test/validation/thread/thread.c >> +++ b/test/validation/thread/thread.c >> @@ -11,6 +11,37 @@ >> /* Helper macro for CU_TestInfo initialization */ >> #define _CU_TEST_INFO(test_func) {#test_func, test_func} >> >> +static void thread_test_odp_thred_type(void) >> > > I guess you wanted "thread_test_odp_thread_type?" (threAd, not thred) > Thanks - will fix > > >> +{ >> + odp_thread_type_t t_type; >> + >> + t_type = odp_thread_type(); >> + if ((t_type != ODP_THREAD_WORKER) && >> + (t_type != ODP_THREAD_CONTROL)) >> + CU_FAIL(); >> + >> + CU_PASS(); >> +} >> + >> +static void thread_test_odp_thrmask_worker(void) >> +{ >> + odp_thrmask_t t_type; >> + >> + (void)odp_thrmask_worker(&t_type); >> + >> + CU_PASS(); >> +} >> + >> + >> +static void thread_test_odp_thrmask_control(void) >> +{ >> + odp_thrmask_t t_type; >> + >> + (void)odp_thrmask_control(&t_type); >> + >> + CU_PASS(); >> +} >> + >> static void thread_test_odp_cpu_id(void) >> { >> (void)odp_cpu_id(); >> @@ -33,6 +64,9 @@ static CU_TestInfo thread_suite[] = { >> _CU_TEST_INFO(thread_test_odp_cpu_id), >> _CU_TEST_INFO(thread_test_odp_thread_id), >> _CU_TEST_INFO(thread_test_odp_thread_count), >> + _CU_TEST_INFO(thread_test_odp_thred_type), >> > > thread > Christophe. > > >> + _CU_TEST_INFO(thread_test_odp_thrmask_worker), >> + _CU_TEST_INFO(thread_test_odp_thrmask_control), >> CU_TEST_INFO_NULL, >> }; >> >> -- >> 2.1.4 >> >> >
diff --git a/test/validation/thread/thread.c b/test/validation/thread/thread.c index d0bd75e..d5609a2 100644 --- a/test/validation/thread/thread.c +++ b/test/validation/thread/thread.c @@ -11,6 +11,37 @@ /* Helper macro for CU_TestInfo initialization */ #define _CU_TEST_INFO(test_func) {#test_func, test_func} +static void thread_test_odp_thred_type(void) +{ + odp_thread_type_t t_type; + + t_type = odp_thread_type(); + if ((t_type != ODP_THREAD_WORKER) && + (t_type != ODP_THREAD_CONTROL)) + CU_FAIL(); + + CU_PASS(); +} + +static void thread_test_odp_thrmask_worker(void) +{ + odp_thrmask_t t_type; + + (void)odp_thrmask_worker(&t_type); + + CU_PASS(); +} + + +static void thread_test_odp_thrmask_control(void) +{ + odp_thrmask_t t_type; + + (void)odp_thrmask_control(&t_type); + + CU_PASS(); +} + static void thread_test_odp_cpu_id(void) { (void)odp_cpu_id(); @@ -33,6 +64,9 @@ static CU_TestInfo thread_suite[] = { _CU_TEST_INFO(thread_test_odp_cpu_id), _CU_TEST_INFO(thread_test_odp_thread_id), _CU_TEST_INFO(thread_test_odp_thread_count), + _CU_TEST_INFO(thread_test_odp_thred_type), + _CU_TEST_INFO(thread_test_odp_thrmask_worker), + _CU_TEST_INFO(thread_test_odp_thrmask_control), CU_TEST_INFO_NULL, };
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- test/validation/thread/thread.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)