Re: [lng-odp] [PATCH] validation: thread: add odp_thread sunnyday tests

2015-04-23 Thread Anders Roxell
On 2015-04-21 17:26, Mike Holmes wrote:
> Add test cases for APIs in the logical ODP THREAD grouping
> 
> Signed-off-by: Mike Holmes 

Reviewed-by: Anders Roxell 

> ---
>  test/validation/.gitignore   |  1 +
>  test/validation/Makefile.am  |  4 +++-
>  test/validation/odp_thread.c | 41 +
>  3 files changed, 45 insertions(+), 1 deletion(-)
>  create mode 100644 test/validation/odp_thread.c
> 
> diff --git a/test/validation/.gitignore b/test/validation/.gitignore
> index 01092d1..cd27c92 100644
> --- a/test/validation/.gitignore
> +++ b/test/validation/.gitignore
> @@ -19,3 +19,4 @@ odp_synchronizers
>  odp_system
>  odp_time
>  odp_timer
> +odp_thread

nit: alphabetic order

Cheers,
Anders

> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
> index 4c28325..6bac101 100644
> --- a/test/validation/Makefile.am
> +++ b/test/validation/Makefile.am
> @@ -22,7 +22,8 @@ EXECUTABLES = odp_buffer \
> odp_synchronizers \
> odp_time \
> odp_timer \
> -   odp_errno
> +   odp_errno \
> +   odp_thread
>  
>  COMPILE_ONLY = odp_pktio
>  
> @@ -63,3 +64,4 @@ dist_odp_packet_SOURCES = odp_packet.c $(ODP_CU_COMMON)
>  dist_odp_pool_SOURCES = odp_pool.c $(ODP_CU_COMMON)
>  dist_odp_errno_SOURCES = odp_errno.c $(ODP_CU_COMMON)
>  dist_odp_cpumask_SOURCES = odp_cpumask.c $(ODP_CU_COMMON)
> +dist_odp_thread_SOURCES = odp_thread.c $(ODP_CU_COMMON)
> diff --git a/test/validation/odp_thread.c b/test/validation/odp_thread.c
> new file mode 100644
> index 000..84db1e7
> --- /dev/null
> +++ b/test/validation/odp_thread.c
> @@ -0,0 +1,41 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +#include 
> +#include 
> +
> +/* Helper macro for CU_TestInfo initialization */
> +#define _CU_TEST_INFO(test_func) {#test_func, test_func}
> +
> +static void test_odp_cpu_id(void)
> +{
> + (void) odp_cpu_id();
> + CU_PASS();
> +}
> +
> +static void test_odp_thread_id(void)
> +{
> + (void) odp_thread_id();
> + CU_PASS();
> +}
> +
> +static void test_odp_thread_count(void)
> +{
> + (void) odp_thread_count();
> + CU_PASS();
> +}
> +
> +CU_TestInfo test_odp_thread[] = {
> + _CU_TEST_INFO(test_odp_cpu_id),
> + _CU_TEST_INFO(test_odp_thread_id),
> + _CU_TEST_INFO(test_odp_thread_count),
> + CU_TEST_INFO_NULL,
> +};
> +
> +CU_SuiteInfo odp_testsuites[] = {
> + {"thread", NULL, NULL, NULL, NULL, test_odp_thread},
> + CU_SUITE_INFO_NULL,
> +};
> -- 
> 2.1.0
> 
> ___
> lng-odp mailing list
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] validation: thread: add odp_thread sunnyday tests

2015-04-23 Thread Christophe Milard
On 2015-04-21 17:26, Mike Holmes wrote:
> Add test cases for APIs in the logical ODP THREAD grouping
> 
> Signed-off-by: Mike Holmes 

Reviewed-by: Christophe Milard 

> ---
>  test/validation/.gitignore   |  1 +
>  test/validation/Makefile.am  |  4 +++-
>  test/validation/odp_thread.c | 41 +
>  3 files changed, 45 insertions(+), 1 deletion(-)
>  create mode 100644 test/validation/odp_thread.c
> 
> diff --git a/test/validation/.gitignore b/test/validation/.gitignore
> index 01092d1..cd27c92 100644
> --- a/test/validation/.gitignore
> +++ b/test/validation/.gitignore
> @@ -19,3 +19,4 @@ odp_synchronizers
>  odp_system
>  odp_time
>  odp_timer
> +odp_thread
> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
> index 4c28325..6bac101 100644
> --- a/test/validation/Makefile.am
> +++ b/test/validation/Makefile.am
> @@ -22,7 +22,8 @@ EXECUTABLES = odp_buffer \
> odp_synchronizers \
> odp_time \
> odp_timer \
> -   odp_errno
> +   odp_errno \
> +   odp_thread
>  
>  COMPILE_ONLY = odp_pktio
>  
> @@ -63,3 +64,4 @@ dist_odp_packet_SOURCES = odp_packet.c $(ODP_CU_COMMON)
>  dist_odp_pool_SOURCES = odp_pool.c $(ODP_CU_COMMON)
>  dist_odp_errno_SOURCES = odp_errno.c $(ODP_CU_COMMON)
>  dist_odp_cpumask_SOURCES = odp_cpumask.c $(ODP_CU_COMMON)
> +dist_odp_thread_SOURCES = odp_thread.c $(ODP_CU_COMMON)
> diff --git a/test/validation/odp_thread.c b/test/validation/odp_thread.c
> new file mode 100644
> index 000..84db1e7
> --- /dev/null
> +++ b/test/validation/odp_thread.c
> @@ -0,0 +1,41 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +#include 
> +#include 
> +
> +/* Helper macro for CU_TestInfo initialization */
> +#define _CU_TEST_INFO(test_func) {#test_func, test_func}
> +
> +static void test_odp_cpu_id(void)
> +{
> + (void) odp_cpu_id();
> + CU_PASS();
> +}
> +
> +static void test_odp_thread_id(void)
> +{
> + (void) odp_thread_id();
> + CU_PASS();
> +}
> +
> +static void test_odp_thread_count(void)
> +{
> + (void) odp_thread_count();
> + CU_PASS();
> +}
> +
> +CU_TestInfo test_odp_thread[] = {
> + _CU_TEST_INFO(test_odp_cpu_id),
> + _CU_TEST_INFO(test_odp_thread_id),
> + _CU_TEST_INFO(test_odp_thread_count),
> + CU_TEST_INFO_NULL,
> +};
> +
> +CU_SuiteInfo odp_testsuites[] = {
> + {"thread", NULL, NULL, NULL, NULL, test_odp_thread},
> + CU_SUITE_INFO_NULL,
> +};
> -- 
> 2.1.0
> 
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] validation: thread: add odp_thread sunnyday tests

2015-04-23 Thread Christophe Milard
Forget my previous comment. I was just confused. What you intend to put
there is limited to the ODP API (excluding helper) right? In that case, you
get my blessing... :-)

On 23 April 2015 at 09:36, Christophe Milard 
wrote:

> On 2015-04-21 17:26, Mike Holmes wrote:
> > Add test cases for APIs in the logical ODP THREAD grouping
> >
> > Signed-off-by: Mike Holmes 
> > ---
> >  test/validation/.gitignore   |  1 +
> >  test/validation/Makefile.am  |  4 +++-
> >  test/validation/odp_thread.c | 41
> +
> >  3 files changed, 45 insertions(+), 1 deletion(-)
> >  create mode 100644 test/validation/odp_thread.c
> >
>
> I think the helper tests should be under helper directory
>
> Christophe
>
> > diff --git a/test/validation/.gitignore b/test/validation/.gitignore
> > index 01092d1..cd27c92 100644
> > --- a/test/validation/.gitignore
> > +++ b/test/validation/.gitignore
> > @@ -19,3 +19,4 @@ odp_synchronizers
> >  odp_system
> >  odp_time
> >  odp_timer
> > +odp_thread
> > diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
> > index 4c28325..6bac101 100644
> > --- a/test/validation/Makefile.am
> > +++ b/test/validation/Makefile.am
> > @@ -22,7 +22,8 @@ EXECUTABLES = odp_buffer \
> > odp_synchronizers \
> > odp_time \
> > odp_timer \
> > -   odp_errno
> > +   odp_errno \
> > +   odp_thread
> >
> >  COMPILE_ONLY = odp_pktio
> >
> > @@ -63,3 +64,4 @@ dist_odp_packet_SOURCES = odp_packet.c $(ODP_CU_COMMON)
> >  dist_odp_pool_SOURCES = odp_pool.c $(ODP_CU_COMMON)
> >  dist_odp_errno_SOURCES = odp_errno.c $(ODP_CU_COMMON)
> >  dist_odp_cpumask_SOURCES = odp_cpumask.c $(ODP_CU_COMMON)
> > +dist_odp_thread_SOURCES = odp_thread.c $(ODP_CU_COMMON)
> > diff --git a/test/validation/odp_thread.c b/test/validation/odp_thread.c
> > new file mode 100644
> > index 000..84db1e7
> > --- /dev/null
> > +++ b/test/validation/odp_thread.c
> > @@ -0,0 +1,41 @@
> > +/* Copyright (c) 2015, Linaro Limited
> > + * All rights reserved.
> > + *
> > + * SPDX-License-Identifier: BSD-3-Clause
> > + */
> > +
> > +#include 
> > +#include 
> > +
> > +/* Helper macro for CU_TestInfo initialization */
> > +#define _CU_TEST_INFO(test_func) {#test_func, test_func}
> > +
> > +static void test_odp_cpu_id(void)
> > +{
> > + (void) odp_cpu_id();
> > + CU_PASS();
> > +}
> > +
> > +static void test_odp_thread_id(void)
> > +{
> > + (void) odp_thread_id();
> > + CU_PASS();
> > +}
> > +
> > +static void test_odp_thread_count(void)
> > +{
> > + (void) odp_thread_count();
> > + CU_PASS();
> > +}
> > +
> > +CU_TestInfo test_odp_thread[] = {
> > + _CU_TEST_INFO(test_odp_cpu_id),
> > + _CU_TEST_INFO(test_odp_thread_id),
> > + _CU_TEST_INFO(test_odp_thread_count),
> > + CU_TEST_INFO_NULL,
> > +};
> > +
> > +CU_SuiteInfo odp_testsuites[] = {
> > + {"thread", NULL, NULL, NULL, NULL, test_odp_thread},
> > + CU_SUITE_INFO_NULL,
> > +};
> > --
> > 2.1.0
> >
> > ___
> > lng-odp mailing list
> > lng-odp@lists.linaro.org
> > https://lists.linaro.org/mailman/listinfo/lng-odp
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] validation: thread: add odp_thread sunnyday tests

2015-04-23 Thread Christophe Milard
On 2015-04-21 17:26, Mike Holmes wrote:
> Add test cases for APIs in the logical ODP THREAD grouping
> 
> Signed-off-by: Mike Holmes 
> ---
>  test/validation/.gitignore   |  1 +
>  test/validation/Makefile.am  |  4 +++-
>  test/validation/odp_thread.c | 41 +
>  3 files changed, 45 insertions(+), 1 deletion(-)
>  create mode 100644 test/validation/odp_thread.c
> 

I think the helper tests should be under helper directory

Christophe

> diff --git a/test/validation/.gitignore b/test/validation/.gitignore
> index 01092d1..cd27c92 100644
> --- a/test/validation/.gitignore
> +++ b/test/validation/.gitignore
> @@ -19,3 +19,4 @@ odp_synchronizers
>  odp_system
>  odp_time
>  odp_timer
> +odp_thread
> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
> index 4c28325..6bac101 100644
> --- a/test/validation/Makefile.am
> +++ b/test/validation/Makefile.am
> @@ -22,7 +22,8 @@ EXECUTABLES = odp_buffer \
> odp_synchronizers \
> odp_time \
> odp_timer \
> -   odp_errno
> +   odp_errno \
> +   odp_thread
>  
>  COMPILE_ONLY = odp_pktio
>  
> @@ -63,3 +64,4 @@ dist_odp_packet_SOURCES = odp_packet.c $(ODP_CU_COMMON)
>  dist_odp_pool_SOURCES = odp_pool.c $(ODP_CU_COMMON)
>  dist_odp_errno_SOURCES = odp_errno.c $(ODP_CU_COMMON)
>  dist_odp_cpumask_SOURCES = odp_cpumask.c $(ODP_CU_COMMON)
> +dist_odp_thread_SOURCES = odp_thread.c $(ODP_CU_COMMON)
> diff --git a/test/validation/odp_thread.c b/test/validation/odp_thread.c
> new file mode 100644
> index 000..84db1e7
> --- /dev/null
> +++ b/test/validation/odp_thread.c
> @@ -0,0 +1,41 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +#include 
> +#include 
> +
> +/* Helper macro for CU_TestInfo initialization */
> +#define _CU_TEST_INFO(test_func) {#test_func, test_func}
> +
> +static void test_odp_cpu_id(void)
> +{
> + (void) odp_cpu_id();
> + CU_PASS();
> +}
> +
> +static void test_odp_thread_id(void)
> +{
> + (void) odp_thread_id();
> + CU_PASS();
> +}
> +
> +static void test_odp_thread_count(void)
> +{
> + (void) odp_thread_count();
> + CU_PASS();
> +}
> +
> +CU_TestInfo test_odp_thread[] = {
> + _CU_TEST_INFO(test_odp_cpu_id),
> + _CU_TEST_INFO(test_odp_thread_id),
> + _CU_TEST_INFO(test_odp_thread_count),
> + CU_TEST_INFO_NULL,
> +};
> +
> +CU_SuiteInfo odp_testsuites[] = {
> + {"thread", NULL, NULL, NULL, NULL, test_odp_thread},
> + CU_SUITE_INFO_NULL,
> +};
> -- 
> 2.1.0
> 
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp