<div dir="ltr">A few administrative changes. <div><br></div><div>There needs to be a proper commit log message.</div><div><br></div><div>init.c does not have a copyright/license notices.</div><div><br></div><div>There is no .doc file giving a description of the test purposes/cases.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 26, 2018 at 11:32 AM Aditya Upadhyay <<a href="mailto:aadit0402@gmail.com">aadit0402@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 testsuites/psxtests/Makefile.am                    |  10 ++<br>
 testsuites/psxtests/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>                   |   1 +<br>
 testsuites/psxtests/psxinttypes01/init.c           | 122 +++++++++++++++++++++<br>
 .../psxtests/psxinttypes01/psxinttypes01.scn       |  28 +++++<br>
 4 files changed, 161 insertions(+)<br>
 create mode 100644 testsuites/psxtests/psxinttypes01/init.c<br>
 create mode 100644 testsuites/psxtests/psxinttypes01/psxinttypes01.scn<br>
<br>
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am<br>
index 2a18d54..c7b4899 100644<br>
--- a/testsuites/psxtests/Makefile.am<br>
+++ b/testsuites/psxtests/Makefile.am<br>
@@ -15,6 +15,16 @@ psx_lib =<br>
 support_includes = -I$(top_srcdir)/../support/include<br>
<br>
 if HAS_POSIX<br>
+if TEST_psxinttypes01<br>
+psx_tests += psxinttypes01<br>
+psx_screens += psxinttypes01/psxinttypes01.scn<br>
+psxinttypes01_SOURCES = psxinttypes01/init.c <br>
+psxinttypes01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxinttypes01) \<br>
+       $(support_includes) -I$(top_srcdir)/include<br>
+endif<br>
+endif<br>
+<br>
+if HAS_POSIX<br>
 if TEST_psx01<br>
 psx_tests += psx01<br>
 psx01_SOURCES = psx01/init.c psx01/task.c psx01/system.h \<br>
diff --git a/testsuites/psxtests/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/testsuites/psxtests/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
index cdd6ee7..85559e4 100644<br>
--- a/testsuites/psxtests/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
+++ b/testsuites/psxtests/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
@@ -91,6 +91,7 @@ RTEMS_TEST_CHECK([psxid01])<br>
 RTEMS_TEST_CHECK([psximfs01])<br>
 RTEMS_TEST_CHECK([psximfs02])<br>
 RTEMS_TEST_CHECK([psxintrcritical01])<br>
+RTEMS_TEST_CHECK([psxinttypes01])<br>
 RTEMS_TEST_CHECK([psxitimer])<br>
 RTEMS_TEST_CHECK([psxkey01])<br>
 RTEMS_TEST_CHECK([psxkey02])<br>
diff --git a/testsuites/psxtests/psxinttypes01/init.c b/testsuites/psxtests/psxinttypes01/init.c<br>
new file mode 100644<br>
index 0000000..7f5942a<br>
--- /dev/null<br>
+++ b/testsuites/psxtests/psxinttypes01/init.c<br>
@@ -0,0 +1,122 @@<br>
+#ifdef HAVE_CONFIG_H<br>
+#include "config.h"<br>
+#endif<br>
+<br>
+#include <rtems/test.h><br>
+#include <inttypes.h><br>
+#include <stdio.h><br>
+#include <errno.h><br>
+#include <tmacros.h><br>
+#include <stdint.h><br>
+#include <stddef.h><br>
+<br>
+const char rtems_test_name[] = "PSXINTTYPE 01";<br>
+<br>
+/* forward declarations to avoid warnings */<br>
+rtems_task Init(rtems_task_argument ignored);<br>
+<br>
+rtems_task Init(rtems_task_argument ignored)<br>
+{<br>
+  int       base     = 10;<br>
+  char     *nptr1    = "123abc";<br>
+  char     *endptr1  = NULL;<br>
+  wchar_t  *nptr2    = L"-123junk";<br>
+  wchar_t  *endptr2  = NULL;<br>
+  intmax_t  status1;<br>
+  uintmax_t status2;<br>
+  <br>
+<br>
+  TEST_BEGIN();<br>
+<br>
+  puts( "\nChecking invalid base value" );<br>
+  rtems_test_assert( base >=2 && base <= 36 );<br>
+  <br>
+  /*Test for strtoimax  */<br>
+  puts( "Strtoimax Testcases...." );<br>
+  puts( "Generating Status" );<br>
+  status1 = strtoimax( nptr1, &endptr1, base );<br>
+ <br>
+  rtems_test_assert( status1 != 0); <br>
+  rtems_test_assert( base != EINVAL);<br>
+  <br>
+  puts( "Checking Garbage end of endptr" );  <br>
+  rtems_test_assert( *endptr1 != '\0' );<br>
+  <br>
+  puts( "Checking Underflow Case" );<br>
+  rtems_test_assert( status1 >= INTMAX_MIN );<br>
+  <br>
+  puts( "Checking Overflow Case" );<br>
+  rtems_test_assert( status1 <= INTMAX_MAX ) ;<br>
+  <br>
+  printf( "status = %jd \n" , status1 );<br>
+  <br>
+  /*Test for strtoumax  */<br>
+  puts( "Strtoumax Testcases...." );<br>
+  puts( "Generating Status" );<br>
+  status2 = strtoumax( nptr1, &endptr1, base );<br>
+  <br>
+  rtems_test_assert( status2 != 0); <br>
+  rtems_test_assert( base != EINVAL);<br>
+<br>
+  puts( "Checking Garbage end of endptr" );  <br>
+  rtems_test_assert( *endptr1 != '\0' );<br>
+  <br>
+  puts( "Checking Overflow Case" );<br>
+  rtems_test_assert( status2 <= UINTMAX_MAX );<br>
+  <br>
+  printf( "status = %ju \n", status2 );<br>
+  <br>
+  /*Test for wcstoimax  */<br>
+  puts( "Wcstoimax Testcases...." );<br>
+  puts( "Generating Status" );<br>
+  status1 = wcstoimax( nptr2, &endptr2, base );<br>
+  <br>
+  rtems_test_assert( status1 != 0); <br>
+  rtems_test_assert( base != EINVAL);<br>
+  <br>
+  puts( "Checking Garbage end of endptr" );  <br>
+  rtems_test_assert( *endptr2 != '\0' );<br>
+  <br>
+  puts( "Checking Underflow Case" );<br>
+  rtems_test_assert( status1 >= INTMAX_MIN );<br>
+  <br>
+  puts( "Checking Overflow Case" );<br>
+  rtems_test_assert( status1 <= INTMAX_MAX ) ;<br>
+  <br>
+  printf( "status = %jd \n", status1 );<br>
+<br>
+  /*Test for wcstoumax  */<br>
+  puts( "wcstoumax Testcases...." );<br>
+  puts( "Generating Status" );<br>
+  status2 = wcstoumax( nptr2, &endptr2, base );<br>
+  <br>
+  rtems_test_assert( status2 != 0); <br>
+  rtems_test_assert( base != EINVAL);<br>
+<br>
+  puts( "Checking Garbage end of endptr" );  <br>
+  rtems_test_assert( *endptr2 != '\0' );<br>
+  <br>
+  puts( "Checking Overflow Case" );<br>
+  rtems_test_assert( status2 <= UINTMAX_MAX );<br>
+  <br>
+  printf( "status = %ju \n", status2 );<br>
+  <br>
+ <br>
+  TEST_END();<br>
+  rtems_test_exit(0);<br>
+<br>
+}<br>
+<br>
+/* NOTICE: the clock driver is explicitly disabled */<br>
+<br>
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER<br>
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>
+<br>
+#define CONFIGURE_MAXIMUM_TASKS            1<br>
+<br>
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE<br>
+<br>
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION<br>
+<br>
+#define CONFIGURE_INIT<br>
+#include <rtems/confdefs.h><br>
diff --git a/testsuites/psxtests/psxinttypes01/psxinttypes01.scn b/testsuites/psxtests/psxinttypes01/psxinttypes01.scn<br>
new file mode 100644<br>
index 0000000..72640b4<br>
--- /dev/null<br>
+++ b/testsuites/psxtests/psxinttypes01/psxinttypes01.scn<br>
@@ -0,0 +1,28 @@<br>
+*** BEGIN OF TEST PSXINTTYPE 01 ***<br>
+Checking invalid base value<br>
+Strtoimax Testcases....<br>
+Generating Status<br>
+Checking Garbage end of endptr<br>
+Checking Underflow Case<br>
+Checking Overflow Case<br>
+status = 123 <br>
+Strtoumax Testcases....<br>
+Generating Status<br>
+Checking Garbage end of endptr<br>
+Checking Overflow Case<br>
+status = 123 <br>
+Wcstoimax Testcases....<br>
+Generating Status<br>
+Checking Garbage end of endptr<br>
+Checking Underflow Case<br>
+Checking Overflow Case<br>
+status = -123 <br>
+wcstoumax Testcases....<br>
+Generating Status<br>
+Checking Garbage end of endptr<br>
+Checking Overflow Case<br>
+status = 18446744073709551493 <br>
+<br>
+*** END OF TEST PSXINTTYPE 01 ***<br>
+<br>
+<br>
-- <br>
2.7.4<br>
<br>
</blockquote></div>