<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-07-19)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* stringto01/init.c, stringto01/stringto01.scn,
stringto01/stringto_test_template.h: Attempt to pick up a few more
error paths.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.207&r2=text&tr2=1.208&diff_format=h">M</a></td><td width='1%'>1.208</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/stringto01/init.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/libtests/stringto01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/stringto01/stringto01.scn.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/libtests/stringto01/stringto01.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/stringto01/stringto_test_template.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/libtests/stringto01/stringto_test_template.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.207 rtems/testsuites/libtests/ChangeLog:1.208
--- rtems/testsuites/libtests/ChangeLog:1.207 Thu Jul 15 08:54:54 2010
+++ rtems/testsuites/libtests/ChangeLog Mon Jul 19 08:10:48 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * stringto01/init.c, stringto01/stringto01.scn,
+ stringto01/stringto_test_template.h: Attempt to pick up a few more
+ error paths.
+
</font> 2010-07-15 Bharath Suri <bharath.s.jois@gmail.com>
PR 1617/testing
<font color='#006600'>diff -u rtems/testsuites/libtests/stringto01/init.c:1.2 rtems/testsuites/libtests/stringto01/init.c:1.3
--- rtems/testsuites/libtests/stringto01/init.c:1.2 Tue Dec 8 11:52:49 2009
+++ rtems/testsuites/libtests/stringto01/init.c Mon Jul 19 08:10:48 2010
</font><font color='#997700'>@@ -11,9 +11,14 @@
</font>
#include "tmacros.h"
#include <rtems/stringto.h>
<font color='#000088'>+#include <limits.h>
+#include <math.h>
</font>
#include <stdio.h>
<font color='#000088'>+#define __STRING(x) #x /* stringify without expanding x */
+#define __XSTRING(x) __STRING(x) /* expand x, then stringify */
+
</font> /* Test pointer conversions */
#define TEST_STRING_TO_TYPE void *
#define TEST_STRING_TO_NAME test_rtems_string_to_pointer
<font color='#997700'>@@ -33,6 +38,8 @@
</font>
/* Test integer conversions */
#define TEST_STRING_TO_TYPE int
<font color='#000088'>+#define STRING_TO_MAX LONG_MAX
+#define STRING_TO_MAX_STRING __XSTRING(LONG_MAX)
</font> #define TEST_STRING_TO_NAME test_rtems_string_to_int
#define STRING_TO_NAME_METHOD rtems_string_to_int
#define STRING_TO_NAME_METHOD_STRING "rtems_string_to_int"
<font color='#997700'>@@ -51,6 +58,8 @@
</font>
/* Test long conversions */
#define TEST_STRING_TO_TYPE long
<font color='#000088'>+#define STRING_TO_MAX LONG_MAX
+#define STRING_TO_MAX_STRING __XSTRING(LONG_MAX)
</font> #define TEST_STRING_TO_NAME test_rtems_string_to_long
#define STRING_TO_NAME_METHOD rtems_string_to_long
#define STRING_TO_NAME_METHOD_STRING "rtems_string_to_long"
<font color='#997700'>@@ -70,6 +79,8 @@
</font>
/* Test long long conversions */
#define TEST_STRING_TO_TYPE long long
<font color='#000088'>+#define STRING_TO_MAX LONG_LONG_MAX
+#define STRING_TO_MAX_STRING __XSTRING(LONG_LONG_MAX)
</font> #define TEST_STRING_TO_NAME test_rtems_string_to_long_long
#define STRING_TO_NAME_METHOD rtems_string_to_long_long
#define STRING_TO_NAME_METHOD_STRING "rtems_string_to_long_long"
<font color='#006600'>diff -u rtems/testsuites/libtests/stringto01/stringto01.scn:1.1 rtems/testsuites/libtests/stringto01/stringto01.scn:1.2
--- rtems/testsuites/libtests/stringto01/stringto01.scn:1.1 Tue Dec 1 16:10:33 2009
+++ rtems/testsuites/libtests/stringto01/stringto01.scn Mon Jul 19 08:10:48 2010
</font><font color='#997700'>@@ -17,6 +17,7 @@
</font> Testing rtems_string_to_int
rtems_string_to_int - NULL return value - RTEMS_INVALID_ADDRESS
rtems_string_to_int - 123 NULL endptr return value - RTEMS_SUCCESSFUL
<font color='#000088'>+rtems_string_to_int - MAXIMUM VALUE w/endptr return value - RTEMS_SUCCESSFUL
</font> rtems_string_to_int - 123 w/endptr return value - RTEMS_SUCCESSFUL
rtems_string_to_int - YYY w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_int - empty string - w/endptr return value - RTEMS_NOT_DEFINED
<font color='#997700'>@@ -33,6 +34,7 @@
</font> Testing rtems_string_to_long
rtems_string_to_long - NULL return value - RTEMS_INVALID_ADDRESS
rtems_string_to_long - 123 NULL endptr return value - RTEMS_SUCCESSFUL
<font color='#000088'>+rtems_string_to_long - MAXIMUM VALUE w/endptr return value - RTEMS_SUCCESSFUL
</font> rtems_string_to_long - 123 w/endptr return value - RTEMS_SUCCESSFUL
rtems_string_to_long - YYY w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_long - empty string - w/endptr return value - RTEMS_NOT_DEFINED
<font color='#997700'>@@ -50,6 +52,7 @@
</font> Testing rtems_string_to_long_long
rtems_string_to_long_long - NULL return value - RTEMS_INVALID_ADDRESS
rtems_string_to_long_long - 123 NULL endptr return value - RTEMS_SUCCESSFUL
<font color='#000088'>+rtems_string_to_long_long - MAXIMUM VALUE w/endptr return value - RTEMS_SUCCESSFUL
</font> rtems_string_to_long_long - 123 w/endptr return value - RTEMS_SUCCESSFUL
rtems_string_to_long_long - YYY w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_long_long - empty string - w/endptr return value - RTEMS_NOT_DEFINED
<font color='#006600'>diff -u rtems/testsuites/libtests/stringto01/stringto_test_template.h:1.2 rtems/testsuites/libtests/stringto01/stringto_test_template.h:1.3
--- rtems/testsuites/libtests/stringto01/stringto_test_template.h:1.2 Tue Dec 8 11:52:49 2009
+++ rtems/testsuites/libtests/stringto01/stringto_test_template.h Mon Jul 19 08:10:48 2010
</font><font color='#997700'>@@ -58,6 +58,24 @@
</font> rtems_test_assert( status == RTEMS_SUCCESSFUL );
rtems_test_assert( value == (TEST_STRING_TO_TYPE)GOOD_VALUE );
<font color='#000088'>+ #if defined(STRING_TO_MAX)
+ /* Basic conversion works for return value */
+ endptr = NULL;
+ puts(
+ STRING_TO_NAME_METHOD_STRING " - MAXIMUM VALUE"
+ " w/endptr return value - RTEMS_SUCCESSFUL"
+ );
+ #if defined(STRING_TO_INTEGER)
+ status = STRING_TO_NAME_METHOD(
+ STRING_TO_MAX_STRING, &value, &endptr, 10 );
+ #elif defined(STRING_TO_POINTER) || defined(STRING_TO_FLOAT)
+ status = STRING_TO_NAME_METHOD( STRING_TO_MAX_STRING, &value, &endptr );
+ #endif
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+ rtems_test_assert( endptr );
+ rtems_test_assert( value == (TEST_STRING_TO_TYPE)STRING_TO_MAX );
+ #endif
+
</font> /* Basic conversion works for return value */
endptr = NULL;
puts(
<font color='#997700'>@@ -145,6 +163,8 @@
</font> #undef STRING_TO_INTEGER
#undef STRING_TO_POINTER
#undef STRING_TO_FLOAT
<font color='#000088'>+#undef STRING_TO_MAX
+#undef STRING_TO_MAX_STRING
</font> #undef GOOD_VALUE
#undef GOOD_VALUE_STRING
#undef BAD_VALUE_STRING
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add tar test for error cases.
* tar03/.cvsignore, tar03/Makefile.am, tar03/init.c, tar03/tar03.doc,
tar03/tar03.scn: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.208&r2=text&tr2=1.209&diff_format=h">M</a></td><td width='1%'>1.209</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/Makefile.am.diff?r1=text&tr1=1.39&r2=text&tr2=1.40&diff_format=h">M</a></td><td width='1%'>1.40</td><td width='100%'>testsuites/libtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/configure.ac.diff?r1=text&tr1=1.46&r2=text&tr2=1.47&diff_format=h">M</a></td><td width='1%'>1.47</td><td width='100%'>testsuites/libtests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/tar03/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/tar03/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/tar03/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/tar03/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/tar03/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/tar03/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/tar03/tar03.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/tar03/tar03.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/tar03/tar03.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/tar03/tar03.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.208 rtems/testsuites/libtests/ChangeLog:1.209
--- rtems/testsuites/libtests/ChangeLog:1.208 Mon Jul 19 08:10:48 2010
+++ rtems/testsuites/libtests/ChangeLog Mon Jul 19 08:12:39 2010
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#000088'>+ * Makefile.am, configure.ac: Add tar test for error cases.
+ * tar03/.cvsignore, tar03/Makefile.am, tar03/init.c, tar03/tar03.doc,
+ tar03/tar03.scn: New files.
+
+2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font> * stringto01/init.c, stringto01/stringto01.scn,
stringto01/stringto_test_template.h: Attempt to pick up a few more
error paths.
<font color='#006600'>diff -u rtems/testsuites/libtests/Makefile.am:1.39 rtems/testsuites/libtests/Makefile.am:1.40
--- rtems/testsuites/libtests/Makefile.am:1.39 Wed Jul 14 18:53:49 2010
+++ rtems/testsuites/libtests/Makefile.am Mon Jul 19 08:12:40 2010
</font><font color='#997700'>@@ -11,7 +11,7 @@
</font> putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
termios termios01 termios02 termios03 termios04 termios05 termios06 \
rtems++ tztest block01 block02 block03 block04 block05 block06 block07 \
<font color='#880000'>- block08 block09 block10 stringto01
</font><font color='#000088'>+ block08 block09 block10 stringto01 tar03
</font>
include $(top_srcdir)/../automake/subdirs.am
include $(top_srcdir)/../automake/local.am
<font color='#006600'>diff -u rtems/testsuites/libtests/configure.ac:1.46 rtems/testsuites/libtests/configure.ac:1.47
--- rtems/testsuites/libtests/configure.ac:1.46 Wed Jul 14 18:53:49 2010
+++ rtems/testsuites/libtests/configure.ac Mon Jul 19 08:12:40 2010
</font><font color='#997700'>@@ -61,6 +61,7 @@
</font> stackchk/Makefile
stackchk01/Makefile
stringto01/Makefile
<font color='#000088'>+tar03/Makefile
</font> termios/Makefile
termios01/Makefile
termios02/Makefile
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/tar03/.cvsignore:1.1
--- /dev/null Mon Jul 19 09:10:54 2010
+++ rtems/testsuites/libtests/tar03/.cvsignore Mon Jul 19 08:12:40 2010
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/tar03/Makefile.am:1.1
--- /dev/null Mon Jul 19 09:10:54 2010
+++ rtems/testsuites/libtests/tar03/Makefile.am Mon Jul 19 08:12:40 2010
</font><font color='#997700'>@@ -0,0 +1,26 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = tar03
+tar03_SOURCES = init.c
+
+dist_rtems_tests_DATA = tar03.scn
+dist_rtems_tests_DATA += tar03.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(tar03_OBJECTS) $(tar03_LDADD)
+LINK_LIBS = $(tar03_LDLIBS)
+
+tar03$(EXEEXT): $(tar03_OBJECTS) $(tar03_DEPENDENCIES)
+ @rm -f tar03$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/tar03/init.c:1.1
--- /dev/null Mon Jul 19 09:10:54 2010
+++ rtems/testsuites/libtests/tar03/init.c Mon Jul 19 08:12:40 2010
</font><font color='#997700'>@@ -0,0 +1,62 @@
</font><font color='#000088'>+/*
+ * 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/imfs.h>
+#include <rtems/untar.h>
+#include <rtems/error.h>
+
+void test_tarfs_error(void)
+{
+ int sc;
+
+ puts("Loading tarfs image at non-root - ERROR");
+ sc = rtems_tarfs_load("x",(void *)rtems_task_create, 72);
+ if (sc != -1) {
+ printf ("error: untar failed returned %d\n", sc);
+ rtems_test_exit(1);
+ }
+
+ puts("Loading tarfs image with miniIMFS as root filesystem - ERROR");
+ sc = rtems_tarfs_load("/",(void *)rtems_task_create, 72);
+ if (sc != -1) {
+ printf ("error: untar failed returned %d\n", sc);
+ rtems_test_exit(1);
+ }
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ puts( "\n\n*** TEST TAR03 ***" );
+
+ test_tarfs_error();
+<span style="background-color: #FF0000"> </span>
+ puts( "*** END OF TEST TAR03 ***" );
+ 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_USE_MINIIMFS_AS_BASE_FILESYSTEM
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/tar03/tar03.doc:1.1
--- /dev/null Mon Jul 19 09:10:55 2010
+++ rtems/testsuites/libtests/tar03/tar03.doc Mon Jul 19 08:12:40 2010
</font><font color='#997700'>@@ -0,0 +1,26 @@
</font><font color='#000088'>+#
+# $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: tar03
+
+directives:
+
+ rtems_tarfs_load
+
+concepts:
+
++ Exercise error path for loading image at non-root directory
+
++ Exercise error path when root filesytem does not support files
+
+
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/tar03/tar03.scn:1.1
--- /dev/null Mon Jul 19 09:10:55 2010
+++ rtems/testsuites/libtests/tar03/tar03.scn Mon Jul 19 08:12:40 2010
</font><font color='#997700'>@@ -0,0 +1,4 @@
</font><font color='#000088'>+*** TEST TAR03 ***
+Loading tarfs image at non-root - ERROR
+Loading tarfs image with miniIMFS as root filesystem - ERROR
+*** END OF TEST TAR03 ***
</font></pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-19 Bharath Suri <bharath.s.jois@gmail.com>
PR 1623/testing
* psx13/test.c, psx13/psx13.scn: New cases to improve coverage of
utime() and fpathconf().
* psxfile01/test.c, psxfile01/psxfile01.scn: New cases to improve
coverage of rmdir(), unlink(), mknod(), link(), open(), read(),
write().
* psxstat/test.c, psxstat/psxstat.scn: New case to improve
coverage of readlink().
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/ChangeLog.diff?r1=text&tr1=1.296&r2=text&tr2=1.297&diff_format=h">M</a></td><td width='1%'>1.297</td><td width='100%'>testsuites/psxtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx13/psx13.scn.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>testsuites/psxtests/psx13/psx13.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx13/test.c.diff?r1=text&tr1=1.16&r2=text&tr2=1.17&diff_format=h">M</a></td><td width='1%'>1.17</td><td width='100%'>testsuites/psxtests/psx13/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxfile01/psxfile01.scn.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>testsuites/psxtests/psxfile01/psxfile01.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxfile01/test.c.diff?r1=text&tr1=1.28&r2=text&tr2=1.29&diff_format=h">M</a></td><td width='1%'>1.29</td><td width='100%'>testsuites/psxtests/psxfile01/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxstat/psxstat.scn.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>testsuites/psxtests/psxstat/psxstat.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxstat/test.c.diff?r1=text&tr1=1.30&r2=text&tr2=1.31&diff_format=h">M</a></td><td width='1%'>1.31</td><td width='100%'>testsuites/psxtests/psxstat/test.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtests/ChangeLog:1.296 rtems/testsuites/psxtests/ChangeLog:1.297
--- rtems/testsuites/psxtests/ChangeLog:1.296 Fri Jul 16 14:19:09 2010
+++ rtems/testsuites/psxtests/ChangeLog Mon Jul 19 08:13:20 2010
</font><font color='#997700'>@@ -1,3 +1,14 @@
</font><font color='#000088'>+2010-07-19 Bharath Suri <bharath.s.jois@gmail.com>
+
+ PR 1623/testing
+ * psx13/test.c, psx13/psx13.scn: New cases to improve coverage of
+ utime() and fpathconf().
+ * psxfile01/test.c, psxfile01/psxfile01.scn: New cases to improve
+ coverage of rmdir(), unlink(), mknod(), link(), open(), read(),
+ write().
+ * psxstat/test.c, psxstat/psxstat.scn: New case to improve
+ coverage of readlink().
+
</font> 2010-07-17 Bharath Suri <bharath.s.jois@gmail.com>
PR 1622/testing
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx13/psx13.scn:1.8 rtems/testsuites/psxtests/psx13/psx13.scn:1.9
--- rtems/testsuites/psxtests/psx13/psx13.scn:1.8 Fri Jul 9 17:07:11 2010
+++ rtems/testsuites/psxtests/psx13/psx13.scn Mon Jul 19 08:13:20 2010
</font><font color='#997700'>@@ -1,5 +1,5 @@
</font>
<font color='#880000'>-** POSIX TEST 13 ***
</font><font color='#000088'>+*** POSIX TEST 13 ***
</font>
Files initialized successfully.
Testing device_lseek()... Failed!!!
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx13/test.c:1.16 rtems/testsuites/psxtests/psx13/test.c:1.17
--- rtems/testsuites/psxtests/psx13/test.c:1.16 Fri Jul 9 17:07:11 2010
+++ rtems/testsuites/psxtests/psx13/test.c Mon Jul 19 08:13:20 2010
</font><font color='#997700'>@@ -415,9 +415,11 @@
</font> else
retval = FALSE;
}
<font color='#880000'>-
</font> else
retval = FALSE;
<font color='#000088'>+
+ error = utime("testfile1.tst", NULL );
+ retval &= (error == 0) ? TRUE : FALSE;
</font> }
/* assert (retval == TRUE);*/
<font color='#997700'>@@ -563,6 +565,12 @@
</font> error = fpathconf(fd, _PC_SYNC_IO);
error = fpathconf(fd, 255);
<font color='#000088'>+ close(fd);
+
+ fd = open("testfile1.tst", O_WRONLY);
+<span style="background-color: #FF0000"> </span>
+ error = fpathconf(fd, _PC_LINK_MAX);
+
</font> retval = TRUE;
}
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.12 rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.13
--- rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.12 Thu Jul 15 08:59:25 2010
+++ rtems/testsuites/psxtests/psxfile01/psxfile01.scn Mon Jul 19 08:13:20 2010
</font><font color='#997700'>@@ -1,3 +1,4 @@
</font><font color='#000088'>+
</font> *** FILE TEST 1 ***
*************** Dump of Entire IMFS ***************
/
<font color='#997700'>@@ -30,6 +31,8 @@
</font> rmdir /usr
rmdir /dev
rmdir /fred
<font color='#000088'>+rmdir /tmp/bha
+unlink /dev/tty
</font> mknod /dev/test_console
mknod /dev/tty/S3
mknod /etc/passwd
<font color='#997700'>@@ -48,8 +51,17 @@
</font> create /tmp/john
tcdrain /tmp/john
Attempt to create a file, open in read-only mode and truncate it
<font color='#880000'>-Exercise the reentrant version _link_r -- Expect EFAULT
</font><font color='#000088'>+Exercise the reentrant version _link_r -- Expect ENOENT
</font> Unlink /tmp/bha using the reentrant version -- OK
<font color='#000088'>+mknod with bad type - expect EINVAL
+open /tmp/bha in write only mode -- OK
+attempt to read from /tmp/bha - expect EINVAL
+closing and unlinking /tmp/bha
+open /tmp/bha in read only mode -- OK
+attempt to read from /tmp/bha - expect EINVAL
+closing and unlinking /tmp/bha
+attempt to read from an unopened filedes - expect EBADF
+attempt to write to an unopened filedes - expect EBADF
</font> mknod /tmp/joel
(0)the first write!!!
<font color='#997700'>@@ -73,7 +85,7 @@
</font>
stat( /tmp/joel ) returned<span style="background-color: #FF0000"> </span>
....st_dev (0xfffe:0x0)
<font color='#880000'>-....st_ino 13 may vary by small amount
</font><font color='#000088'>+....st_ino 15 may vary by small amount
</font> ....mode = 00100700
....nlink = 1
....uid = 0
<font color='#997700'>@@ -106,7 +118,7 @@
</font> That is likely to be bigger than the available RAM on many targets.
stat( /tmp/joel ) returned<span style="background-color: #FF0000"> </span>
....st_dev (0xfffe:0x0)
<font color='#880000'>-....st_ino 14 may vary by small amount
</font><font color='#000088'>+....st_ino 16 may vary by small amount
</font> ....mode = 00100700
....nlink = 1
....uid = 0
<font color='#997700'>@@ -137,7 +149,7 @@
</font> (4) 26 characters written to the file
(5) 26 characters written to the file
....st_dev (0xfffe:0x0)
<font color='#880000'>-....st_ino 15 may vary by small amount
</font><font color='#000088'>+....st_ino 17 may vary by small amount
</font> ....mode = 00100644
....nlink = 1
....uid = 0
<font color='#997700'>@@ -153,7 +165,7 @@
</font> This is call 4 to fprintf
This is call 5 to fprintf
....st_dev (0xfffe:0x0)
<font color='#880000'>-....st_ino 15 may vary by small amount
</font><font color='#000088'>+....st_ino 17 may vary by small amount
</font> ....mode = 00100644
....nlink = 1
....uid = 0
<font color='#997700'>@@ -183,7 +195,7 @@
</font> *************** End of Dump ***************
truncate /tmp/j to length of 40
....st_dev (0xfffe:0x0)
<font color='#880000'>-....st_ino 15 may vary by small amount
</font><font color='#000088'>+....st_ino 17 may vary by small amount
</font> ....mode = 00100644
....nlink = 1
....uid = 0
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxfile01/test.c:1.28 rtems/testsuites/psxtests/psxfile01/test.c:1.29
--- rtems/testsuites/psxtests/psxfile01/test.c:1.28 Fri Jul 16 04:23:42 2010
+++ rtems/testsuites/psxtests/psxfile01/test.c Mon Jul 19 08:13:20 2010
</font><font color='#997700'>@@ -244,6 +244,16 @@
</font> rtems_test_assert (status == -1);
rtems_test_assert( errno == ENOENT );
<font color='#000088'>+ puts( "rmdir /tmp/bha" );
+ status = rmdir( "/tmp/bha" );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOENT );
+
+ puts( "unlink /dev/tty" );
+ status = unlink( "/dev/tty" );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EISDIR );
+
</font> puts( "mknod /dev/test_console" );
status = mknod( "/dev/test_console", S_IFCHR, 0LL );
rtems_test_assert( !status );
<font color='#997700'>@@ -339,16 +349,70 @@
</font> rtems_test_assert( fd == -1 );
rtems_test_assert( errno == EINVAL );
<font color='#880000'>- puts( "Exercise the reentrant version _link_r -- Expect EEXIST" );
- status = _link_r( NULL, "", "" );
</font><font color='#000088'>+ puts( "Exercise the reentrant version _link_r -- Expect ENOENT" );
+ status = _link_r( NULL, "/tmp/notexist", "/tmp/cannotexist" );
</font> rtems_test_assert( status == -1 );
<font color='#880000'>- rtems_test_assert( errno == EEXIST );
</font><font color='#000088'>+ rtems_test_assert( errno == ENOENT );
</font>
puts( "Unlink /tmp/bha using the reentrant version -- OK" );
status = _unlink_r( NULL, "/tmp/bha" );
rtems_test_assert( status == 0 );
/*
<font color='#000088'>+ * Simple test case for mknod
+ */
+
+ puts( "mknod with bad type - expect EINVAL" );
+ status = mknod( "/tmp/bha", 0, 0LL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ /*<span style="background-color: #FF0000"> </span>
+ * Read from filedes opened for write
+ */
+
+ puts( "open /tmp/bha in write only mode -- OK" );
+ fd = open( "/tmp/bha", O_CREAT | O_WRONLY, S_IRWXU|S_IRWXG|S_IRWXO );
+ rtems_test_assert( fd != -1 );
+<span style="background-color: #FF0000"> </span>
+ puts( "attempt to read from /tmp/bha - expect EINVAL" );
+ status = read( fd, buffer, 10 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "closing and unlinking /tmp/bha" );
+ status = close( fd );
+ status |= unlink( "/tmp/bha" );
+ rtems_test_assert( status == 0 );
+
+ puts( "open /tmp/bha in read only mode -- OK" );
+ fd = open( "/tmp/bha", O_CREAT | O_RDONLY, S_IRWXU|S_IRWXG|S_IRWXO );
+ rtems_test_assert( fd != -1 );
+<span style="background-color: #FF0000"> </span>
+ puts( "attempt to read from /tmp/bha - expect EINVAL" );
+ status = write( fd, buffer, 10 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "closing and unlinking /tmp/bha" );
+ status = close( fd );
+ status |= unlink( "/tmp/bha" );
+ rtems_test_assert( status == 0 );
+
+ /*<span style="background-color: #FF0000"> </span>
+ * Read/write from an unopened filedes
+ */
+ puts( "attempt to read from an unopened filedes - expect EBADF" );
+ status = read( 5, buffer, 10 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBADF );
+
+ puts( "attempt to write to an unopened filedes - expect EBADF" );
+ status = write( 5, buffer, 10 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBADF );
+
+ /*
</font> * Test simple write to a file at offset 0
*/
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxstat/psxstat.scn:1.12 rtems/testsuites/psxtests/psxstat/psxstat.scn:1.13
--- rtems/testsuites/psxtests/psxstat/psxstat.scn:1.12 Thu Jul 15 08:59:25 2010
+++ rtems/testsuites/psxtests/psxstat/psxstat.scn Mon Jul 19 08:13:20 2010
</font><font color='#997700'>@@ -1704,12 +1704,13 @@
</font> ...st_ctime Sat Dec 31 09:00:35 1988
...st_blksize 0
...st_blocks 0
<font color='#880000'>-statvfs, with invalid path - expect EFAULT
</font><font color='#000088'>+statvfs, with invalid path - expect ENOTSUP
</font> create /tmp -- OK
statvfs, with valid path - expect ENOTSUP
statvfs tested!
Exercise the reentrant version - _stat_r - expect EFAULT
Exercise the reentrant version - _lstat_r - expect EFAULT
<font color='#000088'>+Try readlink with a bad buffer - expect EFAULT
</font>
*** END OF STAT TEST 01 ***
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxstat/test.c:1.30 rtems/testsuites/psxtests/psxstat/test.c:1.31
--- rtems/testsuites/psxtests/psxstat/test.c:1.30 Thu Jul 15 08:59:25 2010
+++ rtems/testsuites/psxtests/psxstat/test.c Mon Jul 19 08:13:20 2010
</font><font color='#997700'>@@ -939,6 +939,11 @@
</font> rtems_test_assert( status == -1 );
rtems_test_assert( errno == EFAULT );
<font color='#000088'>+ puts( "Try readlink with a bad buffer - expect EFAULT" );
+ status = readlink( "/tmp", NULL, 0 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EFAULT );
+
</font> puts( "\n\n*** END OF STAT TEST 01 ***" );
rtems_test_exit(0);
}
</pre>
<p> </p>
<a name='cs4'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, termios06/init.c: Add initial tests for
XON/XOFF and VMIN/VMAX cases.
* termios07/.cvsignore, termios07/Makefile.am, termios07/init.c,
termios07/termios07.doc, termios07/termios07.scn,
termios08/.cvsignore, termios08/Makefile.am, termios08/init.c,
termios08/termios08.doc, termios08/termios08.scn: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.209&r2=text&tr2=1.210&diff_format=h">M</a></td><td width='1%'>1.210</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/Makefile.am.diff?r1=text&tr1=1.40&r2=text&tr2=1.41&diff_format=h">M</a></td><td width='1%'>1.41</td><td width='100%'>testsuites/libtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/configure.ac.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>testsuites/libtests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios06/init.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/libtests/termios06/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios07/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios07/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios07/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios07/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios07/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios07/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios07/termios07.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios07/termios07.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios07/termios07.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios07/termios07.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios08/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios08/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios08/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios08/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios08/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios08/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios08/termios08.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios08/termios08.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios08/termios08.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios08/termios08.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.209 rtems/testsuites/libtests/ChangeLog:1.210
--- rtems/testsuites/libtests/ChangeLog:1.209 Mon Jul 19 08:12:39 2010
+++ rtems/testsuites/libtests/ChangeLog Mon Jul 19 08:54:46 2010
</font><font color='#997700'>@@ -1,5 +1,14 @@
</font> 2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#000088'>+ * Makefile.am, configure.ac, termios06/init.c: Add initial tests for
+ XON/XOFF and VMIN/VMAX cases.
+ * termios07/.cvsignore, termios07/Makefile.am, termios07/init.c,
+ termios07/termios07.doc, termios07/termios07.scn,
+ termios08/.cvsignore, termios08/Makefile.am, termios08/init.c,
+ termios08/termios08.doc, termios08/termios08.scn: New files.
+
+2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font> * Makefile.am, configure.ac: Add tar test for error cases.
* tar03/.cvsignore, tar03/Makefile.am, tar03/init.c, tar03/tar03.doc,
tar03/tar03.scn: New files.
<font color='#006600'>diff -u rtems/testsuites/libtests/Makefile.am:1.40 rtems/testsuites/libtests/Makefile.am:1.41
--- rtems/testsuites/libtests/Makefile.am:1.40 Mon Jul 19 08:12:40 2010
+++ rtems/testsuites/libtests/Makefile.am Mon Jul 19 08:54:46 2010
</font><font color='#997700'>@@ -9,9 +9,11 @@
</font> SUBDIRS += bspcmdline01 cpuuse devfs01 gxx01 \
malloctest malloc02 malloc03 malloc04 malloc05 heapwalk \
putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
<font color='#880000'>- termios termios01 termios02 termios03 termios04 termios05 termios06 \
</font><font color='#000088'>+ termios termios01 termios02 termios03 termios04 termios05 \
+ termios06 termios07 termios08 \
</font> rtems++ tztest block01 block02 block03 block04 block05 block06 block07 \
<font color='#880000'>- block08 block09 block10 stringto01 tar03
</font><font color='#000088'>+ block08 block09 block10 stringto01 \
+ tar03
</font>
include $(top_srcdir)/../automake/subdirs.am
include $(top_srcdir)/../automake/local.am
<font color='#006600'>diff -u rtems/testsuites/libtests/configure.ac:1.47 rtems/testsuites/libtests/configure.ac:1.48
--- rtems/testsuites/libtests/configure.ac:1.47 Mon Jul 19 08:12:40 2010
+++ rtems/testsuites/libtests/configure.ac Mon Jul 19 08:54:46 2010
</font><font color='#997700'>@@ -69,6 +69,8 @@
</font> termios04/Makefile
termios05/Makefile
termios06/Makefile
<font color='#000088'>+termios07/Makefile
+termios08/Makefile
</font> tztest/Makefile
POSIX/Makefile
])
<font color='#006600'>diff -u rtems/testsuites/libtests/termios06/init.c:1.2 rtems/testsuites/libtests/termios06/init.c:1.3
--- rtems/testsuites/libtests/termios06/init.c:1.2 Tue Jul 6 14:54:00 2010
+++ rtems/testsuites/libtests/termios06/init.c Mon Jul 19 08:54:46 2010
</font><font color='#997700'>@@ -19,6 +19,7 @@
</font> #include <unistd.h>
#include <sys/ioctl.h>
#include <rtems/dumpbuf.h>
<font color='#000088'>+#include <rtems/termiostypes.h>
</font>
void pppasyncattach(void);
void ppp_test_driver_set_rx( const char *expected, size_t len );
<font color='#997700'>@@ -34,6 +35,39 @@
</font> rtems_test_assert( Test_fd != -1 );
}
<font color='#000088'>+void Rx_Wake(
+ struct termios *tty,
+ void *arg
+)
+{
+ printk( "Rx_Wake - invoked\n" );
+}
+
+void Tx_Wake(
+ struct termios *tty,
+ void *arg
+)
+{
+ printk( "Tx_Wake - invoked\n" );
+}
+
+struct ttywakeup RxWake = { Rx_Wake, NULL };
+struct ttywakeup TxWake = { Tx_Wake, NULL };
+
+void set_wakeups(void)
+{
+ int sc;
+
+ puts( "ioctl - RTEMS_IO_SNDWAKEUP - OK" );
+ sc = ioctl( Test_fd, RTEMS_IO_SNDWAKEUP, &TxWake );
+ rtems_test_assert( sc == 0 );
+
+ puts( "ioctl - RTEMS_IO_RCVWAKEUP - OK" );
+ sc = ioctl( Test_fd, RTEMS_IO_RCVWAKEUP, &RxWake );
+ rtems_test_assert( sc == 0 );
+
+}
+
</font> void set_discipline(void)
{
int pppdisc = PPPDISC;
<font color='#997700'>@@ -116,6 +150,7 @@
</font>
pppasyncattach();
open_it();
<font color='#000088'>+ set_wakeups();
</font> set_discipline();
write_it();
ioctl_it();
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios07/.cvsignore:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios07/.cvsignore Mon Jul 19 08:54:46 2010
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios07/Makefile.am:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios07/Makefile.am Mon Jul 19 08:54:46 2010
</font><font color='#997700'>@@ -0,0 +1,27 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = termios07
+termios07_SOURCES = init.c ../termios04/termios_testdriver_intr.c
+
+dist_rtems_tests_DATA = termios07.scn
+dist_rtems_tests_DATA += termios07.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+AM_CPPFLAGS += -I$(top_srcdir)/termios04
+
+LINK_OBJS = $(termios07_OBJECTS) $(termios07_LDADD)
+LINK_LIBS = $(termios07_LDLIBS)
+
+termios07$(EXEEXT): $(termios07_OBJECTS) $(termios07_DEPENDENCIES)
+ @rm -f termios07$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios07/init.c:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios07/init.c Mon Jul 19 08:54:46 2010
</font><font color='#997700'>@@ -0,0 +1,174 @@
</font><font color='#000088'>+/*
+ * 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 "termios_testdriver_intr.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <termios.h>
+#include <rtems/dumpbuf.h>
+#include <rtems/libio.h>
+
+void write_helper(
+ int fd,
+ const char *c
+)
+{
+ size_t len;
+ int rc;
+<span style="background-color: #FF0000"> </span>
+ len = strlen( c );
+ printf( "Writing: %s", c );
+
+ rc = write( fd, c, len );
+ rtems_test_assert( rc == len );
+
+ termios_test_driver_dump_tx("Transmitted");
+}
+
+uint8_t read_helper_buffer[256];
+
+void read_helper(
+ int fd,
+ const char *expected
+)
+{
+ int rc;
+ size_t len;
+
+ 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("As Read");
+}
+
+int Test_fd;
+
+void open_it(void)
+{
+ /* open the file */
+ puts( "open(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+ Test_fd = open( TERMIOS_TEST_DRIVER_DEVICE_NAME, O_RDWR );
+ rtems_test_assert( Test_fd != -1 );
+}
+
+void close_it(void)
+{
+ int rc;
+
+ puts( "close(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+ 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 XON_String[] = "\021";
+const char XOFF_String[] = "\023";
+
+const char ExpectedOutput_1[] =
+"0123456789012345678901234567890123456789"
+"0123456789012345678901234567890123456789"
+"0123456789012345678901234567890123456789"
+"0123456789012345678901234567890123456789"
+"0123456789012345678901234567890123456789";
+#if 0
+const char ExpectedInput_1[] = "Blocking interrupt driven read.\n";
+const char ExpectedInput_2[] = "Non-Blocking interrupt driven read.\n";
+#endif
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code sc;
+
+ puts( "\n\n*** TEST TERMIOS07 ***" );
+
+ puts( "rtems_termios_bufsize( 64, 64, 64 ) - OK" );
+ sc = rtems_termios_bufsize ( 64, 64, 64 );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+
+ open_it();
+
+ change_iflag( "Set XON/XOFF", IXON|IXOFF, IXON|IXOFF );
+
+ termios_test_driver_set_rx( XOFF_String, 1 );
+ sc = rtems_task_wake_after( 2 * rtems_clock_get_ticks_per_second() );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+
+ write_helper( Test_fd, ExpectedOutput_1 );
+
+#if 0
+ /* some basic cases */
+ write_helper( Test_fd, ExpectedOutput_1 );
+ read_helper( Test_fd, ExpectedInput_1 );
+ termios_test_driver_set_rx_enqueue_now( true );
+ read_helper( Test_fd, ExpectedInput_2 );
+#endif
+
+ close_it();
+
+ puts( "*** END OF TEST TERMIOS07 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
+ TERMIOS_TEST_DRIVER_TABLE_ENTRY
+
+/* include an extra slot for registering the termios one dynamically */
+#define CONFIGURE_MAXIMUM_DRIVERS 3
+
+/* one for the console and one for the test port */
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 3
+
+/* we need to be able to open the test device */
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_TIMERS 2
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios07/termios07.doc:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios07/termios07.doc Mon Jul 19 08:54:47 2010
</font><font color='#997700'>@@ -0,0 +1,22 @@
</font><font color='#000088'>+#
+# $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: termios07
+
+directives:
+
+ XXX list them
+
+concepts:
+
++ flow control testing
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios07/termios07.scn:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios07/termios07.scn Mon Jul 19 08:54:47 2010
</font><font color='#997700'>@@ -0,0 +1 @@
</font><font color='#000088'>+XXX fill in with test output
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios08/.cvsignore:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios08/.cvsignore Mon Jul 19 08:54:47 2010
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios08/Makefile.am:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios08/Makefile.am Mon Jul 19 08:54:47 2010
</font><font color='#997700'>@@ -0,0 +1,27 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = termios08
+termios08_SOURCES = init.c ../termios03/termios_testdriver_polled.c
+
+dist_rtems_tests_DATA = termios08.scn
+dist_rtems_tests_DATA += termios08.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+AM_CPPFLAGS += -I$(top_srcdir)/termios03
+
+LINK_OBJS = $(termios08_OBJECTS) $(termios08_LDADD)
+LINK_LIBS = $(termios08_LDLIBS)
+
+termios08$(EXEEXT): $(termios08_OBJECTS) $(termios08_DEPENDENCIES)
+ @rm -f termios08$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios08/init.c:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios08/init.c Mon Jul 19 08:54:47 2010
</font><font color='#997700'>@@ -0,0 +1,158 @@
</font><font color='#000088'>+/*
+ * 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 "termios_testdriver_polled.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <rtems/dumpbuf.h>
+#include <rtems/termiostypes.h>
+
+int Test_fd;
+
+void open_it(void)
+{
+ /* open the file */
+ puts( "open(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+ Test_fd = open( TERMIOS_TEST_DRIVER_DEVICE_NAME, O_RDWR );
+ rtems_test_assert( Test_fd != -1 );
+}
+
+void close_it(void)
+{
+ int rc;
+
+ puts( "close(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+ rc = close( Test_fd );
+ rtems_test_assert( rc == 0 );
+}
+
+void write_it(void)
+{
+ ssize_t sc;
+ char ch[10] = "PPPD TEST";
+
+ puts( "write(PPPD TEST) - OK " );
+ sc = write(Test_fd, ch, sizeof(ch));
+ rtems_test_assert( sc == sizeof(ch) );
+}
+
+uint8_t read_helper_buffer[256];
+
+void change_lflag( const char *desc, int mask, int new )
+{
+ int rc;
+ struct termios attr;
+
+ printf( "Changing c_lflag to: %s\n", desc );
+ rc = tcgetattr( Test_fd, &attr );
+ rtems_test_assert( rc == 0 );
+
+ attr.c_lflag &= ~mask;
+ attr.c_lflag |= new;
+
+ rc = tcsetattr( Test_fd, TCSANOW, &attr );
+ rtems_test_assert( rc == 0 );
+}
+
+void change_vmin_vtime( const char *desc, int min, int time )
+{
+ int rc;
+ struct termios attr;
+
+ printf( "Changing %s - VMIN=%d VTIME=%d\n", desc, min, time );
+ rc = tcgetattr( Test_fd, &attr );
+ rtems_test_assert( rc == 0 );
+
+ attr.c_cc[VMIN] = min;
+ attr.c_cc[VTIME] = time;
+
+ rc = tcsetattr( Test_fd, TCSANOW, &attr );
+ rtems_test_assert( rc == 0 );
+}
+
+void read_it(
+ ssize_t expected
+)
+{
+ ssize_t rc;
+ char buf[32];
+
+ rtems_test_assert( expected <= sizeof(buf) );
+
+ printf( "read - %zd expected\n", expected );
+ rc = read( Test_fd, buf, expected );<span style="background-color: #FF0000"> </span>
+ if ( expected != rc )
+ printf( "ERROR - expected=%zd rc=%zd\n", expected, rc );
+ rtems_test_assert( expected == rc );
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ puts( "\n\n*** TEST TERMIOS08 ***" );
+
+ open_it();
+ change_lflag( "non-canonical", ICANON, 0 );
+
+ change_vmin_vtime( "to polling", 0, 0 );
+ read_it( 0 );
+
+ change_vmin_vtime( "to half-second timeout", 0, 5 );
+ read_it( 0 );
+
+ change_vmin_vtime( "to half-second timeout", 5, 3 );
+ puts( "Enqueue 2 characters" );
+ termios_test_driver_set_rx( "ab", 2 );
+ read_it( 2 );
+
+ change_vmin_vtime( "to half-second timeout", 5, 3 );
+ puts( "Enqueue 1 character" );
+ termios_test_driver_set_rx( "b", 1 );
+ read_it( 1 );
+
+ puts( "Enqueue 7 characters" );
+ termios_test_driver_set_rx( "1234567", 1 );
+ read_it( 5 );
+ read_it( 2 );
+
+ close_it();
+<span style="background-color: #FF0000"> </span>
+ puts( "*** END OF TEST TERMIOS08 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_EXTRA_DRIVERS TERMIOS_TEST_DRIVER_TABLE_ENTRY
+
+/* one for the console and one for the test port */
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 3
+
+/* we need to be able to open the test device */
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios08/termios08.doc:1.1
--- /dev/null Mon Jul 19 09:10:56 2010
+++ rtems/testsuites/libtests/termios08/termios08.doc Mon Jul 19 08:54:47 2010
</font><font color='#997700'>@@ -0,0 +1,22 @@
</font><font color='#000088'>+#
+# $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: termios08
+
+directives:
+
+ XXX list them
+
+concepts:
+
++ various VMIN/VMAX cases
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios08/termios08.scn:1.1
--- /dev/null Mon Jul 19 09:10:57 2010
+++ rtems/testsuites/libtests/termios08/termios08.scn Mon Jul 19 08:54:47 2010
</font><font color='#997700'>@@ -0,0 +1 @@
</font><font color='#000088'>+XXX fill in with test output
</font></pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>