[PATCH] psxinttypes01: Remove invalid test cases

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Nov 25 08:40:32 UTC 2019


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



More information about the devel mailing list