<!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-06-24)</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-06-24 Bharath Suri <bharath.s.jois@gmail.com>
* Makefile.am, configure.ac: Removed some fifo tests.
* spfifo01/Makefile.am, spfifo01/init.c: Minor changes to avoid
excessive new lines in the output.
spfifo02/Makefile.am, spfifo02/init.c, spfifo02/spfifo02.doc,
spfifo02/spfifo02.scn, spfifo03/Makefile.am: Merge from spfifo08.
Also added a few more cases, mostly from spfifo04/init.c.
* spfifo03/init.c, spfifo03/spfifo03.doc, spfifo03/spfifo03.scn:
Previously was spfifo06. Configure parameter for pipes is used now.
* spfifo04/.cvsignore, spfifo04/Makefile.am, spfifo04/init.c,
spfifo04/spfifo04.doc, spfifo04/spfifo04.scn, spfifo08/.cvsignore,
spfifo08/Makefile.am, spfifo08/init.c, spfifo08/spfifo08.doc,
spfifo08/spfifo08.scn: Removed.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/ChangeLog.diff?r1=text&tr1=1.383&r2=text&tr2=1.384&diff_format=h">M</a></td><td width='1%'>1.384</td><td width='100%'>testsuites/sptests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/Makefile.am.diff?r1=text&tr1=1.91&r2=text&tr2=1.92&diff_format=h">M</a></td><td width='1%'>1.92</td><td width='100%'>testsuites/sptests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/configure.ac.diff?r1=text&tr1=1.96&r2=text&tr2=1.97&diff_format=h">M</a></td><td width='1%'>1.97</td><td width='100%'>testsuites/sptests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo01/Makefile.am.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/sptests/spfifo01/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo01/init.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>testsuites/sptests/spfifo01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo02/Makefile.am.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/sptests/spfifo02/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo02/init.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>testsuites/sptests/spfifo02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo02/spfifo02.doc.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/sptests/spfifo02/spfifo02.doc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo02/spfifo02.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/sptests/spfifo02/spfifo02.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo03/Makefile.am.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/sptests/spfifo03/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo03/init.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>testsuites/sptests/spfifo03/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo03/spfifo03.doc.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/sptests/spfifo03/spfifo03.doc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo03/spfifo03.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/sptests/spfifo03/spfifo03.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo04/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.1</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo04/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo04/Makefile.am?rev=1.2&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.2</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo04/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo04/init.c?rev=1.3&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.3</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo04/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo04/spfifo04.doc?rev=1.2&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.2</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo04/spfifo04.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo04/spfifo04.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.1</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo04/spfifo04.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.1</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo08/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.1</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo08/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/init.c?rev=1.2&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.2</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo08/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/spfifo08.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.1</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo08/spfifo08.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/spfifo08.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.1</font></td><td width='100%'><font color="#880000">testsuites/sptests/spfifo08/spfifo08.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/sptests/ChangeLog:1.383 rtems/testsuites/sptests/ChangeLog:1.384
--- rtems/testsuites/sptests/ChangeLog:1.383 Tue Jun 22 11:14:43 2010
+++ rtems/testsuites/sptests/ChangeLog Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -1,3 +1,19 @@
</font><font color='#000088'>+2010-06-24 Bharath Suri <bharath.s.jois@gmail.com>
+
+ * Makefile.am, configure.ac: Removed some fifo tests.
+ * spfifo01/Makefile.am, spfifo01/init.c: Minor changes to avoid
+ excessive new lines in the output.
+
+ spfifo02/Makefile.am, spfifo02/init.c, spfifo02/spfifo02.doc,
+ spfifo02/spfifo02.scn, spfifo03/Makefile.am: Merge from spfifo08.
+ Also added a few more cases, mostly from spfifo04/init.c.
+ * spfifo03/init.c, spfifo03/spfifo03.doc, spfifo03/spfifo03.scn:<span style="background-color: #FF0000"> </span>
+ Previously was spfifo06. Configure parameter for pipes is used now.
+ * spfifo04/.cvsignore, spfifo04/Makefile.am, spfifo04/init.c,
+ spfifo04/spfifo04.doc, spfifo04/spfifo04.scn, spfifo08/.cvsignore,
+ spfifo08/Makefile.am, spfifo08/init.c, spfifo08/spfifo08.doc,
+ spfifo08/spfifo08.scn: Removed.
+
</font> 2010-06-22 Joel Sherrill <joel.sherrilL@OARcorp.com>
* Makefile.am, configure.ac: Add new test to exercise path where using
<font color='#006600'>diff -u rtems/testsuites/sptests/Makefile.am:1.91 rtems/testsuites/sptests/Makefile.am:1.92
--- rtems/testsuites/sptests/Makefile.am:1.91 Tue Jun 22 11:14:43 2010
+++ rtems/testsuites/sptests/Makefile.am Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -20,7 +20,7 @@
</font> spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 \
<font color='#880000'>- spfifo01 spfifo02 spfifo03 spfifo04 spfifo08 \
</font><font color='#000088'>+ spfifo01 spfifo02 spfifo03 \
</font> spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
spintrcritical09 spintrcritical10 spintrcritical11 spintrcritical12 \
<font color='#006600'>diff -u rtems/testsuites/sptests/configure.ac:1.96 rtems/testsuites/sptests/configure.ac:1.97
--- rtems/testsuites/sptests/configure.ac:1.96 Tue Jun 22 11:14:43 2010
+++ rtems/testsuites/sptests/configure.ac Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -122,8 +122,6 @@
</font> spfifo01/Makefile
spfifo02/Makefile
spfifo03/Makefile
<font color='#880000'>-spfifo04/Makefile
-spfifo08/Makefile
</font> spintrcritical01/Makefile
spintrcritical02/Makefile
spintrcritical03/Makefile
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo01/Makefile.am:1.2 rtems/testsuites/sptests/spfifo01/Makefile.am:1.3
--- rtems/testsuites/sptests/spfifo01/Makefile.am:1.2 Tue Jun 8 08:59:17 2010
+++ rtems/testsuites/sptests/spfifo01/Makefile.am Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -14,7 +14,6 @@
</font> include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/../automake/leaf.am
<font color='#880000'>-
</font> AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(spfifo01_OBJECTS) $(spfifo01_LDADD)
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo01/init.c:1.3 rtems/testsuites/sptests/spfifo01/init.c:1.4
--- rtems/testsuites/sptests/spfifo01/init.c:1.3 Thu Jun 10 09:44:26 2010
+++ rtems/testsuites/sptests/spfifo01/init.c Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -23,7 +23,7 @@
</font> puts("\n\n*** FIFO / PIPE OPEN TEST - 1 ***");
puts(
<font color='#880000'>- "Configuration: Pipes disabled.\n"
</font><font color='#000088'>+ "\nConfiguration: Pipes disabled.\n"
</font> "Creating named fifo '" FIFO_PATH "'.\n"
"Must result in failure since pipes are disabled in the configuration."
);
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo02/Makefile.am:1.2 rtems/testsuites/sptests/spfifo02/Makefile.am:1.3
--- rtems/testsuites/sptests/spfifo02/Makefile.am:1.2 Tue Jun 8 08:59:17 2010
+++ rtems/testsuites/sptests/spfifo02/Makefile.am Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -5,7 +5,7 @@
</font> MANAGERS = all
rtems_tests_PROGRAMS = spfifo02
<font color='#880000'>-spfifo02_SOURCES = init.c
</font><font color='#000088'>+spfifo02_SOURCES = init.c ../../support/src/spin.c
</font>
dist_rtems_tests_DATA = spfifo02.scn
dist_rtems_tests_DATA += spfifo02.doc
<font color='#997700'>@@ -14,14 +14,13 @@
</font> include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/../automake/leaf.am
<font color='#880000'>-
</font> AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(spfifo02_OBJECTS) $(spfifo02_LDADD)
LINK_LIBS = $(spfifo02_LDLIBS)
spfifo02$(EXEEXT): $(spfifo02_OBJECTS) $(spfifo02_DEPENDENCIES)
<font color='#880000'>- @rm -f spfifo02$(EXEEXT)
</font><font color='#000088'>+ @rm -f spfifo08$(EXEEXT)
</font> $(make-exe)
include $(top_srcdir)/../automake/local.am
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo02/init.c:1.3 rtems/testsuites/sptests/spfifo02/init.c:1.4
--- rtems/testsuites/sptests/spfifo02/init.c:1.3 Sun Jun 20 17:02:24 2010
+++ rtems/testsuites/sptests/spfifo02/init.c Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -1,6 +1,6 @@
</font> /*
<font color='#880000'>- * COPYRIGHT (c) 2010
- * Bharath Suri<bharath.s.jois@gmail.com>.
</font><font color='#000088'>+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
</font> *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -9,85 +9,207 @@
</font> * $Id$
*/
<font color='#880000'>-/* Includes */
-#include <bsp.h>
</font> #include <tmacros.h>
<font color='#000088'>+#include "test_support.h"
</font>
<font color='#880000'>-/* Includes */
-#include <stdio.h>
</font> #include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
<font color='#000088'>+#include <rtems/score/heap.h>
</font>
<font color='#880000'>-#include <rtems.h>
-#include <rtems/libio.h>
</font><font color='#000088'>+#define MAXIMUM 10
+#define NUM_OPEN_REQ 26
</font>
<font color='#000088'>+rtems_id Barriers[MAXIMUM];
+int BarrierCount;
</font>
<font color='#880000'>-void test_main(void)
</font><font color='#000088'>+rtems_id Semaphores[MAXIMUM];
+int SemaphoreCount;
+
+extern Heap_Control *RTEMS_Malloc_Heap;
+
+void create_all_barriers(void)
</font> {
<font color='#000088'>+ rtems_status_code status;
+ int i;
</font>
<font color='#880000'>- int status = -1;
- int fd = 0;
</font><font color='#000088'>+ BarrierCount = 0;
</font>
<font color='#880000'>- puts("\n\n*** FIFO / PIPE OPEN TEST - 2 ***");
- puts(
-"\n\nConfiguration: Pipes configured, \
-but number of barriers configured = 0"
- );
</font><font color='#000088'>+ memset( Barriers, 0, sizeof(Barriers) );
+ for ( i=0 ; i<MAXIMUM ; i++ ) {
+ status = rtems_barrier_create(
+ rtems_build_name( 'B', 'A', 'R', 0x30+i ),
+ RTEMS_BARRIER_MANUAL_RELEASE,
+ 0,
+ &Barriers[i]
+ );
+ if ( status == RTEMS_TOO_MANY ) {
+ printf( "%d Barriers created\n", BarrierCount+1 );
+ return;
+ }<span style="background-color: #FF0000"> </span>
+
+ directive_failed( status, "barrier create" );
+ BarrierCount++;
+ }
+}
</font>
<font color='#880000'>- puts("\n\nCreating directory /tmp");
- status = mkdir("/tmp", 0777);
- rtems_test_assert(status == 0);
</font><font color='#000088'>+void create_all_semaphores(void)
+{
+ rtems_status_code status;
+ int i;
</font>
<font color='#880000'>- puts("\n\nCreating fifo /tmp/fifo");
- status = mkfifo("/tmp/fifo01", 0777);
- rtems_test_assert(status == 0);
</font><font color='#000088'>+ SemaphoreCount = 0;
</font>
<font color='#880000'>- puts("\n\nAttempt to open the fifo file\n");
- puts(
-"Must result in failure since \n\
-number of barriers = 0 => not all resources\n\
-were acquired"
- );
-
- fd = open("/tmp/fifo01", O_RDONLY);
- rtems_test_assert(fd == -1);
- rtems_test_assert(errno == EINTR); // Should this
- // be ENOMEM?
- puts("\n\nRemove the entry /tmp/fifo01");
- status = unlink("/tmp/fifo01");
- rtems_test_assert(status == 0);
</font><font color='#000088'>+ for ( i=0 ; i<MAXIMUM ; i++ ) {
+ status = rtems_semaphore_create(
+ rtems_build_name( 'S', 'E', 'M', 0x30+i ),
+ 0,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ 0,
+ &Semaphores[i]
+ );
+ if ( status == RTEMS_TOO_MANY ) {
+ printf( "%d Semaphores created\n", SemaphoreCount+1 );
+ return;
+ }<span style="background-color: #FF0000"> </span>
+
+ directive_failed( status, "semaphore create" );
+ SemaphoreCount++;
+ }
+}
+
+void delete_barrier(void)
+{
+ rtems_status_code status;
+<span style="background-color: #FF0000"> </span>
+ BarrierCount--;
+ printf( "Deleting barrier id=0x%08x\n",
+ (unsigned int)Barriers[BarrierCount] );
+ status = rtems_barrier_delete( Barriers[BarrierCount] );
+ directive_failed( status, "barrier delete" );
+}
</font>
<font color='#880000'>- puts("\n\nRemove directory /tmp");
- status = rmdir("/tmp");
</font><font color='#000088'>+void delete_semaphore(void)
+{
+ rtems_status_code status;
+<span style="background-color: #FF0000"> </span>
+ SemaphoreCount--;
+ printf( "Deleting semaphore id=0x%08x\n",
+ (unsigned int) Semaphores[SemaphoreCount] );
+ status = rtems_semaphore_delete( Semaphores[SemaphoreCount] );
+ directive_failed( status, "semaphore delete" );
+}
+
+void create_fifo(void)
+{
+ int status;
+
+ status = mkfifo("/fifo01", 0777);
</font> rtems_test_assert(status == 0);
<font color='#000088'>+}
+
+void open_fifo(int expected, int flags)
+{
+ int fd;
</font>
<font color='#880000'>- puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 2 ***");
</font><font color='#000088'>+ fd = open("/fifo01", flags);
+ printf( "status=%d errno=%d/(%s)\n", fd, errno, strerror(errno) );
+ if ( expected ) {
+ rtems_test_assert(fd == -1);
+ rtems_test_assert(errno == expected);<span style="background-color: #FF0000"> </span>
+ } else {
+ rtems_test_assert(fd != -1);
+ close( fd );
+ }
</font> }
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_task Init(
<font color='#880000'>- rtems_task_argument not_used
</font><font color='#000088'>+ rtems_task_argument argument
</font> )
{
<font color='#880000'>- test_main();
</font><font color='#000088'>+ void *alloc_ptr = (void *)0;
+ int num_opens = 0;
+ int index = 0;
+ Heap_Information_block Info;
+
+ puts( "\n\n*** TEST FIFO 08 ***" );
+
+ puts( "Creating all barriers" );
+ create_all_barriers();
+
+ puts( "Creating all semaphores" );
+ create_all_semaphores();
+
+ puts( "Creating FIFO" );
+ create_fifo();
+<span style="background-color: #FF0000"> </span>
+ puts( "Opening FIFO.. expect ENFILE (semaphore @ open could not be created)" );
+ open_fifo(ENFILE, O_RDWR);
+
+ delete_semaphore();
+ puts( "Opening FIFO.. expect ENOMEM (semaphore for pipe could not be created)" );
+ open_fifo(ENOMEM, O_RDWR);
+
+ delete_semaphore();
+
+ _Heap_Get_information(RTEMS_Malloc_Heap, &Info);
+ alloc_ptr = malloc(Info.Free.largest-4);
+ puts("Opening FIFO.. expect ENOMEM since no memory is available");
+ open_fifo(ENOMEM, O_RDWR);
+
+ free(alloc_ptr);
+ puts( "Opening FIFO.. expect ENOMEM (barrier-1 for pipe could not be created)" );
+ open_fifo(ENOMEM, O_RDWR);
+
+ delete_barrier();
+ puts( "Opening FIFO.. expect ENOMEM (barrier-2 for pipe could not be created" );
+ open_fifo(ENOMEM, O_RDWR);
+
+ delete_barrier();
+ puts( "Opening FIFO.. expect ENOMEM (semaphore-1 for pipe could not be created" );
+ open_fifo(ENOMEM, O_RDWR);
+
+ delete_semaphore();
+ puts( "Opening FIFO in RDWR mode. Expect OK" );
+ open_fifo(0, O_RDWR);
+ ++num_opens;
+
+ puts( "Opening FIFO in non blocking RDONLY mode. Expect OK");
+ open_fifo(0, O_RDONLY | O_NONBLOCK);
+ ++num_opens;
+
+ puts( "Opening FIFO in non blocking WRONLY mode. Expect ENXIO");
+ open_fifo(ENXIO, O_WRONLY | O_NONBLOCK);
+ ++num_opens;
+
+ puts("\nMultiple opens\n");
+ for(index = 0; index < NUM_OPEN_REQ - num_opens; ++index) {
+
+ open_fifo(0, O_RDONLY | O_NONBLOCK);
+ printf("%d... ", index+1);
+ }
+
+ puts( "*** END OF TEST FIFO 08 ***" );
+
</font> rtems_test_exit(0);
}
<font color='#000088'>+/* configuration information */
+
</font> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
<font color='#880000'>-#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
</font><font color='#000088'>+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
</font>
<font color='#880000'>-#define CONFIGURE_PIPES_ENABLED
-#define CONFIGURE_MAXIMUM_PIPES 1
-#define CONFIGURE_MAXIMUM_TASKS 1
</font><font color='#000088'>+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
+#define CONFIGURE_FIFOS_ENABLED
+#define CONFIGURE_MAXIMUM_FIFOS 1
</font>
<font color='#880000'>-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
</font> #define CONFIGURE_INIT
#include <rtems/confdefs.h>
<font color='#880000'>-
</font> /* end of file */
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo02/spfifo02.doc:1.2 rtems/testsuites/sptests/spfifo02/spfifo02.doc:1.3
--- rtems/testsuites/sptests/spfifo02/spfifo02.doc:1.2 Thu Jun 10 09:44:26 2010
+++ rtems/testsuites/sptests/spfifo02/spfifo02.doc Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -1,8 +1,8 @@
</font> #
# $Id$
#
<font color='#880000'>-# COPYRIGHT (c) 2010
-# Bharath Suri<bharath.s.jois@gmail.com>.
</font><font color='#000088'>+# COPYRIGHT (c) 1989-2010.
+# On-Line Applications Research Corporation (OAR).
</font> #
# The license and distribution terms for this file may be
# found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -11,12 +11,14 @@
</font>
This file describes the directives and concepts tested by this test set.
<font color='#880000'>-Configuration:
</font><font color='#000088'>+test set name: spfifo08
</font>
<font color='#880000'>-Pipes enabled. Maximum number of barriers is not defined and hence =
-0.
</font><font color='#000088'>+directives:
</font>
<font color='#880000'>-Expected:
</font><font color='#000088'>+ mkfifo()
+ open() - on FIFOs
</font>
<font color='#880000'>-Pipe requires 2 barriers to be created. With max number of barriers
-set to 0, fifo_open fails with EINTR
</font><font color='#000088'>+concepts:
+
++ memory allocation error cases<span style="background-color: #FF0000"> </span>
++ resource allocation error cases<span style="background-color: #FF0000"> </span>
</font>
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo02/spfifo02.scn:1.1 rtems/testsuites/sptests/spfifo02/spfifo02.scn:1.2
--- rtems/testsuites/sptests/spfifo02/spfifo02.scn:1.1 Mon Jun 7 14:09:27 2010
+++ rtems/testsuites/sptests/spfifo02/spfifo02.scn Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -1,31 +1 @@
</font><font color='#880000'>-Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
-Initialized console on port COM1 9600-8-N-1
-<span style="background-color: #FF0000"><CR></span>
-
<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-*** FIFO / PIPE OPEN TEST - 2 ***<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-Configuration: Pipes configured, but number of barriers configured = 0<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-Creating directory /tmp<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-Creating fifo /tmp/fifo<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-Attempt to open the fifo file<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-Must result in failure since <span style="background-color: #FF0000"><CR></span>
-number of barriers = 0 => not all resources<span style="background-color: #FF0000"><CR></span>
-were acquired<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-Remove the entry /tmp/fifo01<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-Remove directory /tmp<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-<span style="background-color: #FF0000"><CR></span>
-*** END OF FIFO / PIPE OPEN TEST - 2 ***<span style="background-color: #FF0000"><CR></span>
</font><font color='#000088'>+XXX fill in with test output
</font>
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo03/Makefile.am:1.2 rtems/testsuites/sptests/spfifo03/Makefile.am:1.3
--- rtems/testsuites/sptests/spfifo03/Makefile.am:1.2 Tue Jun 8 08:59:17 2010
+++ rtems/testsuites/sptests/spfifo03/Makefile.am Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -14,7 +14,6 @@
</font> include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/../automake/leaf.am
<font color='#880000'>-
</font> AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(spfifo03_OBJECTS) $(spfifo03_LDADD)
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo03/init.c:1.3 rtems/testsuites/sptests/spfifo03/init.c:1.4
--- rtems/testsuites/sptests/spfifo03/init.c:1.3 Sun Jun 20 17:02:24 2010
+++ rtems/testsuites/sptests/spfifo03/init.c Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -1,6 +1,16 @@
</font><font color='#880000'>-/*
- * COPYRIGHT (c) 2010
- * Bharath Suri<bharath.s.jois@gmail.com>.
</font><font color='#000088'>+/* Init
+ *
+ * This routine is the initialization task for this test program.
+ * It is a user initialization task and has the responsibility
+ * of invoking the test routine
+ *
+ * Input parameters:
+ * not_used
+ *
+ * Output parameters: NONE
+ *
+ * COPYRIGHT (c) 1989-1999.
+ * On-Line Applications Research Corporation (OAR).
</font> *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -22,48 +32,169 @@
</font> #include <rtems.h>
#include <rtems/libio.h>
<font color='#000088'>+#define SEND_RCV_BUFSIZ 12
+rtems_id Barrier;
</font>
<font color='#880000'>-void test_main(void)
</font><font color='#000088'>+rtems_task read_task(rtems_task_argument not_used)
</font> {
<font color='#000088'>+ int fd = 0;
+ int status = -1;
+
+ char recvBuf_r1[SEND_RCV_BUFSIZ] = {0};
+ char recvBuf_r2[SEND_RCV_BUFSIZ] = {0};
+
+ puts("\nRead task activated, waiting till writer opens");
+
+ status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+
+ sleep(1);
+
+ puts("\nNow, reader opening file(1)");<span style="background-color: #FF0000"> </span>
+ fd = open("/tmp/fifo01", O_RDONLY);
+ if(fd <= 0) {
+ printf("Error opening file: (%d) :: %s", errno, strerror(errno));
+ rtems_test_assert(0);
+ }
+
+ status = read(fd, recvBuf_r1, sizeof(recvBuf_r1)-1);
+ rtems_test_assert(status == sizeof(recvBuf_r1)-1);
+
+ printf("\n@ receiver (being a unblocked reader): Got %s", recvBuf_r1);
+
+ status = close(fd);
+ rtems_test_assert(status == 0);
+
+ status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+<span style="background-color: #FF0000"> </span>
+ puts("\nReader opening file(2)");
+ fd = open("/tmp/fifo01", O_RDONLY);
+ if(fd <= 0) {
+ printf("Error opening file: (%d) :: %s", errno, strerror(errno));
+ rtems_test_assert(0);
+ }
+
+ status = read(fd, recvBuf_r2, sizeof(recvBuf_r2)-1);
+ rtems_test_assert(status == sizeof(recvBuf_r2)-1);
+
+ printf("\n@ receiver (being a blocked reader): Got %s", recvBuf_r2);
+
+ status = close(fd);
+ rtems_test_assert(status == 0);
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
+ puts("\nReader done!");
+ status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+ rtems_task_delete( RTEMS_SELF );
+}
</font>
<font color='#000088'>+
+void test_main(void) //Also acts as the write task
+{
+
+ rtems_id readTaskID;
+
+ rtems_name readTaskName;
+
+ char sendBuf_r1[SEND_RCV_BUFSIZ] = {0};
+ char sendBuf_r2[SEND_RCV_BUFSIZ] = {0};
</font> int status = -1;
int fd = 0;
<font color='#880000'>- puts("\n\n*** FIFO / PIPE OPEN TEST - 3 ***");
- puts(
-"\n\nConfiguration: Pipes configured, \
-but number of barriers configured = 1\n\
-Required number of barriers = 2"
- );
</font>
<font color='#880000'>- puts("\n\nCreating directory /tmp");
</font><font color='#000088'>+ strcpy( sendBuf_r1, "SendBuffer1" );
+ strcpy( sendBuf_r2, "SendBuffer2" );
+
+ memset( &Barrier, 0, sizeof(Barrier) );
+ status = rtems_barrier_create (
+ rtems_build_name ( 'B', 'A', 'R', 't' ),
+ RTEMS_BARRIER_AUTOMATIC_RELEASE,
+ 2,
+ &Barrier
+ );
+
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+
+ puts("\n\n*** FIFO / PIPE OPEN TEST - 6 ***");
+
+ puts("\nCreating a task name and a task");
+ readTaskName = rtems_build_name('T','A','r',' ');
+
+ status = rtems_task_create(
+ readTaskName,
+ 1,
+ RTEMS_MINIMUM_STACK_SIZE * 2,
+ RTEMS_INTERRUPT_LEVEL(31),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &readTaskID
+ );
+<span style="background-color: #FF0000"> </span>
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+
+ puts("\ncreating directory /tmp");
</font> status = mkdir("/tmp", 0777);
rtems_test_assert(status == 0);
<font color='#880000'>- puts("\n\nCreating fifo /tmp/fifo");
</font><font color='#000088'>+ puts("\ncreating fifo file /tmp/fifo01");
</font> status = mkfifo("/tmp/fifo01", 0777);
rtems_test_assert(status == 0);
<font color='#880000'>- puts("\n\nAttempt to open the fifo file\n");
- puts(
-"Must result in failure since \n\
-number of barriers = 1 => not all resources\n\
-were acquired"
- );
</font><font color='#000088'>+ puts("\nStarting the read task");
+ status = rtems_task_start(readTaskID, read_task, 0);
+ rtems_test_assert(status == 0);
</font>
<font color='#880000'>- fd = open("/tmp/fifo01", O_RDONLY);
- rtems_test_assert(fd == -1);
- rtems_test_assert(errno == EINTR); // Should this
- // be ENOMEM?
- puts("\n\nRemove the entry /tmp/fifo01");
- status = unlink("/tmp/fifo01");
</font><font color='#000088'>+ status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+
+ puts("\nWriter opening file(1)");
+ fd = open("/tmp/fifo01", O_WRONLY);
+ if(fd <= 0) {
+ printf("Error opening file: (%d) :: %s", errno, strerror(errno));
+ rtems_test_assert(0);
+ }
+
+<span style="background-color: #FF0000"> </span>
+ printf("\n@ sender: %s", sendBuf_r1);
+ status = write(fd, sendBuf_r1, sizeof(sendBuf_r1)-1);
+ rtems_test_assert(status == sizeof(sendBuf_r1)-1);
+
+ status = close(fd);
</font> rtems_test_assert(status == 0);
<font color='#000088'>+<span style="background-color: #FF0000"> </span>
+ status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+
+ sleep(1);
+
+ // Reader would have blocked by now
+ puts("\nWriter opening file(2)");
+ fd = open("/tmp/fifo01", O_WRONLY);
+ if(fd <= 0) {
+ printf("Error opening file: (%d) :: %s", errno, strerror(errno));
+ rtems_test_assert(0);
+ }
+
+ printf("\n@ sender: %s", sendBuf_r2);
+ status = write(fd, sendBuf_r2, sizeof(sendBuf_r2)-1);
+ rtems_test_assert(status == sizeof(sendBuf_r2)-1);
</font>
<font color='#880000'>- puts("\n\nRemove directory /tmp");
- status = rmdir("/tmp");
</font><font color='#000088'>+ status = close(fd);
</font> rtems_test_assert(status == 0);
<font color='#880000'>- puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 3 ***");
</font><font color='#000088'>+ status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
+ rtems_test_assert( status == RTEMS_SUCCESSFUL );
+
+ puts( "Removing the fifo" );
+ status = unlink("/tmp/fifo01");
+ rtems_test_assert(status == 0);
+<span style="background-color: #FF0000"> </span>
+ puts( "Removing /tmp" );
+ status = rmdir("/tmp");
+ rtems_test_assert(status == 0);
+<span style="background-color: #FF0000"> </span>
+ puts("\n*** END OF FIFO / PIPE OPEN TEST - 6 ***");
</font> }
rtems_task Init(
<font color='#997700'>@@ -80,13 +211,18 @@
</font> #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
<font color='#880000'>-#define CONFIGURE_MAXIMUM_TASKS 1
</font><font color='#000088'>+#define CONFIGURE_MAXIMUM_TASKS 3
</font>
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
<font color='#880000'>-#define CONFIGURE_PIPES_ENABLED
-#define CONFIGURE_MAXIMUM_PIPES 1
</font><font color='#000088'>+
+#define CONFIGURE_MAXIMUM_BARRIERS 1
+
</font> #define CONFIGURE_INIT
<font color='#000088'>+#define CONFIGURE_FIFOS_ENABLED
+#define CONFIGURE_MAXIMUM_FIFOS 1
</font>
<font color='#000088'>+
+#define CONFIGURE_INIT
</font> #include <rtems/confdefs.h>
/* end of file */
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo03/spfifo03.doc:1.2 rtems/testsuites/sptests/spfifo03/spfifo03.doc:1.3
--- rtems/testsuites/sptests/spfifo03/spfifo03.doc:1.2 Thu Jun 10 09:44:27 2010
+++ rtems/testsuites/sptests/spfifo03/spfifo03.doc Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -1,8 +1,8 @@
</font> #
# $Id$
#
<font color='#880000'>-# COPYRIGHT (c) 2010
-# Bharath Suri<bharath.s.jois@gmail.com>.
</font><font color='#000088'>+# COPYRIGHT (c) 1989-1999.
+# On-Line Applications Research Corporation (OAR).
</font> #
# The license and distribution terms for this file may be
# found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -13,9 +13,15 @@
</font>
Configuration:
<font color='#880000'>-Pipes enabled. Maximum number of barriers is set to 1.
</font><font color='#000088'>+- Pipes enabled
+- Resources available >= Resources required
+ - Semaphores, pipes, barriers etc.
</font>
<font color='#880000'>-Expected:
</font><font color='#000088'>+Coverage concepts:
</font>
<font color='#880000'>-Pipe requires 2 barriers to be created. With max number of barriers
-set to 1, fifo_open fails with EINTR
</font><font color='#000088'>+- Main task also acts as the write task
+- Main task creates another task: for reading
+- Write task is responsible for writing to the pipe and the read task
+ reads from the pipe
+- The pipe is opened twice, such that the write task blocks on open<span style="background-color: #FF0000"> </span>
+ once and the read task blocks on open the 2nd time
</font>
<font color='#006600'>diff -u rtems/testsuites/sptests/spfifo03/spfifo03.scn:1.1 rtems/testsuites/sptests/spfifo03/spfifo03.scn:1.2
--- rtems/testsuites/sptests/spfifo03/spfifo03.scn:1.1 Mon Jun 7 14:09:28 2010
+++ rtems/testsuites/sptests/spfifo03/spfifo03.scn Thu Jun 24 14:46:40 2010
</font><font color='#997700'>@@ -1,32 +1,41 @@
</font><font color='#880000'>-Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
</font> Initialized console on port COM1 9600-8-N-1
<span style="background-color: #FF0000"><CR></span>
<span style="background-color: #FF0000"><CR></span>
<span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-*** FIFO / PIPE OPEN TEST - 3 ***<span style="background-color: #FF0000"><CR></span>
</font><font color='#000088'>+*** FIFO / PIPE OPEN TEST - 6 ***<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-Configuration: Pipes configured, but number of barriers configured = 1<span style="background-color: #FF0000"><CR></span>
-Required number of barriers = 2<span style="background-color: #FF0000"><CR></span>
</font><font color='#000088'>+Creating a task name and a task<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-Creating directory /tmp<span style="background-color: #FF0000"><CR></span>
</font><font color='#000088'>+creating directory /tmp<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-Creating fifo /tmp/fifo<span style="background-color: #FF0000"><CR></span>
</font><font color='#000088'>+creating fifo file /tmp/fifo01<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-Attempt to open the fifo file<span style="background-color: #FF0000"><CR></span>
</font><font color='#000088'>+Starting the read task<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-Must result in failure since <span style="background-color: #FF0000"><CR></span>
-number of barriers = 1 => not all resources<span style="background-color: #FF0000"><CR></span>
-were acquired<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<font color='#000088'>+Writer opening file(1)<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-Remove the entry /tmp/fifo01<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<font color='#000088'>+Read task activated, sleeping to block the writer<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-Remove directory /tmp<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<font color='#000088'>+Now, reader opening file(1)<span style="background-color: #FF0000"><CR></span>
</font> <span style="background-color: #FF0000"><CR></span>
<font color='#880000'>-*** END OF FIFO / PIPE OPEN TEST - 3 ***<span style="background-color: #FF0000"><CR></span>
</font><font color='#000088'>+<span style="background-color: #FF0000"><CR></span>
+@ sender: <span style="background-color: #FF0000"><CR></span>
+<span style="background-color: #FF0000"><CR></span>
+@ receiver (being a unblocked reader): Got <span style="background-color: #FF0000"><CR></span>
+<span style="background-color: #FF0000"><CR></span>
+Reader opening file(2)<span style="background-color: #FF0000"><CR></span>
+<span style="background-color: #FF0000"><CR></span>
+<span style="background-color: #FF0000"><CR></span>
+Writer opening file(2)<span style="background-color: #FF0000"><CR></span>
+<span style="background-color: #FF0000"><CR></span>
+<span style="background-color: #FF0000"><CR></span>
+@ sender: SendBuffer2<span style="background-color: #FF0000"><CR></span>
+<span style="background-color: #FF0000"><CR></span>
+*** END OF FIFO / PIPE OPEN TEST - 6 ***<span style="background-color: #FF0000"><CR></span>
</font></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>
<font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-24 Bharath Suri <bharath.s.jois@gmail.com>
PR 1542/filesystem
PR 1585/filesystem
* libfs/src/pipe/fifo.c: pipe_control_t was not deallocated if
fifo_open() was attempted with (O_WRONLY|O_NONBLOCK).
Mutex was locked too many times on this path and we needed an unlock.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2456&r2=text&tr2=1.2457&diff_format=h">M</a></td><td width='1%'>1.2457</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2346.2.48&r2=text&tr2=1.2346.2.49&diff_format=h">M</a></td><td width='1%'>1.2346.2.49</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/pipe/fifo.c.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%'>cpukit/libfs/src/pipe/fifo.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/pipe/fifo.c.diff?r1=text&tr1=1.4.2.2&r2=text&tr2=1.4.2.3&diff_format=h">M</a></td><td width='1%'>1.4.2.3</td><td width='100%'>cpukit/libfs/src/pipe/fifo.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2456 rtems/cpukit/ChangeLog:1.2457
--- rtems/cpukit/ChangeLog:1.2456 Thu Jun 24 08:28:38 2010
+++ rtems/cpukit/ChangeLog Thu Jun 24 14:57:58 2010
</font><font color='#997700'>@@ -1,3 +1,11 @@
</font><font color='#000088'>+2010-06-24 Bharath Suri <bharath.s.jois@gmail.com>
+
+ PR 1542/filesystem
+ PR 1585/filesystem
+ * libfs/src/pipe/fifo.c: pipe_control_t was not deallocated if
+ fifo_open() was attempted with (O_WRONLY|O_NONBLOCK).
+ Mutex was locked too many times on this path and we needed an unlock.
+
</font> 2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1587/filesystem
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.48 rtems/cpukit/ChangeLog:1.2346.2.49
--- rtems/cpukit/ChangeLog:1.2346.2.48 Thu Jun 24 08:28:53 2010
+++ rtems/cpukit/ChangeLog Thu Jun 24 14:57:59 2010
</font><font color='#997700'>@@ -1,3 +1,11 @@
</font><font color='#000088'>+2010-06-24 Bharath Suri <bharath.s.jois@gmail.com>
+
+ PR 1542/filesystem
+ PR 1585/filesystem
+ * libfs/src/pipe/fifo.c: pipe_control_t was not deallocated if
+ fifo_open() was attempted with (O_WRONLY|O_NONBLOCK).
+ Mutex was locked too many times on this path and we needed an unlock.
+
</font> 2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1587/filesystem
<font color='#006600'>diff -u rtems/cpukit/libfs/src/pipe/fifo.c:1.8 rtems/cpukit/libfs/src/pipe/fifo.c:1.9
--- rtems/cpukit/libfs/src/pipe/fifo.c:1.8 Wed Jun 23 00:01:46 2010
+++ rtems/cpukit/libfs/src/pipe/fifo.c Thu Jun 24 14:57:58 2010
</font><font color='#997700'>@@ -104,6 +104,8 @@
</font> if (! pipe->Buffer)
goto err_buf;
<font color='#000088'>+ err = -ENOMEM;
+
</font> if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
<font color='#997700'>@@ -342,15 +344,17 @@
</font> break;
case LIBIO_FLAGS_WRITE:
<font color='#000088'>+ pipe->writerCounter ++;
+
+ if (pipe->Writers ++ == 0)
+ PIPE_WAKEUPREADERS(pipe);
+
</font> if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
<font color='#000088'>+ PIPE_UNLOCK(pipe);
</font> err = -ENXIO;
goto out_error;
}
<font color='#880000'>- pipe->writerCounter ++;
- if (pipe->Writers ++ == 0)
- PIPE_WAKEUPREADERS(pipe);
-
</font> if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/pipe/fifo.c:1.4.2.2 rtems/cpukit/libfs/src/pipe/fifo.c:1.4.2.3
--- rtems/cpukit/libfs/src/pipe/fifo.c:1.4.2.2 Wed Jun 23 00:06:34 2010
+++ rtems/cpukit/libfs/src/pipe/fifo.c Thu Jun 24 14:58:00 2010
</font><font color='#997700'>@@ -102,6 +102,7 @@
</font> if (! pipe->Buffer)
goto err_buf;
<font color='#000088'>+ err = -ENOMEM;
</font> if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
<font color='#997700'>@@ -301,15 +302,17 @@
</font> break;
case LIBIO_FLAGS_WRITE:
<font color='#000088'>+ pipe->writerCounter ++;
+
+ if (pipe->Writers ++ == 0)
+ PIPE_WAKEUPREADERS(pipe);
+
</font> if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
<font color='#000088'>+ PIPE_UNLOCK(pipe);
</font> err = -ENXIO;
goto out_error;
}
<font color='#880000'>- pipe->writerCounter ++;
- if (pipe->Writers ++ == 0)
- PIPE_WAKEUPREADERS(pipe);
-
</font> if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
</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>