change log for rtems (2010-06-28)

rtems-vc at rtems.org rtems-vc at rtems.org
Mon Jun 28 14:17:37 UTC 2010


 *joel*:
2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>

	* malloc02/Makefile.am, malloc03/Makefile.am: Tests do not need spin.c

M  1.189  testsuites/libtests/ChangeLog
M    1.2  testsuites/libtests/malloc02/Makefile.am
M    1.2  testsuites/libtests/malloc03/Makefile.am

diff -u rtems/testsuites/libtests/ChangeLog:1.188 rtems/testsuites/libtests/ChangeLog:1.189
--- rtems/testsuites/libtests/ChangeLog:1.188	Fri Jun 25 11:52:23 2010
+++ rtems/testsuites/libtests/ChangeLog	Mon Jun 28 08:23:27 2010
@@ -1,3 +1,7 @@
+2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* malloc02/Makefile.am, malloc03/Makefile.am: Tests do not need spin.c
+
 2010-06-25	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* termios03/.cvsignore, termios03/Makefile.am, termios03/init.c,

diff -u rtems/testsuites/libtests/malloc02/Makefile.am:1.1 rtems/testsuites/libtests/malloc02/Makefile.am:1.2
--- rtems/testsuites/libtests/malloc02/Makefile.am:1.1	Mon Jun 21 15:05:45 2010
+++ rtems/testsuites/libtests/malloc02/Makefile.am	Mon Jun 28 08:23:27 2010
@@ -5,7 +5,7 @@
 MANAGERS = all
 
 rtems_tests_PROGRAMS = malloc02
-malloc02_SOURCES = init.c ../../support/src/spin.c
+malloc02_SOURCES = init.c
 
 dist_rtems_tests_DATA = malloc02.scn
 dist_rtems_tests_DATA += malloc02.doc

diff -u rtems/testsuites/libtests/malloc03/Makefile.am:1.1 rtems/testsuites/libtests/malloc03/Makefile.am:1.2
--- rtems/testsuites/libtests/malloc03/Makefile.am:1.1	Tue Jun 22 14:27:12 2010
+++ rtems/testsuites/libtests/malloc03/Makefile.am	Mon Jun 28 08:23:27 2010
@@ -5,7 +5,7 @@
 MANAGERS = all
 
 rtems_tests_PROGRAMS = malloc03
-malloc03_SOURCES = init.c ../../support/src/spin.c
+malloc03_SOURCES = init.c
 
 dist_rtems_tests_DATA = malloc03.scn
 dist_rtems_tests_DATA += malloc03.doc


 *joel*:
2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>

	* sp70/Makefile.am: Tests do not need spin.c

M  1.385  testsuites/sptests/ChangeLog
M    1.2  testsuites/sptests/sp70/Makefile.am

diff -u rtems/testsuites/sptests/ChangeLog:1.384 rtems/testsuites/sptests/ChangeLog:1.385
--- rtems/testsuites/sptests/ChangeLog:1.384	Thu Jun 24 14:46:40 2010
+++ rtems/testsuites/sptests/ChangeLog	Mon Jun 28 08:24:25 2010
@@ -1,3 +1,7 @@
+2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* sp70/Makefile.am: Tests do not need spin.c
+
 2010-06-24	Bharath Suri <bharath.s.jois at gmail.com>
 
 	* Makefile.am, configure.ac: Removed some fifo tests.

diff -u rtems/testsuites/sptests/sp70/Makefile.am:1.1 rtems/testsuites/sptests/sp70/Makefile.am:1.2
--- rtems/testsuites/sptests/sp70/Makefile.am:1.1	Sat Jun 19 11:01:27 2010
+++ rtems/testsuites/sptests/sp70/Makefile.am	Mon Jun 28 08:24:25 2010
@@ -5,7 +5,7 @@
 MANAGERS = all
 
 rtems_tests_PROGRAMS = sp70
-sp70_SOURCES = init.c ../../support/src/spin.c
+sp70_SOURCES = init.c
 
 dist_rtems_tests_DATA = sp70.scn
 dist_rtems_tests_DATA += sp70.doc


 *joel*:
2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>

	* termios03/init.c, termios03/termios03.doc, termios03/termios03.scn,
	termios03/termios_testdriver_polled.c,
	termios03/termios_testdriver_polled.h: Add more test cases.

M  1.190  testsuites/libtests/ChangeLog
M    1.2  testsuites/libtests/termios03/init.c
M    1.2  testsuites/libtests/termios03/termios03.doc
M    1.2  testsuites/libtests/termios03/termios03.scn
M    1.2  testsuites/libtests/termios03/termios_testdriver_polled.h
M    1.2  testsuites/libtests/termios03/termios_testdriver_polled.c

diff -u rtems/testsuites/libtests/ChangeLog:1.189 rtems/testsuites/libtests/ChangeLog:1.190
--- rtems/testsuites/libtests/ChangeLog:1.189	Mon Jun 28 08:23:27 2010
+++ rtems/testsuites/libtests/ChangeLog	Mon Jun 28 08:42:25 2010
@@ -1,5 +1,11 @@
 2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>
 
+	* termios03/init.c, termios03/termios03.doc, termios03/termios03.scn,
+	termios03/termios_testdriver_polled.c,
+	termios03/termios_testdriver_polled.h: Add more test cases.
+
+2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>
+
 	* malloc02/Makefile.am, malloc03/Makefile.am: Tests do not need spin.c
 
 2010-06-25	Joel Sherrill <joel.sherrill at oarcorp.com>

diff -u rtems/testsuites/libtests/termios03/init.c:1.1 rtems/testsuites/libtests/termios03/init.c:1.2
--- rtems/testsuites/libtests/termios03/init.c:1.1	Fri Jun 25 11:52:26 2010
+++ rtems/testsuites/libtests/termios03/init.c	Mon Jun 28 08:42:25 2010
@@ -17,37 +17,115 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <termios.h>
+#include <rtems/dumpbuf.h>
 
 void write_helper(
   int        fd,
   const char *c
 )
 {
-  size_t len;
-  int    rc;
+  size_t   len;
+  int      rc;
   
   len = strlen( c );
+  printf( "Writing: %s", c );
+
   rc = write( fd, c, len );
   rtems_test_assert( rc == len );
+
+  termios_test_driver_dump_tx("Transmitted");
 }
-rtems_task Init(
-  rtems_task_argument argument
+
+uint8_t read_helper_buffer[256];
+
+void read_helper(
+  int         fd,
+  const char *expected
 )
 {
-  int  fd;
-  int  rc;
+  int    rc;
+  size_t len;
 
-  puts( "\n\n*** TEST TERMIOS03 ***" );
+  len = strlen( expected );
+
+  termios_test_driver_set_rx( expected, len );
+  printf( "\nReading (expected):\n" );
+  rtems_print_buffer( (unsigned char *)expected, len-1 );
+
+  rc = read( fd, read_helper_buffer, sizeof(read_helper_buffer) );
+  rtems_test_assert( rc != -1 );
+
+  printf( "Read %d bytes from read(2)\n", rc );
+  rtems_print_buffer( read_helper_buffer, rc );
+
+  termios_test_driver_dump_tx("Echoed");
+}
+
+int Test_fd;
 
+void open_it(void)
+{
+  /* open the file */
   puts( "open(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
-  fd = open( TERMIOS_TEST_DRIVER_DEVICE_NAME, O_RDWR );
-  rtems_test_assert( fd != -1 );
+  Test_fd = open( TERMIOS_TEST_DRIVER_DEVICE_NAME, O_RDWR );
+  rtems_test_assert( Test_fd != -1 );
+}
 
-  write_helper( fd, "This is a test\n" );
+void close_it(void)
+{
+  int rc;
 
   puts( "close(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
-  rc = close( fd );
+  rc = close( Test_fd );
   rtems_test_assert( rc == 0 );
+}
+
+void change_iflag( const char *desc, int mask, int new )
+{
+  int            rc;
+  struct termios attr;
+
+  printf( "Changing c_iflag to: %s\n", desc );
+  rc = tcgetattr( Test_fd, &attr );
+  rtems_test_assert( rc == 0 );
+
+  attr.c_iflag &= ~mask;
+  attr.c_iflag |= new;
+
+  rc = tcsetattr( Test_fd, TCSANOW, &attr );
+  rtems_test_assert( rc == 0 );
+}
+
+const char ExpectedOutput_1[] = "This is test output.\n";
+const char ExpectedInput_1[] = "Test input this is.\n";
+const char ExpectedInput_2[] = "1235\b456.\n";
+const char ExpectedInput_3[] = "tab\ttab.\n";
+const char ExpectedInput_4[] = "cr\r.";
+const char ExpectedInput_5[] = "aBcDeFgH.\n";
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  puts( "\n\n*** TEST TERMIOS03 ***" );
+
+  open_it();
+
+  /* some basic cases */
+  write_helper( Test_fd, ExpectedOutput_1 );
+  read_helper( Test_fd, ExpectedInput_1 );
+  read_helper( Test_fd, ExpectedInput_2 );
+  read_helper( Test_fd, ExpectedInput_3 );
+  read_helper( Test_fd, ExpectedInput_4 );
+
+  /* test to lower case input mapping */
+  read_helper( Test_fd, ExpectedInput_5 );
+  change_iflag( "Enable to lower case mapping on input", IUCLC, IUCLC );
+  read_helper( Test_fd, ExpectedInput_5 );
+  change_iflag( "Disable to lower case mapping on input", IUCLC, 0 );
+
+  close_it();
 
   puts( "*** END OF TEST TERMIOS03 ***" );
 

diff -u rtems/testsuites/libtests/termios03/termios03.doc:1.1 rtems/testsuites/libtests/termios03/termios03.doc:1.2
--- rtems/testsuites/libtests/termios03/termios03.doc:1.1	Fri Jun 25 11:52:26 2010
+++ rtems/testsuites/libtests/termios03/termios03.doc	Mon Jun 28 08:42:25 2010
@@ -15,8 +15,10 @@
 
 directives:
 
-  + various termios services
+  + termios services for polled mode
+  + termios canonical input and output processing options
 
 concepts:
 
 + exercise termios polled support for input and output
++ exercise canonical IO processing options 

diff -u rtems/testsuites/libtests/termios03/termios03.scn:1.1 rtems/testsuites/libtests/termios03/termios03.scn:1.2
--- rtems/testsuites/libtests/termios03/termios03.scn:1.1	Fri Jun 25 11:52:26 2010
+++ rtems/testsuites/libtests/termios03/termios03.scn	Mon Jun 28 08:42:25 2010
@@ -1 +1,55 @@
-XXX fill in with test output
+*** TEST TERMIOS03 ***
+open(/dev/test) - OK
+Writing: This is test output.
+Transmitted 22 characters
+54 68 69 73 20 69 73 20 74 65 73 74 20 6f 75 74 |This is test out|
+70 75 74 2e 0d 0a                               |put...          |
+
+Reading (expected):
+54 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
+69 73 2e                                        |is.             |
+Read 20 bytes from read(2)
+54 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
+69 73 2e 0a                                     |is..            |
+Echoed 21 characters
+54 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
+69 73 2e 0d 0a                                  |is...           |
+
+Reading (expected):
+31 32 33 35 08 34 35 36 2e                      |1235.456.       |
+Read 10 bytes from read(2)
+31 32 33 35 08 34 35 36 2e 0a                   |1235.456..      |
+Echoed 12 characters
+31 32 33 35 5e 48 34 35 36 2e 0d 0a             |1235^H456...    |
+
+Reading (expected):
+74 61 62 09 74 61 62 2e                         |tab.tab.        |
+Read 9 bytes from read(2)
+74 61 62 09 74 61 62 2e 0a                      |tab.tab..       |
+Echoed 14 characters
+74 61 62 20 20 20 20 20 74 61 62 2e 0d 0a       |tab     tab...  |
+
+Reading (expected):
+63 72 0d                                        |cr.             |
+Read 3 bytes from read(2)
+63 72 0a                                        |cr.             |
+Echoed 4 characters
+63 72 0d 0a                                     |cr..            |
+
+Reading (expected):
+61 42 63 44 65 46 67 48 2e                      |aBcDeFgH.       |
+Read 10 bytes from read(2)
+61 42 63 44 65 46 67 48 2e 0a                   |aBcDeFgH..      |
+Echoed 11 characters
+61 42 63 44 65 46 67 48 2e 0d 0a                |aBcDeFgH...     |
+Changing c_iflag to: Enable to lower case mapping on input
+
+Reading (expected):
+61 42 63 44 65 46 67 48 2e                      |aBcDeFgH.       |
+Read 10 bytes from read(2)
+61 62 63 64 65 66 67 68 2e 0a                   |abcdefgh..      |
+Echoed 11 characters
+61 62 63 64 65 66 67 68 2e 0d 0a                |abcdefgh...     |
+Changing c_iflag to: Disable to lower case mapping on input
+close(/dev/test) - OK 
+*** END OF TEST TERMIOS03 ***

diff -u rtems/testsuites/libtests/termios03/termios_testdriver_polled.h:1.1 rtems/testsuites/libtests/termios03/termios_testdriver_polled.h:1.2
--- rtems/testsuites/libtests/termios03/termios_testdriver_polled.h:1.1	Fri Jun 25 11:52:26 2010
+++ rtems/testsuites/libtests/termios03/termios_testdriver_polled.h	Mon Jun 28 08:42:25 2010
@@ -20,6 +20,13 @@
 extern "C" {
 #endif
 
+void termios_test_driver_set_rx(
+  const void *p,
+  size_t      len
+);
+
+void termios_test_driver_dump_tx(const char *c);
+
 /**
  *  This macro defines the standard name for the Termios Test device
  *  that is available to applications.

diff -u rtems/testsuites/libtests/termios03/termios_testdriver_polled.c:1.1 rtems/testsuites/libtests/termios03/termios_testdriver_polled.c:1.2
--- rtems/testsuites/libtests/termios03/termios_testdriver_polled.c:1.1	Fri Jun 25 11:52:26 2010
+++ rtems/testsuites/libtests/termios03/termios_testdriver_polled.c	Mon Jun 28 08:42:25 2010
@@ -16,12 +16,44 @@
 #include <stdlib.h>
 #include <termios.h>
 #include <rtems/termiostypes.h>
+#include <rtems/dumpbuf.h>
 #include "termios_testdriver_polled.h"
-#include <unistd.h>
+
+#define TX_MAX 1024
+uint8_t Tx_Buffer[TX_MAX];
+int     Tx_Index = 0;
+
+void termios_test_driver_dump_tx(const char *c)
+{
+  printf( "%s %d characters\n", c, Tx_Index );
+  rtems_print_buffer( Tx_Buffer, Tx_Index );
+  Tx_Index = 0;
+}
+  
+const uint8_t *Rx_Buffer;
+int            Rx_Index;
+int            Rx_Length;
+bool           Rx_FirstTime = true;
+
+void termios_test_driver_set_rx(
+  const void *p,
+  size_t      len
+)
+{
+  Rx_Buffer = p;
+  Rx_Length = len;
+  Rx_Index  = 0;
+}
 
 int termios_test_driver_inbyte_nonblocking( int port )
 {
-  return -1;
+  if ( Rx_FirstTime == true ) {
+    Rx_FirstTime = false;
+    return -1;
+  }
+  if ( Rx_Index >= Rx_Length )
+    return -1;
+  return Rx_Buffer[ Rx_Index++ ];
 }
 
 void termios_test_driver_outbyte_polled(
@@ -29,7 +61,7 @@
   char ch
 )
 {
-  write( 2, &ch, 1 );
+  Tx_Buffer[Tx_Index++] = (uint8_t) ch;
 }
 
 ssize_t termios_test_driver_write_support (int minor, const char *buf, size_t len)


 *joel*:
2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>

	* sp69/Makefile.am, sp71/Makefile.am, spfifo02/Makefile.am: Tests do
	not need spin.c

M  1.386  testsuites/sptests/ChangeLog
M    1.2  testsuites/sptests/sp69/Makefile.am
M    1.2  testsuites/sptests/sp71/Makefile.am
M    1.4  testsuites/sptests/spfifo02/Makefile.am

diff -u rtems/testsuites/sptests/ChangeLog:1.385 rtems/testsuites/sptests/ChangeLog:1.386
--- rtems/testsuites/sptests/ChangeLog:1.385	Mon Jun 28 08:24:25 2010
+++ rtems/testsuites/sptests/ChangeLog	Mon Jun 28 08:51:04 2010
@@ -1,5 +1,10 @@
 2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>
 
+	* sp69/Makefile.am, sp71/Makefile.am, spfifo02/Makefile.am: Tests do
+	not need spin.c
+
+2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>
+
 	* sp70/Makefile.am: Tests do not need spin.c
 
 2010-06-24	Bharath Suri <bharath.s.jois at gmail.com>

diff -u rtems/testsuites/sptests/sp69/Makefile.am:1.1 rtems/testsuites/sptests/sp69/Makefile.am:1.2
--- rtems/testsuites/sptests/sp69/Makefile.am:1.1	Tue Dec  8 17:07:38 2009
+++ rtems/testsuites/sptests/sp69/Makefile.am	Mon Jun 28 08:51:04 2010
@@ -5,7 +5,7 @@
 MANAGERS = all
 
 rtems_tests_PROGRAMS = sp69
-sp69_SOURCES = init.c ../../support/src/spin.c
+sp69_SOURCES = init.c
 
 dist_rtems_tests_DATA = sp69.scn
 dist_rtems_tests_DATA += sp69.doc

diff -u rtems/testsuites/sptests/sp71/Makefile.am:1.1 rtems/testsuites/sptests/sp71/Makefile.am:1.2
--- rtems/testsuites/sptests/sp71/Makefile.am:1.1	Tue Jun 22 11:14:43 2010
+++ rtems/testsuites/sptests/sp71/Makefile.am	Mon Jun 28 08:51:04 2010
@@ -5,7 +5,7 @@
 MANAGERS = all
 
 rtems_tests_PROGRAMS = sp71
-sp71_SOURCES = init.c ../../support/src/spin.c
+sp71_SOURCES = init.c
 
 dist_rtems_tests_DATA = sp71.scn
 dist_rtems_tests_DATA += sp71.doc

diff -u rtems/testsuites/sptests/spfifo02/Makefile.am:1.3 rtems/testsuites/sptests/spfifo02/Makefile.am:1.4
--- rtems/testsuites/sptests/spfifo02/Makefile.am:1.3	Thu Jun 24 14:46:40 2010
+++ rtems/testsuites/sptests/spfifo02/Makefile.am	Mon Jun 28 08:51:05 2010
@@ -5,7 +5,7 @@
 MANAGERS = all
 
 rtems_tests_PROGRAMS = spfifo02
-spfifo02_SOURCES = init.c ../../support/src/spin.c
+spfifo02_SOURCES = init.c
 
 dist_rtems_tests_DATA = spfifo02.scn
 dist_rtems_tests_DATA += spfifo02.doc


 *joel*:
2010-06-26	Bharath Suri <bharath.s.jois at gmail.com>

	PR 1592/testing
	* Makefile.am, configure.ac: Changes to incorporate sperror01,
	sperror02, sperror03
	* sperror01/init.c, sperror02/init.c: New tests to exercise
	rtems_error routine
	* sperror03/init.c: New test to exercise rtems_panic routine

M  1.387  testsuites/sptests/ChangeLog
M   1.93  testsuites/sptests/Makefile.am
M   1.98  testsuites/sptests/configure.ac
A    1.1  testsuites/sptests/sperror01/.cvsignore
A    1.1  testsuites/sptests/sperror01/Makefile.am
A    1.1  testsuites/sptests/sperror01/init.c
A    1.1  testsuites/sptests/sperror01/sperror01.doc
A    1.1  testsuites/sptests/sperror01/sperror01.scn
A    1.1  testsuites/sptests/sperror02/.cvsignore
A    1.1  testsuites/sptests/sperror02/Makefile.am
A    1.1  testsuites/sptests/sperror02/init.c
A    1.1  testsuites/sptests/sperror02/sperror02.doc
A    1.1  testsuites/sptests/sperror02/sperror02.scn
A    1.1  testsuites/sptests/sperror03/.cvsignore
A    1.1  testsuites/sptests/sperror03/Makefile.am
A    1.1  testsuites/sptests/sperror03/init.c
A    1.1  testsuites/sptests/sperror03/sperror03.doc
A    1.1  testsuites/sptests/sperror03/sperror03.scn

diff -u rtems/testsuites/sptests/ChangeLog:1.386 rtems/testsuites/sptests/ChangeLog:1.387
--- rtems/testsuites/sptests/ChangeLog:1.386	Mon Jun 28 08:51:04 2010
+++ rtems/testsuites/sptests/ChangeLog	Mon Jun 28 09:03:44 2010
@@ -1,3 +1,12 @@
+2010-06-26	Bharath Suri <bharath.s.jois at gmail.com>
+
+	PR 1592/testing
+	* Makefile.am, configure.ac: Changes to incorporate sperror01,
+	sperror02, sperror03
+	* sperror01/init.c, sperror02/init.c: New tests to exercise
+	rtems_error routine
+	* sperror03/init.c: New test to exercise rtems_panic routine
+
 2010-06-28	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* sp69/Makefile.am, sp71/Makefile.am, spfifo02/Makefile.am: Tests do

diff -u rtems/testsuites/sptests/Makefile.am:1.92 rtems/testsuites/sptests/Makefile.am:1.93
--- rtems/testsuites/sptests/Makefile.am:1.92	Thu Jun 24 14:46:40 2010
+++ rtems/testsuites/sptests/Makefile.am	Mon Jun 28 09:03:45 2010
@@ -17,6 +17,7 @@
     sp70 sp71 \
     spchain spclockget spcoverage spobjgetnext spnotepad01 spprintk spsize \
     spstkalloc spthreadq01 spwatchdog spwkspace \
+    sperror01 sperror02 sperror03 \
     spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
     spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
     spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 \

diff -u rtems/testsuites/sptests/configure.ac:1.97 rtems/testsuites/sptests/configure.ac:1.98
--- rtems/testsuites/sptests/configure.ac:1.97	Thu Jun 24 14:46:40 2010
+++ rtems/testsuites/sptests/configure.ac	Mon Jun 28 09:03:45 2010
@@ -100,6 +100,9 @@
 spchain/Makefile
 spclockget/Makefile
 spcoverage/Makefile
+sperror01/Makefile
+sperror02/Makefile
+sperror03/Makefile
 spfatal01/Makefile
 spfatal02/Makefile
 spfatal03/Makefile

diff -u /dev/null rtems/testsuites/sptests/sperror01/.cvsignore:1.1
--- /dev/null	Mon Jun 28 09:17:36 2010
+++ rtems/testsuites/sptests/sperror01/.cvsignore	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/sptests/sperror01/Makefile.am:1.1
--- /dev/null	Mon Jun 28 09:17:36 2010
+++ rtems/testsuites/sptests/sperror01/Makefile.am	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,26 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = sperror01
+sperror01_SOURCES = init.c
+
+dist_rtems_tests_DATA = sperror01.scn
+dist_rtems_tests_DATA += sperror01.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(sperror01_OBJECTS) $(sperror01_LDADD)
+LINK_LIBS = $(sperror01_LDLIBS)
+
+sperror01$(EXEEXT): $(sperror01_OBJECTS) $(sperror01_DEPENDENCIES)
+	@rm -f sperror01$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/sptests/sperror01/init.c:1.1
--- /dev/null	Mon Jun 28 09:17:36 2010
+++ rtems/testsuites/sptests/sperror01/init.c	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,54 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#include <tmacros.h>
+#include "test_support.h"
+#include "rtems/error.h"
+#include <errno.h>
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  puts( "\n\n*** TEST Tests for error reporting routines - 01 ***" );
+
+  errno = -1;
+  rtems_error(RTEMS_ERROR_ERRNO, "Dummy: Resources unavailable");
+
+  errno = ENOMEM;
+  rtems_error(
+    RTEMS_NO_MEMORY | RTEMS_ERROR_ERRNO,
+    "Dummy: Resources unavailable"
+  );
+
+  puts( "Dummy: causing panic.. will print test end message, then..." );
+  puts( "       print various error messages" );
+  rtems_error(
+    RTEMS_NO_MEMORY | RTEMS_ERROR_PANIC,
+    "Dummy: Resources unavailable\n"
+    "*** END OF TEST Tests for error reporting routines - 01 ***\n"
+  );
+  
+  rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS             1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */

diff -u /dev/null rtems/testsuites/sptests/sperror01/sperror01.doc:1.1
--- /dev/null	Mon Jun 28 09:17:36 2010
+++ rtems/testsuites/sptests/sperror01/sperror01.doc	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,25 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  sperror01
+
+directives:
+
++ rtems_error
+
+concepts:
+
++ Invoke rtems_error with an unknown errno
++ Invoke rtems_error with a known errno
++ Invoke rtems_error with a known errno, with panic
+

diff -u /dev/null rtems/testsuites/sptests/sperror01/sperror01.scn:1.1
--- /dev/null	Mon Jun 28 09:17:36 2010
+++ rtems/testsuites/sptests/sperror01/sperror01.scn	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,9 @@
+*** TEST Tests for error reporting routines - 01 ***
+Dummy: Resources unavailable (unknown errno=-1)
+Dummy: Resources unavailable (status: could not get enough memory) (errno: Not enough space)
+Dummy: causing panic.. will print test end message, then...
+       print various error messages
+Dummy: Resources unavailable
+*** END OF TEST Tests for error reporting routines - 01 ***
+ (status: could not get enough memory)
+fatal error, exiting

diff -u /dev/null rtems/testsuites/sptests/sperror02/.cvsignore:1.1
--- /dev/null	Mon Jun 28 09:17:36 2010
+++ rtems/testsuites/sptests/sperror02/.cvsignore	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/sptests/sperror02/Makefile.am:1.1
--- /dev/null	Mon Jun 28 09:17:36 2010
+++ rtems/testsuites/sptests/sperror02/Makefile.am	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,26 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = sperror02
+sperror02_SOURCES = init.c
+
+dist_rtems_tests_DATA = sperror02.scn
+dist_rtems_tests_DATA += sperror02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(sperror02_OBJECTS) $(sperror02_LDADD)
+LINK_LIBS = $(sperror02_LDLIBS)
+
+sperror02$(EXEEXT): $(sperror02_OBJECTS) $(sperror02_DEPENDENCIES)
+	@rm -f sperror02$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/sptests/sperror02/init.c:1.1
--- /dev/null	Mon Jun 28 09:17:37 2010
+++ rtems/testsuites/sptests/sperror02/init.c	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,45 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#include <tmacros.h>
+#include "test_support.h"
+#include <errno.h>
+#include <rtems/error.h>
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  puts( "\n\n*** TEST Tests for error reporting routines - 02 ***" );
+
+  errno = ENOMEM;
+  rtems_error(
+    RTEMS_NO_MEMORY | RTEMS_ERROR_ABORT, 
+    "Dummy: Resources unavailable\n"
+    "*** END OF TEST Tests for error reporting routines - 02 ***\n"
+  );
+  
+
+  rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS             1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */

diff -u /dev/null rtems/testsuites/sptests/sperror02/sperror02.doc:1.1
--- /dev/null	Mon Jun 28 09:17:37 2010
+++ rtems/testsuites/sptests/sperror02/sperror02.doc	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,22 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  sperror02
+
+directives:
+
++ rtems_error
+
+concepts:
+
++ Invoke rtems_error with a known errno, with error flag as RTEMS_ERROR_ABORT

diff -u /dev/null rtems/testsuites/sptests/sperror02/sperror02.scn:1.1
--- /dev/null	Mon Jun 28 09:17:37 2010
+++ rtems/testsuites/sptests/sperror02/sperror02.scn	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,5 @@
+*** TEST Tests for error reporting routines - 02 ***
+Dummy: Resources unavailable
+*** END OF TEST Tests for error reporting routines - 02 ***
+ (status: could not get enough memory)
+fatal error, aborting

diff -u /dev/null rtems/testsuites/sptests/sperror03/.cvsignore:1.1
--- /dev/null	Mon Jun 28 09:17:37 2010
+++ rtems/testsuites/sptests/sperror03/.cvsignore	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/sptests/sperror03/Makefile.am:1.1
--- /dev/null	Mon Jun 28 09:17:37 2010
+++ rtems/testsuites/sptests/sperror03/Makefile.am	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,26 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = sperror03
+sperror03_SOURCES = init.c
+
+dist_rtems_tests_DATA = sperror03.scn
+dist_rtems_tests_DATA += sperror03.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(sperror03_OBJECTS) $(sperror03_LDADD)
+LINK_LIBS = $(sperror03_LDLIBS)
+
+sperror03$(EXEEXT): $(sperror03_OBJECTS) $(sperror03_DEPENDENCIES)
+	@rm -f sperror03$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/sptests/sperror03/init.c:1.1
--- /dev/null	Mon Jun 28 09:17:37 2010
+++ rtems/testsuites/sptests/sperror03/init.c	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,41 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#include <tmacros.h>
+#include "test_support.h"
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  puts( "\n\n*** TEST Tests for error reporting routines - 03 ***" );
+
+  rtems_panic(
+    "Dummy panic\n"
+    "*** END OF TEST Tests for error reporting routines - 03 ***\n"
+  );
+  
+
+  rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS             1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */

diff -u /dev/null rtems/testsuites/sptests/sperror03/sperror03.doc:1.1
--- /dev/null	Mon Jun 28 09:17:37 2010
+++ rtems/testsuites/sptests/sperror03/sperror03.doc	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,22 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  sperror03
+
+directives:
+
++ rtems_panic
+
+concepts:
+
++ Exercise rtems_panic

diff -u /dev/null rtems/testsuites/sptests/sperror03/sperror03.scn:1.1
--- /dev/null	Mon Jun 28 09:17:37 2010
+++ rtems/testsuites/sptests/sperror03/sperror03.scn	Mon Jun 28 09:03:45 2010
@@ -0,0 +1,5 @@
+*** TEST Tests for error reporting routines - 03 ***
+Dummy panic
+*** END OF TEST Tests for error reporting routines - 03 ***
+
+fatal error, exiting



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100628/5161803a/attachment.html>


More information about the vc mailing list