diff mbox

[API-NEXT,2/2] validation: thread: test thrmask

Message ID 1436390434-23769-2-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes July 8, 2015, 9:20 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 test/validation/thread/thread.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

Comments

Christophe Milard July 9, 2015, 6:57 a.m. UTC | #1
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
>
>
Mike Holmes July 9, 2015, 1:53 p.m. UTC | #2
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 mbox

Patch

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,
 };