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

        PR 1608/testing
        * psxfile01/init.c: Add a simple test case: Open file as read-only
        and attemp to truncate. Improves coverage.
</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.289&r2=text&tr2=1.290&diff_format=h">M</a></td><td width='1%'>1.290</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/psxfile01/psxfile01.scn.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</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.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>testsuites/psxtests/psxfile01/test.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtests/ChangeLog:1.289 rtems/testsuites/psxtests/ChangeLog:1.290
--- rtems/testsuites/psxtests/ChangeLog:1.289   Wed Jul  7 09:07:26 2010
+++ rtems/testsuites/psxtests/ChangeLog Thu Jul  8 14:37:00 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-07-08    Bharath Suri <bharath.s.jois@gmail.com>
+
+       PR 1608/testing
+       * psxfile01/init.c: Add a simple test case: Open file as read-only
+       and attemp to truncate. Improves coverage.
+
</font> 2010-07-07        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        PR 1606/cpukit

<font color='#006600'>diff -u rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.10 rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.11
--- rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.10      Thu Jul  1 16:15:07 2010
+++ rtems/testsuites/psxtests/psxfile01/psxfile01.scn   Thu Jul  8 14:37:00 2010
</font><font color='#997700'>@@ -1,12 +1,9 @@
</font><font color='#880000'>-sparc-rtems4.11-run is /opt/rtems-4.11/bin/sparc-rtems4.11-run
-
</font> 
 *** FILE TEST 1 ***
 *************** Dump of Entire IMFS ***************
 /
 ....dev/
 ........console (device 0, 0)
<font color='#880000'>-........console_b (device 0, 1)
</font> ***************       End of Dump        ***************
 stat of /dev/console
 ....st_dev     (0xfffe:0x0)
<font color='#997700'>@@ -51,6 +48,7 @@
</font> Attempt to recreate /tmp/tom
 create /tmp/john
 tcdrain /tmp/john
<font color='#000088'>+Attempt to create a file, open in read-only mode and truncate it
</font> mknod /tmp/joel
 (0)the first write!!!
 
<font color='#997700'>@@ -168,9 +166,8 @@
</font> /
 ....dev/
 ........console (device 0, 0)
<font color='#880000'>-........console_b (device 0, 1)
</font> ........tty/
<font color='#880000'>-............S3 (device 255, 128)
</font><font color='#000088'>+............S3 (device 128, 255)
</font> ........test_console (device 0, 0)
 ....etc/
 ........passwd (file 0)
<font color='#997700'>@@ -199,9 +196,8 @@
</font> /
 ....dev/
 ........console (device 0, 0)
<font color='#880000'>-........console_b (device 0, 1)
</font> ........tty/
<font color='#880000'>-............S3 (device 255, 128)
</font><font color='#000088'>+............S3 (device 128, 255)
</font> ........test_console (device 0, 0)
 ....etc/
 ........passwd (file 0)
<font color='#997700'>@@ -221,9 +217,8 @@
</font> /
 ....dev/
 ........console (device 0, 0)
<font color='#880000'>-........console_b (device 0, 1)
</font> ........tty/
<font color='#880000'>-............S3 (device 255, 128)
</font><font color='#000088'>+............S3 (device 128, 255)
</font> ........test_console (device 0, 0)
 ....etc/
 ........passwd (file 0)

<font color='#006600'>diff -u rtems/testsuites/psxtests/psxfile01/test.c:1.25 rtems/testsuites/psxtests/psxfile01/test.c:1.26
--- rtems/testsuites/psxtests/psxfile01/test.c:1.25     Thu Jul  1 16:15:07 2010
+++ rtems/testsuites/psxtests/psxfile01/test.c  Thu Jul  8 14:37:01 2010
</font><font color='#997700'>@@ -329,6 +329,18 @@
</font>   status = tcdrain( fd );
   rtems_test_assert( status == 0 );
 
<font color='#000088'>+  /*<span style="background-color: #FF0000"> </span>
+   * Open a file in read-only mode and try to truncate
+   */
+
+  puts( "Attempt to create a file, open in read-only mode and truncate it" );
+  fd = open( "/tmp/bha", O_CREAT | O_RDONLY | O_TRUNC, S_IRUSR );
+  rtems_test_assert( fd == -1 );
+  rtems_test_assert( errno == EINVAL );
+
+  status = unlink( "/tmp/bha" );
+  rtems_test_assert( status == 0 );
+
</font>   /*
    *  Test simple write to a file at offset 0
    */
</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-08 Joel Sherrill <joel.sherrill@oarcorp.com>

        * Makefile.am, configure.ac: Readd spfatal09 as a malloc initialization
        fatal error.
        * spfatal09/.cvsignore, spfatal09/Makefile.am, spfatal09/spfatal09.doc,
        spfatal09/spfatal09.scn, spfatal09/testcase.h: New files.
</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.398&r2=text&tr2=1.399&diff_format=h">M</a></td><td width='1%'>1.399</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.98&r2=text&tr2=1.99&diff_format=h">M</a></td><td width='1%'>1.99</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.103&r2=text&tr2=1.104&diff_format=h">M</a></td><td width='1%'>1.104</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/spfatal09/.cvsignore.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/spfatal09/.cvsignore</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfatal09/Makefile.am.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>testsuites/sptests/spfatal09/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfatal09/spfatal09.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/spfatal09/spfatal09.doc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfatal09/spfatal09.scn.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/spfatal09/spfatal09.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfatal09/testcase.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>testsuites/sptests/spfatal09/testcase.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/sptests/ChangeLog:1.398 rtems/testsuites/sptests/ChangeLog:1.399
--- rtems/testsuites/sptests/ChangeLog:1.398    Wed Jul  7 09:16:54 2010
+++ rtems/testsuites/sptests/ChangeLog  Thu Jul  8 14:39:11 2010
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2010-07-08    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * Makefile.am, configure.ac: Readd spfatal09 as a malloc initialization
+       fatal error.
+       * spfatal09/.cvsignore, spfatal09/Makefile.am, spfatal09/spfatal09.doc,
+       spfatal09/spfatal09.scn, spfatal09/testcase.h: New files.
+
</font> 2010-07-07        Bharath Suri <bharath.s.jois@gmail.com>
 
        PR 1603/testing

<font color='#006600'>diff -u rtems/testsuites/sptests/Makefile.am:1.98 rtems/testsuites/sptests/Makefile.am:1.99
--- rtems/testsuites/sptests/Makefile.am:1.98   Wed Jul  7 09:16:54 2010
+++ rtems/testsuites/sptests/Makefile.am        Thu Jul  8 14:39:11 2010
</font><font color='#997700'>@@ -20,7 +20,7 @@
</font>     spwatchdog spwkspace \
     sperror01 sperror02 sperror03 \
     spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
<font color='#880000'>-    spfatal08 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
</font><font color='#000088'>+    spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
</font>     spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
     spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
     spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \

<font color='#006600'>diff -u rtems/testsuites/sptests/configure.ac:1.103 rtems/testsuites/sptests/configure.ac:1.104
--- rtems/testsuites/sptests/configure.ac:1.103 Wed Jul  7 09:16:54 2010
+++ rtems/testsuites/sptests/configure.ac       Thu Jul  8 14:39:12 2010
</font><font color='#997700'>@@ -112,6 +112,7 @@
</font> spfatal06/Makefile
 spfatal07/Makefile
 spfatal08/Makefile
<font color='#000088'>+spfatal09/Makefile
</font> spfatal10/Makefile
 spfatal11/Makefile
 spfatal12/Makefile

<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfatal09/.cvsignore:1.3
--- /dev/null   Thu Jul  8 15:12:15 2010
+++ rtems/testsuites/sptests/spfatal09/.cvsignore       Thu Jul  8 14:39:12 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/sptests/spfatal09/Makefile.am:1.5
--- /dev/null   Thu Jul  8 15:12:15 2010
+++ rtems/testsuites/sptests/spfatal09/Makefile.am      Thu Jul  8 14:39:12 2010
</font><font color='#997700'>@@ -0,0 +1,25 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+rtems_tests_PROGRAMS = spfatal09
+spfatal09_SOURCES = ../spfatal_support/init.c ../spfatal_support/system.h \
+    testcase.h
+
+dist_rtems_tests_DATA = spfatal09.scn
+dist_rtems_tests_DATA += spfatal09.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 = $(spfatal09_OBJECTS) $(spfatal09_LDADD)
+LINK_LIBS = $(spfatal09_LDLIBS)
+
+spfatal09$(EXEEXT): $(spfatal09_OBJECTS) $(spfatal09_DEPENDENCIES)
+       @rm -f spfatal09$(EXEEXT)
+       $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfatal09/spfatal09.doc:1.3
--- /dev/null   Thu Jul  8 15:12:15 2010
+++ rtems/testsuites/sptests/spfatal09/spfatal09.doc    Thu Jul  8 14:39:13 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:  spfatal09
+
+directives:
+
+  RTEMS_Malloc_Initialize
+
+concepts:
+
++ fatal error for heap initialization failing
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfatal09/spfatal09.scn:1.4
--- /dev/null   Thu Jul  8 15:12:16 2010
+++ rtems/testsuites/sptests/spfatal09/spfatal09.scn    Thu Jul  8 14:39:13 2010
</font><font color='#997700'>@@ -0,0 +1,4 @@
</font><font color='#000088'>+*** TEST FATAL 9 ***
+Fatal error (Bad heap address to malloc) hit
+*** END OF TEST ***
+
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfatal09/testcase.h:1.7
--- /dev/null   Thu Jul  8 15:12:16 2010
+++ rtems/testsuites/sptests/spfatal09/testcase.h       Thu Jul  8 14:39:14 2010
</font><font color='#997700'>@@ -0,0 +1,30 @@
</font><font color='#000088'>+/*
+ *  Malloc Initialization Error
+ *
+ *  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 <rtems/malloc.h>
+#include <rtems/libcsupport.h>
+
+#define FATAL_ERROR_TEST_NAME            "9"
+#define FATAL_ERROR_DESCRIPTION          "Bad heap address to malloc"
+#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR       RTEMS_NO_MEMORY
+
+char Malloc_Heap[ 1 ] CPU_STRUCTURE_ALIGNMENT;
+
+void force_error()
+{
+  RTEMS_Malloc_Initialize( Malloc_Heap, sizeof(Malloc_Heap), 0 );
+
+  /* we will not run this far */
+}
</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-08 Joel Sherrill <joel.sherrill@oarcorp.com>

        * libcsupport/src/malloc_initialize.c: Clean up sbrk path now that a
        test is available.
</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.2494&r2=text&tr2=1.2495&diff_format=h">M</a></td><td width='1%'>1.2495</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/malloc_initialize.c.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%'>cpukit/libcsupport/src/malloc_initialize.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2494 rtems/cpukit/ChangeLog:1.2495
--- rtems/cpukit/ChangeLog:1.2494       Wed Jul  7 10:55:20 2010
+++ rtems/cpukit/ChangeLog      Thu Jul  8 15:09:56 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-07-08    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libcsupport/src/malloc_initialize.c: Clean up sbrk path now that a
+       test is available.
+
</font> 2010-07-07        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * libcsupport/src/open.c: Formatting and improve comment.

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/malloc_initialize.c:1.12 rtems/cpukit/libcsupport/src/malloc_initialize.c:1.13
--- rtems/cpukit/libcsupport/src/malloc_initialize.c:1.12       Wed Jun 30 10:36:48 2010
+++ rtems/cpukit/libcsupport/src/malloc_initialize.c    Thu Jul  8 15:09:56 2010
</font><font color='#997700'>@@ -45,7 +45,7 @@
</font> {
   /*
    *  If configured, initialize the statistics support
<font color='#880000'>-   */
</font><font color='#000088'>+  */
</font>   if ( rtems_malloc_statistics_helpers != NULL ) {
     (*rtems_malloc_statistics_helpers->initialize)();
   }
<font color='#997700'>@@ -59,13 +59,11 @@
</font>    *  Initialize the optional sbrk support for extending the heap
    */
   if ( rtems_malloc_sbrk_helpers != NULL ) {
<font color='#880000'>-    void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
</font><font color='#000088'>+    heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
</font>       heap_begin,
       sbrk_amount
     );
<font color='#880000'>-
-    heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
-    heap_begin = new_heap_begin;
</font><font color='#000088'>+    heap_size  = (uintptr_t) sbrk_amount;
</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>