<!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-09)</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-09 Bharath Suri <bharath.s.jois@gmail.com>

        PR 1610/testing
        * psx13/test.c, psx13/psx13.scn: Remove the test cases which
        exercise pipe. These are new a new test under psxpipe01/
        * psxpipe01/init.c, psxpipe01/Makefile.am,
        psxpipe01/psxpipe01.scn, psxpipe01/psxpipe01.doc: Added new test.
        * Makefile.am, configure.ac: Changes due to addition of new test:
        psxpipe01.
</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.290&r2=text&tr2=1.291&diff_format=h">M</a></td><td width='1%'>1.291</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/Makefile.am.diff?r1=text&tr1=1.65&r2=text&tr2=1.66&diff_format=h">M</a></td><td width='1%'>1.66</td><td width='100%'>testsuites/psxtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/configure.ac.diff?r1=text&tr1=1.69&r2=text&tr2=1.70&diff_format=h">M</a></td><td width='1%'>1.70</td><td width='100%'>testsuites/psxtests/configure.ac</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.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</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.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</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/psxpipe01/.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/psxtests/psxpipe01/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxpipe01/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/psxtests/psxpipe01/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxpipe01/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/psxtests/psxpipe01/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxpipe01/psxpipe01.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/psxtests/psxpipe01/psxpipe01.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxpipe01/psxpipe01.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/psxtests/psxpipe01/psxpipe01.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtests/ChangeLog:1.290 rtems/testsuites/psxtests/ChangeLog:1.291
--- rtems/testsuites/psxtests/ChangeLog:1.290   Thu Jul  8 14:37:00 2010
+++ rtems/testsuites/psxtests/ChangeLog Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -1,3 +1,13 @@
</font><font color='#000088'>+2010-07-09    Bharath Suri <bharath.s.jois@gmail.com>
+
+       PR 1610/testing
+       * psx13/test.c, psx13/psx13.scn: Remove the test cases which
+       exercise pipe. These are new a new test under psxpipe01/
+       * psxpipe01/init.c, psxpipe01/Makefile.am,
+       psxpipe01/psxpipe01.scn, psxpipe01/psxpipe01.doc: Added new test.
+       * Makefile.am, configure.ac: Changes due to addition of new test:
+       psxpipe01.
+
</font> 2010-07-08        Bharath Suri <bharath.s.jois@gmail.com>
 
        PR 1608/testing

<font color='#006600'>diff -u rtems/testsuites/psxtests/Makefile.am:1.65 rtems/testsuites/psxtests/Makefile.am:1.66
--- rtems/testsuites/psxtests/Makefile.am:1.65  Mon Jul  5 20:01:42 2010
+++ rtems/testsuites/psxtests/Makefile.am       Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -21,7 +21,7 @@
</font> ## File IO tests
 SUBDIRS += psxfile01 psxfile02 psxfilelock01 psxgetrusage01 psxid01 \
     psximfs01 psxreaddir psxstat psxmount psx13 psxchroot01 psxpasswd01 \
<font color='#880000'>-    psxpasswd02 psxtimes01
</font><font color='#000088'>+    psxpasswd02 psxpipe01 psxtimes01
</font> 
 ## Until sys/uio.h is moved to libcsupport, we have to have networking
 ## enabled to support readv and writev.  Hopefully this is a temporary

<font color='#006600'>diff -u rtems/testsuites/psxtests/configure.ac:1.69 rtems/testsuites/psxtests/configure.ac:1.70
--- rtems/testsuites/psxtests/configure.ac:1.69 Mon Jul  5 20:01:42 2010
+++ rtems/testsuites/psxtests/configure.ac      Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -107,6 +107,7 @@
</font> psxobj01/Makefile
 psxpasswd01/Makefile
 psxpasswd02/Makefile
<font color='#000088'>+psxpipe01/Makefile
</font> psxreaddir/Makefile
 psxrdwrv/Makefile
 psxrwlock01/Makefile

<font color='#006600'>diff -u rtems/testsuites/psxtests/psx13/psx13.scn:1.7 rtems/testsuites/psxtests/psx13/psx13.scn:1.8
--- rtems/testsuites/psxtests/psx13/psx13.scn:1.7       Thu Jul  1 12:23:47 2010
+++ rtems/testsuites/psxtests/psx13/psx13.scn   Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -1,18 +1,17 @@
</font><font color='#880000'>-*** POSIX TEST 13 ***
</font><font color='#000088'>+
+** POSIX TEST 13 ***
</font> 
 Files initialized successfully.
<font color='#880000'>-Testing device_lseek()... Success.
-Testing dup()............ Success. ( Add when dup flags resolved )
-Testing dup2()........... Success.
</font><font color='#000088'>+Testing device_lseek()... Failed!!!
+Testing dup()............ Failed!!!
+Testing dup2()........... Failed!!!
</font> Testing fdatasync()...... Success.
 Testing umask().......... Success.
 Testing utime().......... Success.
 Testing utimes().......... Success.
<font color='#880000'>-Testing pipe()........... Success.
-Testing pipe() with NULL........... Failed!!!
</font> Testing fsync().......... Success.
 Testing pathconf()....... Success.
 Testing fpathconf()...... Success.
<font color='#880000'>-
</font><font color='#000088'>+Testing sync()......<span style="background-color: #FF0000"> </span>
</font> 
 *** END OF TEST PSX13 ***

<font color='#006600'>diff -u rtems/testsuites/psxtests/psx13/test.c:1.15 rtems/testsuites/psxtests/psx13/test.c:1.16
--- rtems/testsuites/psxtests/psx13/test.c:1.15 Fri Jul  2 13:51:48 2010
+++ rtems/testsuites/psxtests/psx13/test.c      Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -11,7 +11,6 @@
</font>  *     fsync        - test implemented
  *     pathconf     - test implemented
  *     fpathconf    - test implemented
<font color='#880000'>- *     pipe         - test implemented
</font>  *     umask        - test implemented
  *     utime        - test implemented
  *     utimes       - test implemented
<font color='#997700'>@@ -46,8 +45,6 @@
</font> int UMaskTest(void);
 int UTimeTest(void);
 int UTimesTest(void);
<font color='#880000'>-int PipeTest(void);
-int PipeTestNull(void);
</font> int PathConfTest(void);
 int FPathConfTest(void);
 int FSyncTest(void);
<font color='#997700'>@@ -489,52 +486,6 @@
</font> }
 
 /* ---------------------------------------------------------------
<font color='#880000'>- * PipeTest function
- *
- * Hits the pipe code.
- *
- * arguments: none
- * assumptions: pipe function available.
- * actions: call pipe.
- *
- * returns: TRUE if pipe returns ENOSYS,
- *          FALSE otherwise.
- *
- * ---------------------------------------------------------------
- */
-
-int PipeTest (void)
-{
-  int error = 0, retval = FALSE;
-  int fd[2];
-
-  error = pipe(fd);
-
-  if ((error == -1) && (errno == ENOSYS))
-    retval = TRUE;
-  else
-    retval = FALSE;
-
-  /* assert (retval == TRUE);*/
-
-  return(retval);
-}
-
-int PipeTestNull (void)
-{
-  int error = 0, retval = FALSE;
-
-  error = pipe(NULL);
-
-  if ((error == -1) && (errno == ENOSYS))
-    retval = TRUE;
-  else
-    retval = FALSE;
-
-  return(retval);
-}
-
-/* ---------------------------------------------------------------
</font>  * PathConfTest function
  *
  * Hits the pathconf code.
<font color='#997700'>@@ -731,18 +682,6 @@
</font>     else
       printf ("Failed!!!\n");
 
<font color='#880000'>-   printf ("Testing pipe()........... ");
-    if (PipeTest() == TRUE)
-      printf ("Success.\n");
-    else
-      printf ("Failed!!!\n");
-
-   printf ("Testing pipe() with NULL........... ");
-    if (PipeTestNull() == TRUE)
-      printf ("Success.\n");
-    else
-      printf ("Failed!!!\n");
-
</font>    printf ("Testing fsync().......... ");
     if (FSyncTest() == TRUE)
       printf ("Success.\n");

<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxpipe01/.cvsignore:1.1
--- /dev/null   Fri Jul  9 17:11:11 2010
+++ rtems/testsuites/psxtests/psxpipe01/.cvsignore      Fri Jul  9 17:07:11 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/psxtests/psxpipe01/Makefile.am:1.1
--- /dev/null   Fri Jul  9 17:11:11 2010
+++ rtems/testsuites/psxtests/psxpipe01/Makefile.am     Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -0,0 +1,27 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxpipe01
+psxpipe01_SOURCES = init.c ../include/pmacros.h
+
+dist_rtems_tests_DATA = psxpipe01.scn
+
+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)/include
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxpipe01_OBJECTS) $(psxpipe01_LDADD)
+LINK_LIBS = $(psxpipe01_LDLIBS)
+
+psxpipe01$(EXEEXT): $(psxpipe01_OBJECTS) $(psxpipe01_DEPENDENCIES)
+       @rm -f psxpipe01$(EXEEXT)
+       $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxpipe01/init.c:1.1
--- /dev/null   Fri Jul  9 17:11:11 2010
+++ rtems/testsuites/psxtests/psxpipe01/init.c  Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -0,0 +1,113 @@
</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 <bsp.h>
+#include <pmacros.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <rtems/score/heap.h>
+
+extern Heap_Control  *RTEMS_Malloc_Heap;
+
+rtems_task Init(
+  rtems_task_argument not_used
+)
+{
+  int fd[2] = {0};
+  int dummy_fd[2] = {0};
+  int status = 0;
+  void *alloc_ptr = (void *)0;
+  Heap_Information_block Info;
+
+  puts( "*** TEST POSIX PIPE CREATION - 01 ***" );
+
+  puts( "Init - attempt to create pipe -- expect EFAULT" );
+  status = pipe( NULL );
+  rtems_test_assert( status == -1 );
+  rtems_test_assert( errno == EFAULT );
+
+  puts( "Init - create pipe -- OK" );
+  status = pipe( fd );
+  rtems_test_assert( status == 0 );
+
+  status = close( fd[0] );
+  status |= close( fd[1] );
+  rtems_test_assert( status == 0 );
+
+  puts( "Init - create pipe -- OK" );
+  status = pipe( fd );
+  rtems_test_assert( status == 0 );
+
+  status = close( fd[0] );
+  status |= close( fd[1] );
+  rtems_test_assert( status == 0 );
+
+  _Heap_Get_information(RTEMS_Malloc_Heap, &Info);
+  alloc_ptr = malloc(Info.Free.largest-4);
+
+  /* case where mkfifo fails */
+  puts( "Init - attempt to create pipe -- expect ENOMEM" );
+  status = pipe( fd );
+  rtems_test_assert( status == -1 );
+  rtems_test_assert( errno == ENOMEM );
+
+  free( alloc_ptr );
+<span style="background-color: #FF0000">  </span>
+  dummy_fd[0] = open( "/file01", O_RDONLY | O_CREAT, S_IRWXU );
+  rtems_test_assert( dummy_fd[0] != -1 );
+  dummy_fd[1] = open( "/file02", O_RDONLY | O_CREAT, S_IRWXU );
+  rtems_test_assert( dummy_fd[1] != -1 );
+
+  /* case where fifo_open for read => open fails */
+  puts( "Init - create pipe -- expect ENFILE" );
+  status = pipe( fd );
+  rtems_test_assert( status == -1 );
+  rtems_test_assert( errno == ENFILE );
+
+  status = close( dummy_fd[1] );
+  status |= unlink( "/file02" );
+  rtems_test_assert( status == 0 );
+
+  /* case where fifo_open for write => open fails */
+  puts( "Init - create pipe -- expect ENFILE" );
+  status = pipe( fd );
+  rtems_test_assert( status == -1 );
+  rtems_test_assert( errno == ENFILE );
+
+  status = close( dummy_fd[0] );
+  status |= unlink( "/file01" );
+  rtems_test_assert( status == 0 );
+
+  puts( "*** END OF TEST POSIX PIPE CREATION - 01 ***" );
+  rtems_test_exit( 0 );
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_PIPES_ENABLED
+#define CONFIGURE_MAXIMUM_PIPES 2
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxpipe01/psxpipe01.doc:1.1
--- /dev/null   Fri Jul  9 17:11:11 2010
+++ rtems/testsuites/psxtests/psxpipe01/psxpipe01.doc   Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -0,0 +1,24 @@
</font><font color='#000088'>+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2009.
+#  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:  POSIX PIPE CREATION TEST
+
+directives:
+
++ pipe
++ pipe_create
+
+concepts:
+
++ Exercise the posix pipe creation routines, including the error paths
+
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxpipe01/psxpipe01.scn:1.1
--- /dev/null   Fri Jul  9 17:11:11 2010
+++ rtems/testsuites/psxtests/psxpipe01/psxpipe01.scn   Fri Jul  9 17:07:11 2010
</font><font color='#997700'>@@ -0,0 +1,8 @@
</font><font color='#000088'>+*** TEST POSIX PIPE CREATION - 01 ***
+Init - attempt to create pipe -- expect EFAULT
+Init - create pipe -- OK
+Init - create pipe -- OK
+Init - attempt to create pipe -- expect ENOMEM
+Init - create pipe -- expect ENFILE
+Init - create pipe -- expect ENFILE
+*** END OF TEST POSIX PIPE CREATION - 01 ***
</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>