diff mbox

[v2,2/2] valididation: errno: add sunnyday test

Message ID 1424807370-6257-1-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Feb. 24, 2015, 7:49 p.m. UTC
Call the public APIs for errno in a sunny day configuration.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
v2
Just check for null string pointer

 test/validation/.gitignore  |  1 +
 test/validation/Makefile.am |  5 +++--
 test/validation/odp_errno.c | 28 ++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 test/validation/odp_errno.c

Comments

Maxim Uvarov Feb. 24, 2015, 9:45 p.m. UTC | #1
On 02/24/2015 10:49 PM, Mike Holmes wrote:
> Call the public APIs for errno in a sunny day configuration.
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
> v2
> Just check for null string pointer
>
>   test/validation/.gitignore  |  1 +
>   test/validation/Makefile.am |  5 +++--
>   test/validation/odp_errno.c | 28 ++++++++++++++++++++++++++++
>   3 files changed, 32 insertions(+), 2 deletions(-)
>   create mode 100644 test/validation/odp_errno.c
>
> diff --git a/test/validation/.gitignore b/test/validation/.gitignore
> index 197b094..9c2ff37 100644
> --- a/test/validation/.gitignore
> +++ b/test/validation/.gitignore
> @@ -14,3 +14,4 @@ odp_buffer
>   odp_timer
>   odp_time
>   odp_synchronizers
> +odp_errno

alphabetical order.
> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
> index f9d7d7a..f808aba 100644
> --- a/test/validation/Makefile.am
> +++ b/test/validation/Makefile.am
> @@ -6,17 +6,18 @@ AM_LDFLAGS += -static
>   TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>   
>   if test_vald
> -TESTS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification
> +TESTS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification odp_errno
>   endif
>   
>   dist_bin_SCRIPTS = $(srcdir)/odp_pktio_run
>   
> -bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification
> +bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio  odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification odp_errno
>   odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
>   odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
>   odp_classification_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/classification
>   
>   dist_odp_init_SOURCES = odp_init.c
> +dist_odp_errno_SOURCES = odp_errno.c common/odp_cunit_common.c
move it to some most reasonable alphabetical order. I did it in 
Makefile.am patch. So it's not really critical anyway it will be fixed 
there.
>   dist_odp_init_abort_SOURCES = odp_init_abort.c
>   dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c
>   dist_odp_queue_SOURCES = odp_queue.c common/odp_cunit_common.c
> diff --git a/test/validation/odp_errno.c b/test/validation/odp_errno.c
> new file mode 100644
> index 0000000..89b99d7
> --- /dev/null
> +++ b/test/validation/odp_errno.c
> @@ -0,0 +1,28 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +#include <odp.h>
> +#include "odp_cunit_common.h"
> +
> +static void test_odp_errno_sunny_day(void)
> +{
> +	int my_errno;
empty line
> +	odp_errno_zero();
> +	my_errno = odp_errno();
> +	CU_ASSERT_TRUE(my_errno == 0);
> +	odp_errno_print("odp_errno");
> +	CU_ASSERT_PTR_NOT_NULL(odp_errno_str(my_errno));
> +}
> +
> +CU_TestInfo test_odp_errno[] = {
> +	{"sunny day", test_odp_errno_sunny_day},
> +	CU_TEST_INFO_NULL,
> +};
> +
> +CU_SuiteInfo odp_testsuites[] = {
> +	{"Errno", NULL, NULL, NULL, NULL, test_odp_errno},
> +	CU_SUITE_INFO_NULL,
> +};
Mike Holmes Feb. 24, 2015, 10:08 p.m. UTC | #2
On 24 February 2015 at 16:45, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> On 02/24/2015 10:49 PM, Mike Holmes wrote:
>
>> Call the public APIs for errno in a sunny day configuration.
>>
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>> ---
>> v2
>> Just check for null string pointer
>>
>>   test/validation/.gitignore  |  1 +
>>   test/validation/Makefile.am |  5 +++--
>>   test/validation/odp_errno.c | 28 ++++++++++++++++++++++++++++
>>   3 files changed, 32 insertions(+), 2 deletions(-)
>>   create mode 100644 test/validation/odp_errno.c
>>
>> diff --git a/test/validation/.gitignore b/test/validation/.gitignore
>> index 197b094..9c2ff37 100644
>> --- a/test/validation/.gitignore
>> +++ b/test/validation/.gitignore
>> @@ -14,3 +14,4 @@ odp_buffer
>>   odp_timer
>>   odp_time
>>   odp_synchronizers
>> +odp_errno
>>
>
> alphabetical order.


ok


>
>  diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
>> index f9d7d7a..f808aba 100644
>> --- a/test/validation/Makefile.am
>> +++ b/test/validation/Makefile.am
>> @@ -6,17 +6,18 @@ AM_LDFLAGS += -static
>>   TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>>     if test_vald
>> -TESTS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto
>> odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time
>> odp_synchronizers odp_classification
>> +TESTS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto
>> odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time
>> odp_synchronizers odp_classification odp_errno
>>   endif
>>     dist_bin_SCRIPTS = $(srcdir)/odp_pktio_run
>>   -bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue
>> odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system odp_timer
>> odp_time odp_synchronizers odp_classification
>> +bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto
>> odp_shm odp_schedule odp_pktio  odp_buffer odp_system odp_timer odp_time
>> odp_synchronizers odp_classification odp_errno
>>   odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
>>   odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
>>   odp_classification_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/classification
>>     dist_odp_init_SOURCES = odp_init.c
>> +dist_odp_errno_SOURCES = odp_errno.c common/odp_cunit_common.c
>>
> move it to some most reasonable alphabetical order. I did it in
> Makefile.am patch. So it's not really critical anyway it will be fixed
> there.


I wont reorder all of these now, that is for another patch because it would
make this change harder to review


>
>    dist_odp_init_abort_SOURCES = odp_init_abort.c
>>   dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c
>>   dist_odp_queue_SOURCES = odp_queue.c common/odp_cunit_common.c
>> diff --git a/test/validation/odp_errno.c b/test/validation/odp_errno.c
>> new file mode 100644
>> index 0000000..89b99d7
>> --- /dev/null
>> +++ b/test/validation/odp_errno.c
>> @@ -0,0 +1,28 @@
>> +/* Copyright (c) 2015, Linaro Limited
>> + * All rights reserved.
>> + *
>> + * SPDX-License-Identifier:     BSD-3-Clause
>> + */
>> +
>> +#include <odp.h>
>> +#include "odp_cunit_common.h"
>> +
>> +static void test_odp_errno_sunny_day(void)
>> +{
>> +       int my_errno;
>>
> empty line


ok


>
>  +       odp_errno_zero();
>> +       my_errno = odp_errno();
>> +       CU_ASSERT_TRUE(my_errno == 0);
>> +       odp_errno_print("odp_errno");
>> +       CU_ASSERT_PTR_NOT_NULL(odp_errno_str(my_errno));
>> +}
>> +
>> +CU_TestInfo test_odp_errno[] = {
>> +       {"sunny day", test_odp_errno_sunny_day},
>> +       CU_TEST_INFO_NULL,
>> +};
>> +
>> +CU_SuiteInfo odp_testsuites[] = {
>> +       {"Errno", NULL, NULL, NULL, NULL, test_odp_errno},
>> +       CU_SUITE_INFO_NULL,
>> +};
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Feb. 25, 2015, 1:47 p.m. UTC | #3
On 02/25/2015 01:08 AM, Mike Holmes wrote:
>
>
> On 24 February 2015 at 16:45, Maxim Uvarov <maxim.uvarov@linaro.org 
> <mailto:maxim.uvarov@linaro.org>> wrote:
>
>     On 02/24/2015 10:49 PM, Mike Holmes wrote:
>
>         Call the public APIs for errno in a sunny day configuration.
>
>         Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>         <mailto:mike.holmes@linaro.org>>
>         ---
>         v2
>         Just check for null string pointer
>
>           test/validation/.gitignore  |  1 +
>           test/validation/Makefile.am |  5 +++--
>           test/validation/odp_errno.c | 28 ++++++++++++++++++++++++++++
>           3 files changed, 32 insertions(+), 2 deletions(-)
>           create mode 100644 test/validation/odp_errno.c
>
>         diff --git a/test/validation/.gitignore
>         b/test/validation/.gitignore
>         index 197b094..9c2ff37 100644
>         --- a/test/validation/.gitignore
>         +++ b/test/validation/.gitignore
>         @@ -14,3 +14,4 @@ odp_buffer
>           odp_timer
>           odp_time
>           odp_synchronizers
>         +odp_errno
>
>
>     alphabetical order.
>
>
> ok
>
>
>         diff --git a/test/validation/Makefile.am
>         b/test/validation/Makefile.am
>         index f9d7d7a..f808aba 100644
>         --- a/test/validation/Makefile.am
>         +++ b/test/validation/Makefile.am
>         @@ -6,17 +6,18 @@ AM_LDFLAGS += -static
>           TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>             if test_vald
>         -TESTS = odp_init odp_init_abort odp_init_log odp_queue
>         odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer
>         odp_system odp_timer odp_time odp_synchronizers odp_classification
>         +TESTS = odp_init odp_init_abort odp_init_log odp_queue
>         odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer
>         odp_system odp_timer odp_time odp_synchronizers
>         odp_classification odp_errno
>           endif
>             dist_bin_SCRIPTS = $(srcdir)/odp_pktio_run
>           -bin_PROGRAMS = odp_init odp_init_abort odp_init_log
>         odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer
>         odp_system odp_timer odp_time odp_synchronizers odp_classification
>         +bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue
>         odp_crypto odp_shm odp_schedule odp_pktio odp_buffer
>         odp_system odp_timer odp_time odp_synchronizers
>         odp_classification odp_errno
>           odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
>           odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
>           odp_classification_CFLAGS = $(AM_CFLAGS)
>         -I$(srcdir)/classification
>             dist_odp_init_SOURCES = odp_init.c
>         +dist_odp_errno_SOURCES = odp_errno.c common/odp_cunit_common.c
>
>     move it to some most reasonable alphabetical order. I did it in
>     Makefile.am patch. So it's not really critical anyway it will be
>     fixed there.
>
>
> I wont reorder all of these now, that is for another patch because it 
> would make this change harder to review

No need to reorder that, I did it in my patch for Makefile.am. (That is 
what I wanted to say).

Maxim.

>
>           dist_odp_init_abort_SOURCES = odp_init_abort.c
>           dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c
>           dist_odp_queue_SOURCES = odp_queue.c common/odp_cunit_common.c
>         diff --git a/test/validation/odp_errno.c
>         b/test/validation/odp_errno.c
>         new file mode 100644
>         index 0000000..89b99d7
>         --- /dev/null
>         +++ b/test/validation/odp_errno.c
>         @@ -0,0 +1,28 @@
>         +/* Copyright (c) 2015, Linaro Limited
>         + * All rights reserved.
>         + *
>         + * SPDX-License-Identifier:     BSD-3-Clause
>         + */
>         +
>         +#include <odp.h>
>         +#include "odp_cunit_common.h"
>         +
>         +static void test_odp_errno_sunny_day(void)
>         +{
>         +       int my_errno;
>
>     empty line
>
>
> ok
>
>
>         +       odp_errno_zero();
>         +       my_errno = odp_errno();
>         +       CU_ASSERT_TRUE(my_errno == 0);
>         +       odp_errno_print("odp_errno");
>         +       CU_ASSERT_PTR_NOT_NULL(odp_errno_str(my_errno));
>         +}
>         +
>         +CU_TestInfo test_odp_errno[] = {
>         +       {"sunny day", test_odp_errno_sunny_day},
>         +       CU_TEST_INFO_NULL,
>         +};
>         +
>         +CU_SuiteInfo odp_testsuites[] = {
>         +       {"Errno", NULL, NULL, NULL, NULL, test_odp_errno},
>         +       CU_SUITE_INFO_NULL,
>         +};
>
>
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> -- 
> *Mike Holmes*
> Linaro  Sr Technical Manager
> LNG - ODP
Bill Fischofer Feb. 25, 2015, 5:06 p.m. UTC | #4
This patch no longer applies to the tip.  Needs to be rebased.

Bill

On Wed, Feb 25, 2015 at 7:47 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> On 02/25/2015 01:08 AM, Mike Holmes wrote:
>
>>
>>
>> On 24 February 2015 at 16:45, Maxim Uvarov <maxim.uvarov@linaro.org
>> <mailto:maxim.uvarov@linaro.org>> wrote:
>>
>>     On 02/24/2015 10:49 PM, Mike Holmes wrote:
>>
>>         Call the public APIs for errno in a sunny day configuration.
>>
>>         Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>>         <mailto:mike.holmes@linaro.org>>
>>
>>         ---
>>         v2
>>         Just check for null string pointer
>>
>>           test/validation/.gitignore  |  1 +
>>           test/validation/Makefile.am |  5 +++--
>>           test/validation/odp_errno.c | 28 ++++++++++++++++++++++++++++
>>           3 files changed, 32 insertions(+), 2 deletions(-)
>>           create mode 100644 test/validation/odp_errno.c
>>
>>         diff --git a/test/validation/.gitignore
>>         b/test/validation/.gitignore
>>         index 197b094..9c2ff37 100644
>>         --- a/test/validation/.gitignore
>>         +++ b/test/validation/.gitignore
>>         @@ -14,3 +14,4 @@ odp_buffer
>>           odp_timer
>>           odp_time
>>           odp_synchronizers
>>         +odp_errno
>>
>>
>>     alphabetical order.
>>
>>
>> ok
>>
>>
>>         diff --git a/test/validation/Makefile.am
>>         b/test/validation/Makefile.am
>>         index f9d7d7a..f808aba 100644
>>         --- a/test/validation/Makefile.am
>>         +++ b/test/validation/Makefile.am
>>         @@ -6,17 +6,18 @@ AM_LDFLAGS += -static
>>           TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>>             if test_vald
>>         -TESTS = odp_init odp_init_abort odp_init_log odp_queue
>>         odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer
>>         odp_system odp_timer odp_time odp_synchronizers odp_classification
>>         +TESTS = odp_init odp_init_abort odp_init_log odp_queue
>>         odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer
>>         odp_system odp_timer odp_time odp_synchronizers
>>         odp_classification odp_errno
>>           endif
>>             dist_bin_SCRIPTS = $(srcdir)/odp_pktio_run
>>           -bin_PROGRAMS = odp_init odp_init_abort odp_init_log
>>         odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer
>>         odp_system odp_timer odp_time odp_synchronizers odp_classification
>>         +bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue
>>         odp_crypto odp_shm odp_schedule odp_pktio odp_buffer
>>         odp_system odp_timer odp_time odp_synchronizers
>>         odp_classification odp_errno
>>           odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
>>           odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
>>           odp_classification_CFLAGS = $(AM_CFLAGS)
>>         -I$(srcdir)/classification
>>             dist_odp_init_SOURCES = odp_init.c
>>         +dist_odp_errno_SOURCES = odp_errno.c common/odp_cunit_common.c
>>
>>     move it to some most reasonable alphabetical order. I did it in
>>     Makefile.am patch. So it's not really critical anyway it will be
>>     fixed there.
>>
>>
>> I wont reorder all of these now, that is for another patch because it
>> would make this change harder to review
>>
>
> No need to reorder that, I did it in my patch for Makefile.am. (That is
> what I wanted to say).
>
> Maxim.
>
>
>>           dist_odp_init_abort_SOURCES = odp_init_abort.c
>>           dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c
>>           dist_odp_queue_SOURCES = odp_queue.c common/odp_cunit_common.c
>>         diff --git a/test/validation/odp_errno.c
>>         b/test/validation/odp_errno.c
>>         new file mode 100644
>>         index 0000000..89b99d7
>>         --- /dev/null
>>         +++ b/test/validation/odp_errno.c
>>         @@ -0,0 +1,28 @@
>>         +/* Copyright (c) 2015, Linaro Limited
>>         + * All rights reserved.
>>         + *
>>         + * SPDX-License-Identifier:     BSD-3-Clause
>>         + */
>>         +
>>         +#include <odp.h>
>>         +#include "odp_cunit_common.h"
>>         +
>>         +static void test_odp_errno_sunny_day(void)
>>         +{
>>         +       int my_errno;
>>
>>     empty line
>>
>>
>> ok
>>
>>
>>         +       odp_errno_zero();
>>         +       my_errno = odp_errno();
>>         +       CU_ASSERT_TRUE(my_errno == 0);
>>         +       odp_errno_print("odp_errno");
>>         +       CU_ASSERT_PTR_NOT_NULL(odp_errno_str(my_errno));
>>         +}
>>         +
>>         +CU_TestInfo test_odp_errno[] = {
>>         +       {"sunny day", test_odp_errno_sunny_day},
>>         +       CU_TEST_INFO_NULL,
>>         +};
>>         +
>>         +CU_SuiteInfo odp_testsuites[] = {
>>         +       {"Errno", NULL, NULL, NULL, NULL, test_odp_errno},
>>         +       CU_SUITE_INFO_NULL,
>>         +};
>>
>>
>>
>>     _______________________________________________
>>     lng-odp mailing list
>>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>     http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>>
>>
>> --
>> *Mike Holmes*
>> Linaro  Sr Technical Manager
>> LNG - ODP
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Mike Holmes Feb. 26, 2015, 9:28 p.m. UTC | #5
I have re-based on the new Makefile.am, however the comment on alphabetical
listing in .gitignore I have to go back on fixing that, the diff did not
show that the file is completely un-ordered and is beyond the scope of
these patches.

V3 on the way



On 25 February 2015 at 12:06, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

> This patch no longer applies to the tip.  Needs to be rebased.
>
> Bill
>
> On Wed, Feb 25, 2015 at 7:47 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
> wrote:
>
>> On 02/25/2015 01:08 AM, Mike Holmes wrote:
>>
>>>
>>>
>>> On 24 February 2015 at 16:45, Maxim Uvarov <maxim.uvarov@linaro.org
>>> <mailto:maxim.uvarov@linaro.org>> wrote:
>>>
>>>     On 02/24/2015 10:49 PM, Mike Holmes wrote:
>>>
>>>         Call the public APIs for errno in a sunny day configuration.
>>>
>>>         Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>>>         <mailto:mike.holmes@linaro.org>>
>>>
>>>         ---
>>>         v2
>>>         Just check for null string pointer
>>>
>>>           test/validation/.gitignore  |  1 +
>>>           test/validation/Makefile.am |  5 +++--
>>>           test/validation/odp_errno.c | 28 ++++++++++++++++++++++++++++
>>>           3 files changed, 32 insertions(+), 2 deletions(-)
>>>           create mode 100644 test/validation/odp_errno.c
>>>
>>>         diff --git a/test/validation/.gitignore
>>>         b/test/validation/.gitignore
>>>         index 197b094..9c2ff37 100644
>>>         --- a/test/validation/.gitignore
>>>         +++ b/test/validation/.gitignore
>>>         @@ -14,3 +14,4 @@ odp_buffer
>>>           odp_timer
>>>           odp_time
>>>           odp_synchronizers
>>>         +odp_errno
>>>
>>>
>>>     alphabetical order.
>>>
>>>
>>> ok
>>>
>>>
>>>         diff --git a/test/validation/Makefile.am
>>>         b/test/validation/Makefile.am
>>>         index f9d7d7a..f808aba 100644
>>>         --- a/test/validation/Makefile.am
>>>         +++ b/test/validation/Makefile.am
>>>         @@ -6,17 +6,18 @@ AM_LDFLAGS += -static
>>>           TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>>>             if test_vald
>>>         -TESTS = odp_init odp_init_abort odp_init_log odp_queue
>>>         odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer
>>>         odp_system odp_timer odp_time odp_synchronizers
>>> odp_classification
>>>         +TESTS = odp_init odp_init_abort odp_init_log odp_queue
>>>         odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer
>>>         odp_system odp_timer odp_time odp_synchronizers
>>>         odp_classification odp_errno
>>>           endif
>>>             dist_bin_SCRIPTS = $(srcdir)/odp_pktio_run
>>>           -bin_PROGRAMS = odp_init odp_init_abort odp_init_log
>>>         odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer
>>>         odp_system odp_timer odp_time odp_synchronizers
>>> odp_classification
>>>         +bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue
>>>         odp_crypto odp_shm odp_schedule odp_pktio odp_buffer
>>>         odp_system odp_timer odp_time odp_synchronizers
>>>         odp_classification odp_errno
>>>           odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
>>>           odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
>>>           odp_classification_CFLAGS = $(AM_CFLAGS)
>>>         -I$(srcdir)/classification
>>>             dist_odp_init_SOURCES = odp_init.c
>>>         +dist_odp_errno_SOURCES = odp_errno.c common/odp_cunit_common.c
>>>
>>>     move it to some most reasonable alphabetical order. I did it in
>>>     Makefile.am patch. So it's not really critical anyway it will be
>>>     fixed there.
>>>
>>>
>>> I wont reorder all of these now, that is for another patch because it
>>> would make this change harder to review
>>>
>>
>> No need to reorder that, I did it in my patch for Makefile.am. (That is
>> what I wanted to say).
>>
>> Maxim.
>>
>>
>>>           dist_odp_init_abort_SOURCES = odp_init_abort.c
>>>           dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c
>>>           dist_odp_queue_SOURCES = odp_queue.c common/odp_cunit_common.c
>>>         diff --git a/test/validation/odp_errno.c
>>>         b/test/validation/odp_errno.c
>>>         new file mode 100644
>>>         index 0000000..89b99d7
>>>         --- /dev/null
>>>         +++ b/test/validation/odp_errno.c
>>>         @@ -0,0 +1,28 @@
>>>         +/* Copyright (c) 2015, Linaro Limited
>>>         + * All rights reserved.
>>>         + *
>>>         + * SPDX-License-Identifier:     BSD-3-Clause
>>>         + */
>>>         +
>>>         +#include <odp.h>
>>>         +#include "odp_cunit_common.h"
>>>         +
>>>         +static void test_odp_errno_sunny_day(void)
>>>         +{
>>>         +       int my_errno;
>>>
>>>     empty line
>>>
>>>
>>> ok
>>>
>>>
>>>         +       odp_errno_zero();
>>>         +       my_errno = odp_errno();
>>>         +       CU_ASSERT_TRUE(my_errno == 0);
>>>         +       odp_errno_print("odp_errno");
>>>         +       CU_ASSERT_PTR_NOT_NULL(odp_errno_str(my_errno));
>>>         +}
>>>         +
>>>         +CU_TestInfo test_odp_errno[] = {
>>>         +       {"sunny day", test_odp_errno_sunny_day},
>>>         +       CU_TEST_INFO_NULL,
>>>         +};
>>>         +
>>>         +CU_SuiteInfo odp_testsuites[] = {
>>>         +       {"Errno", NULL, NULL, NULL, NULL, test_odp_errno},
>>>         +       CU_SUITE_INFO_NULL,
>>>         +};
>>>
>>>
>>>
>>>     _______________________________________________
>>>     lng-odp mailing list
>>>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>     http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>>
>>>
>>>
>>> --
>>> *Mike Holmes*
>>> Linaro  Sr Technical Manager
>>> LNG - ODP
>>>
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
diff mbox

Patch

diff --git a/test/validation/.gitignore b/test/validation/.gitignore
index 197b094..9c2ff37 100644
--- a/test/validation/.gitignore
+++ b/test/validation/.gitignore
@@ -14,3 +14,4 @@  odp_buffer
 odp_timer
 odp_time
 odp_synchronizers
+odp_errno
diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index f9d7d7a..f808aba 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -6,17 +6,18 @@  AM_LDFLAGS += -static
 TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
 
 if test_vald
-TESTS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification
+TESTS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification odp_errno
 endif
 
 dist_bin_SCRIPTS = $(srcdir)/odp_pktio_run
 
-bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification
+bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio  odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification odp_errno
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
 odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
 odp_classification_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/classification
 
 dist_odp_init_SOURCES = odp_init.c
+dist_odp_errno_SOURCES = odp_errno.c common/odp_cunit_common.c
 dist_odp_init_abort_SOURCES = odp_init_abort.c
 dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c
 dist_odp_queue_SOURCES = odp_queue.c common/odp_cunit_common.c
diff --git a/test/validation/odp_errno.c b/test/validation/odp_errno.c
new file mode 100644
index 0000000..89b99d7
--- /dev/null
+++ b/test/validation/odp_errno.c
@@ -0,0 +1,28 @@ 
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#include <odp.h>
+#include "odp_cunit_common.h"
+
+static void test_odp_errno_sunny_day(void)
+{
+	int my_errno;
+	odp_errno_zero();
+	my_errno = odp_errno();
+	CU_ASSERT_TRUE(my_errno == 0);
+	odp_errno_print("odp_errno");
+	CU_ASSERT_PTR_NOT_NULL(odp_errno_str(my_errno));
+}
+
+CU_TestInfo test_odp_errno[] = {
+	{"sunny day", test_odp_errno_sunny_day},
+	CU_TEST_INFO_NULL,
+};
+
+CU_SuiteInfo odp_testsuites[] = {
+	{"Errno", NULL, NULL, NULL, NULL, test_odp_errno},
+	CU_SUITE_INFO_NULL,
+};