[PATCH] psxinttypes01: Remove invalid test cases

Joel Sherrill joel at rtems.org
Mon Nov 25 12:45:24 UTC 2019


The scn file will be incorrect after this change. The doc file may be as
well.

On Mon, Nov 25, 2019, 2:40 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> The functions expect a valid string as input according to POSIX.  On
> systems with a NULL pointer protection the test cases ended up in
> exceptions.
> ---
>  testsuites/psxtests/psxinttypes01/init.c | 20 --------------------
>  1 file changed, 20 deletions(-)
>
> diff --git a/testsuites/psxtests/psxinttypes01/init.c
> b/testsuites/psxtests/psxinttypes01/init.c
> index bfb6d4b357..030aa2aa57 100644
> --- a/testsuites/psxtests/psxinttypes01/init.c
> +++ b/testsuites/psxtests/psxinttypes01/init.c
> @@ -95,11 +95,6 @@ rtems_task Init(rtems_task_argument ignored)
>    rtems_test_assert( result_strtoimax == INTMAX_MIN );
>    rtems_test_assert( errno == ERANGE );
>
> -  puts( "Invalid Input - Send NULL Pointer" );
> -  result_strtoimax = strtoimax( NULL, &endptr1, base );
> -  rtems_test_assert( result_strtoimax == 0 );
> -  rtems_test_assert( errno == EINVAL );
> -
>    puts( "Invalid Input - Invalid base - Use base = 40" );
>    result_strtoimax = strtoimax( nptr1_p, &endptr1, invalid_base );
>    rtems_test_assert( result_strtoimax == 0 );
> @@ -131,11 +126,6 @@ rtems_task Init(rtems_task_argument ignored)
>    rtems_test_assert( result_strtoumax != 0 );
>    rtems_test_assert( errno == ERANGE );
>
> -  puts( "Invalid Input - Send NULL Pointer" );
> -  result_strtoumax = strtoumax( NULL, &endptr1, base );
> -  rtems_test_assert( result_strtoumax == 0 );
> -  rtems_test_assert( errno == EINVAL );
> -
>    puts( "Invalid Input - Invalid base - Use base = 40" );
>    result_strtoumax = strtoumax( nptr1_p, &endptr1, invalid_base );
>    rtems_test_assert( result_strtoumax == 0 );
> @@ -167,11 +157,6 @@ rtems_task Init(rtems_task_argument ignored)
>    rtems_test_assert( result_strtoimax == INTMAX_MIN );
>    rtems_test_assert( errno == ERANGE );
>
> -  puts( "Invalid Input - Send NULL Pointer" );
> -  result_strtoimax = wcstoimax( NULL, &endptr2, base );
> -  rtems_test_assert( result_strtoimax == 0 );
> -  rtems_test_assert( errno == EINVAL );
> -
>    puts( "Invalid Input - Invalid base - Use base = 40" );
>    result_strtoimax = wcstoimax( nptr2_p, &endptr2, invalid_base );
>    rtems_test_assert( result_strtoimax == 0 );
> @@ -203,11 +188,6 @@ rtems_task Init(rtems_task_argument ignored)
>    rtems_test_assert( result_strtoumax != 0 );
>    rtems_test_assert( errno == ERANGE );
>
> -  puts( "Invalid Input - Send NULL Pointer" );
> -  result_strtoumax = wcstoumax( NULL, &endptr2, base );
> -  rtems_test_assert( result_strtoumax == 0 );
> -  rtems_test_assert( errno == EINVAL );
> -
>    puts( "Invalid Input - Invalid base - Use base = 40" );
>    result_strtoumax = wcstoumax( nptr2_p, &endptr2, invalid_base );
>    rtems_test_assert( result_strtoumax == 0 );
> --
> 2.16.4
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20191125/8f690da6/attachment.html>


More information about the devel mailing list