change log for rtems (2010-07-08)

rtems-vc at rtems.org rtems-vc at rtems.org
Thu Jul 8 20:12:17 UTC 2010


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

	PR 1608/testing
	* psxfile01/init.c: Add a simple test case: Open file as read-only
	and attemp to truncate. Improves coverage.

M  1.290  testsuites/psxtests/ChangeLog
M   1.11  testsuites/psxtests/psxfile01/psxfile01.scn
M   1.26  testsuites/psxtests/psxfile01/test.c

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
@@ -1,3 +1,9 @@
+2010-07-08	Bharath Suri <bharath.s.jois at gmail.com>
+
+	PR 1608/testing
+	* psxfile01/init.c: Add a simple test case: Open file as read-only
+	and attemp to truncate. Improves coverage.
+
 2010-07-07	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	PR 1606/cpukit

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
@@ -1,12 +1,9 @@
-sparc-rtems4.11-run is /opt/rtems-4.11/bin/sparc-rtems4.11-run
-
 
 *** FILE TEST 1 ***
 *************** Dump of Entire IMFS ***************
 /
 ....dev/
 ........console (device 0, 0)
-........console_b (device 0, 1)
 ***************       End of Dump        ***************
 stat of /dev/console
 ....st_dev     (0xfffe:0x0)
@@ -51,6 +48,7 @@
 Attempt to recreate /tmp/tom
 create /tmp/john
 tcdrain /tmp/john
+Attempt to create a file, open in read-only mode and truncate it
 mknod /tmp/joel
 (0)the first write!!!
 
@@ -168,9 +166,8 @@
 /
 ....dev/
 ........console (device 0, 0)
-........console_b (device 0, 1)
 ........tty/
-............S3 (device 255, 128)
+............S3 (device 128, 255)
 ........test_console (device 0, 0)
 ....etc/
 ........passwd (file 0)
@@ -199,9 +196,8 @@
 /
 ....dev/
 ........console (device 0, 0)
-........console_b (device 0, 1)
 ........tty/
-............S3 (device 255, 128)
+............S3 (device 128, 255)
 ........test_console (device 0, 0)
 ....etc/
 ........passwd (file 0)
@@ -221,9 +217,8 @@
 /
 ....dev/
 ........console (device 0, 0)
-........console_b (device 0, 1)
 ........tty/
-............S3 (device 255, 128)
+............S3 (device 128, 255)
 ........test_console (device 0, 0)
 ....etc/
 ........passwd (file 0)

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
@@ -329,6 +329,18 @@
   status = tcdrain( fd );
   rtems_test_assert( status == 0 );
 
+  /* 
+   * 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 );
+
   /*
    *  Test simple write to a file at offset 0
    */


 *joel*:
2010-07-08	Joel Sherrill <joel.sherrill at 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.

M  1.399  testsuites/sptests/ChangeLog
M   1.99  testsuites/sptests/Makefile.am
M  1.104  testsuites/sptests/configure.ac
M    1.3  testsuites/sptests/spfatal09/.cvsignore
M    1.5  testsuites/sptests/spfatal09/Makefile.am
M    1.3  testsuites/sptests/spfatal09/spfatal09.doc
M    1.4  testsuites/sptests/spfatal09/spfatal09.scn
M    1.7  testsuites/sptests/spfatal09/testcase.h

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
@@ -1,3 +1,10 @@
+2010-07-08	Joel Sherrill <joel.sherrill at 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.
+
 2010-07-07	Bharath Suri <bharath.s.jois at gmail.com>
 
 	PR 1603/testing

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
@@ -20,7 +20,7 @@
     spwatchdog spwkspace \
     sperror01 sperror02 sperror03 \
     spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
-    spfatal08 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
+    spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
     spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
     spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
     spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \

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
@@ -112,6 +112,7 @@
 spfatal06/Makefile
 spfatal07/Makefile
 spfatal08/Makefile
+spfatal09/Makefile
 spfatal10/Makefile
 spfatal11/Makefile
 spfatal12/Makefile

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
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

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
@@ -0,0 +1,25 @@
+##
+## $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 at .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

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
@@ -0,0 +1,22 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  spfatal09
+
+directives:
+
+  RTEMS_Malloc_Initialize
+
+concepts:
+
++ fatal error for heap initialization failing

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
@@ -0,0 +1,4 @@
+*** TEST FATAL 9 ***
+Fatal error (Bad heap address to malloc) hit
+*** END OF TEST ***
+

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
@@ -0,0 +1,30 @@
+/*
+ *  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 */
+}


 *joel*:
2010-07-08	Joel Sherrill <joel.sherrill at oarcorp.com>

	* libcsupport/src/malloc_initialize.c: Clean up sbrk path now that a
	test is available.

M 1.2495  cpukit/ChangeLog
M   1.13  cpukit/libcsupport/src/malloc_initialize.c

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
@@ -1,3 +1,8 @@
+2010-07-08	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* libcsupport/src/malloc_initialize.c: Clean up sbrk path now that a
+	test is available.
+
 2010-07-07	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* libcsupport/src/open.c: Formatting and improve comment.

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
@@ -45,7 +45,7 @@
 {
   /*
    *  If configured, initialize the statistics support
-   */
+  */
   if ( rtems_malloc_statistics_helpers != NULL ) {
     (*rtems_malloc_statistics_helpers->initialize)();
   }
@@ -59,13 +59,11 @@
    *  Initialize the optional sbrk support for extending the heap
    */
   if ( rtems_malloc_sbrk_helpers != NULL ) {
-    void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
+    heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
       heap_begin,
       sbrk_amount
     );
-
-    heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
-    heap_begin = new_heap_begin;
+    heap_size  = (uintptr_t) sbrk_amount;
   }
 
   /*



--

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


More information about the vc mailing list