change log for rtems (2010-07-15)
rtems-vc at rtems.org
rtems-vc at rtems.org
Thu Jul 15 14:10:16 UTC 2010
*sh*:
2010-07-15 Sebastian Huber <sebastian.huber at embedded-brains.de>
* malloctest/init.c: Added test for
rtems_heap_allocate_aligned_with_boundary().
M 1.206 testsuites/libtests/ChangeLog
M 1.41 testsuites/libtests/malloctest/init.c
diff -u rtems/testsuites/libtests/ChangeLog:1.205 rtems/testsuites/libtests/ChangeLog:1.206
--- rtems/testsuites/libtests/ChangeLog:1.205 Wed Jul 14 18:53:49 2010
+++ rtems/testsuites/libtests/ChangeLog Thu Jul 15 08:36:25 2010
@@ -1,3 +1,8 @@
+2010-07-15 Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+ * malloctest/init.c: Added test for
+ rtems_heap_allocate_aligned_with_boundary().
+
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile.am, configure.ac: Add new test to exercise devFS_Show().
diff -u rtems/testsuites/libtests/malloctest/init.c:1.40 rtems/testsuites/libtests/malloctest/init.c:1.41
--- rtems/testsuites/libtests/malloctest/init.c:1.40 Mon Jun 28 12:05:25 2010
+++ rtems/testsuites/libtests/malloctest/init.c Thu Jul 15 08:36:25 2010
@@ -14,7 +14,7 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2009 embedded brains GmbH.
+ * Copyright (c) 2009, 2010 embedded brains GmbH.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -1023,6 +1023,20 @@
rtems_test_assert( rc == false );
}
+static void test_rtems_heap_allocate_aligned_with_boundary(void)
+{
+ void *p = NULL;
+
+ p = rtems_heap_allocate_aligned_with_boundary(1, 1, 1);
+ rtems_test_assert( p != NULL );
+ free(p);
+
+ _Thread_Disable_dispatch();
+ p = rtems_heap_allocate_aligned_with_boundary(1, 1, 1);
+ _Thread_Enable_dispatch();
+ rtems_test_assert( p == NULL );
+}
+
/*
* A simple test of posix_memalign
*/
@@ -1108,6 +1122,7 @@
test_heap_extend();
test_heap_info();
test_protected_heap_info();
+ test_rtems_heap_allocate_aligned_with_boundary();
test_posix_memalign();
*joel*:
2010-07-15 Bharath Suri <bharath.s.jois at gmail.com>
PR 1617/testing
* spmountmgr01/init.c, spmountmgr01/Makefile.am,
spmountmgr/.cvsignore, spmountmgr01/spmountmgr01.doc,
spmountmgr01/spmountmgr01.scn: New test which improves coverage
of mount-mgr.c under libcsupport.
* Makefile.am, configure.ac: Changes to accommodate the new test.
M 1.404 testsuites/sptests/ChangeLog
M 1.101 testsuites/sptests/Makefile.am
M 1.106 testsuites/sptests/configure.ac
A 1.1 testsuites/sptests/spmountmgr01/.cvsignore
A 1.1 testsuites/sptests/spmountmgr01/Makefile.am
A 1.1 testsuites/sptests/spmountmgr01/init.c
A 1.1 testsuites/sptests/spmountmgr01/spmountmgr01.doc
A 1.1 testsuites/sptests/spmountmgr01/spmountmgr01.scn
diff -u rtems/testsuites/sptests/ChangeLog:1.403 rtems/testsuites/sptests/ChangeLog:1.404
--- rtems/testsuites/sptests/ChangeLog:1.403 Wed Jul 14 18:17:48 2010
+++ rtems/testsuites/sptests/ChangeLog Thu Jul 15 08:53:27 2010
@@ -1,3 +1,12 @@
+2010-07-15 Bharath Suri <bharath.s.jois at gmail.com>
+
+ PR 1617/testing
+ * spmountmgr01/init.c, spmountmgr01/Makefile.am,
+ spmountmgr/.cvsignore, spmountmgr01/spmountmgr01.doc,
+ spmountmgr01/spmountmgr01.scn: New test which improves coverage
+ of mount-mgr.c under libcsupport.
+ * Makefile.am, configure.ac: Changes to accommodate the new test.
+
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
* spprintk/init.c, spprintk/spprintk.doc, spprintk/spprintk.scn: Clean
diff -u rtems/testsuites/sptests/Makefile.am:1.100 rtems/testsuites/sptests/Makefile.am:1.101
--- rtems/testsuites/sptests/Makefile.am:1.100 Wed Jul 14 11:02:40 2010
+++ rtems/testsuites/sptests/Makefile.am Thu Jul 15 08:53:27 2010
@@ -28,7 +28,7 @@
spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
spintrcritical09 spintrcritical10 spintrcritical11 spintrcritical12 \
spintrcritical13 spintrcritical14 spintrcritical15 spintrcritical16 \
- spintrcritical17 spmkdir
+ spintrcritical17 spmkdir spmountmgr01
DIST_SUBDIRS = $(SUBDIRS) spfatal_support spintrcritical_support
EXTRA_DIST = spfatal_support/init.c spfatal_support/system.h
diff -u rtems/testsuites/sptests/configure.ac:1.105 rtems/testsuites/sptests/configure.ac:1.106
--- rtems/testsuites/sptests/configure.ac:1.105 Wed Jul 14 11:02:40 2010
+++ rtems/testsuites/sptests/configure.ac Thu Jul 15 08:53:27 2010
@@ -149,6 +149,7 @@
spintrcritical16/Makefile
spintrcritical17/Makefile
spmkdir/Makefile
+spmountmgr01/Makefile
spnotepad01/Makefile
spobjgetnext/Makefile
spprintk/Makefile
diff -u /dev/null rtems/testsuites/sptests/spmountmgr01/.cvsignore:1.1
--- /dev/null Thu Jul 15 09:10:15 2010
+++ rtems/testsuites/sptests/spmountmgr01/.cvsignore Thu Jul 15 08:53:27 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/sptests/spmountmgr01/Makefile.am:1.1
--- /dev/null Thu Jul 15 09:10:15 2010
+++ rtems/testsuites/sptests/spmountmgr01/Makefile.am Thu Jul 15 08:53:28 2010
@@ -0,0 +1,26 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spmountmgr01
+spmountmgr01_SOURCES = init.c
+
+dist_rtems_tests_DATA = spmountmgr01.scn
+dist_rtems_tests_DATA += spmountmgr01.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 = $(spmountmgr01_OBJECTS) $(spmountmgr01_LDADD)
+LINK_LIBS = $(spmountmgr01_LDLIBS)
+
+spmountmgr01$(EXEEXT): $(spmountmgr01_OBJECTS) $(spmountmgr01_DEPENDENCIES)
+ @rm -f spmountmgr01$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff -u /dev/null rtems/testsuites/sptests/spmountmgr01/init.c:1.1
--- /dev/null Thu Jul 15 09:10:15 2010
+++ rtems/testsuites/sptests/spmountmgr01/init.c Thu Jul 15 08:53:28 2010
@@ -0,0 +1,105 @@
+/*
+ * 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/score/heap.h>
+#include <errno.h>
+#include <rtems/libio_.h>
+
+extern Heap_Control *RTEMS_Malloc_Heap;
+
+int fs_mount( rtems_filesystem_mount_table_entry_t *mt_entry,
+ const void *data )
+{
+ return 0;
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ int status = 0;
+ void *alloc_ptr = (void *)0;
+ Heap_Information_block Info;
+
+ puts( "\n\n*** TEST MOUNT MANAGER ROUTINE - 01 ***" );
+
+ puts( "Init - allocating most of heap -- OK" );
+ _Heap_Get_information(RTEMS_Malloc_Heap, &Info);
+ alloc_ptr = malloc( Info.Free.largest - 4 );
+ rtems_test_assert( alloc_ptr != NULL );
+
+ puts( "Init - attempt to register filesystem fs - expect ENOMEM" );
+ status = rtems_filesystem_register( "fs", fs_mount );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOMEM );
+
+ puts( "Init - freeing allocated memory -- OK" );
+ free( alloc_ptr );
+
+ puts( "Init - register filesystem fs -- OK" );
+ status = rtems_filesystem_register( "fs", fs_mount );
+ rtems_test_assert( status == 0 );
+
+ puts( "Init - register filesystem fs - expect EINVAL" );
+ status = rtems_filesystem_register( "fs", fs_mount );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "Init - register filesystem bfs -- OK" );
+ status = rtems_filesystem_register( "bfs", fs_mount );
+ rtems_test_assert( status == 0 );
+
+ puts( "Init - register filesystem bfs - expect EINVAL" );
+ status = rtems_filesystem_register( "bfs", fs_mount );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "Init - attempt to unregister with bad args - expect EINVAL" );
+ status = rtems_filesystem_unregister( NULL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "Init - attempt to unregister fs -- OK" );
+ status = rtems_filesystem_unregister( "fs" );
+ rtems_test_assert( status == 0 );
+
+ puts( "Init - attempt to unregister fs again - expect ENOENT" );
+ status = rtems_filesystem_unregister( "fs" );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOENT );
+
+ puts( "Init - attempt to unregister bfs -- OK" );
+ status = rtems_filesystem_unregister( "bfs" );
+ rtems_test_assert( status == 0 );
+
+ puts( "Init - attempt to unregister bfs again - expect ENOENT" );
+ status = rtems_filesystem_unregister( "bfs" );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOENT );
+
+ puts( "*** END OF TEST MOUNT MANAGER ROUTINE - 01 ***" );
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
diff -u /dev/null rtems/testsuites/sptests/spmountmgr01/spmountmgr01.doc:1.1
--- /dev/null Thu Jul 15 09:10:15 2010
+++ rtems/testsuites/sptests/spmountmgr01/spmountmgr01.doc Thu Jul 15 08:53:28 2010
@@ -0,0 +1,25 @@
+#
+# $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: spmountmgr01
+
+directives:
+
++ rtems_filesystem_register
++ rtems_filesystem_unregister
+
+concepts:
+
++ Exercise the routines of mount-mgr.c under libcsupport.
++ These routines are mostly to register / unregister new filesytem
+ for later use.
diff -u /dev/null rtems/testsuites/sptests/spmountmgr01/spmountmgr01.scn:1.1
--- /dev/null Thu Jul 15 09:10:15 2010
+++ rtems/testsuites/sptests/spmountmgr01/spmountmgr01.scn Thu Jul 15 08:53:28 2010
@@ -0,0 +1,14 @@
+*** TEST MOUNT MANAGER ROUTINE - 01 ***
+Init - allocating most of heap -- OK
+Init - attempt to register filesystem fs - expect ENOMEM
+Init - freeing allocated memory -- OK
+Init - register filesystem fs -- OK
+Init - register filesystem fs - expect EINVAL
+Init - register filesystem bfs -- OK
+Init - register filesystem bfs - expect EINVAL
+Init - attempt to unregister with bad args - expect EINVAL
+Init - attempt to unregister fs -- OK
+Init - attempt to unregister fs again - expect ENOENT
+Init - attempt to unregister bfs -- OK
+Init - attempt to unregister bfs again - expect ENOENT
+*** END OF TEST MOUNT MANAGER ROUTINE - 01 ***
*joel*:
2010-07-15 Bharath Suri <bharath.s.jois at gmail.com>
PR 1617/testing
* malloctest/init.c: Added new case to exercise _realloc_r.
M 1.207 testsuites/libtests/ChangeLog
M 1.42 testsuites/libtests/malloctest/init.c
diff -u rtems/testsuites/libtests/ChangeLog:1.206 rtems/testsuites/libtests/ChangeLog:1.207
--- rtems/testsuites/libtests/ChangeLog:1.206 Thu Jul 15 08:36:25 2010
+++ rtems/testsuites/libtests/ChangeLog Thu Jul 15 08:54:54 2010
@@ -1,3 +1,8 @@
+2010-07-15 Bharath Suri <bharath.s.jois at gmail.com>
+
+ PR 1617/testing
+ * malloctest/init.c: Added new case to exercise _realloc_r.
+
2010-07-15 Sebastian Huber <sebastian.huber at embedded-brains.de>
* malloctest/init.c: Added test for
diff -u rtems/testsuites/libtests/malloctest/init.c:1.41 rtems/testsuites/libtests/malloctest/init.c:1.42
--- rtems/testsuites/libtests/malloctest/init.c:1.41 Thu Jul 15 08:36:25 2010
+++ rtems/testsuites/libtests/malloctest/init.c Thu Jul 15 08:54:54 2010
@@ -112,6 +112,8 @@
* Realloc with a bad pointer to force a point
*/
p4 = realloc( test_realloc, 32 );
+
+ p4 = _realloc_r( NULL, NULL, 1 );
}
#define TEST_HEAP_SIZE 2048
*joel*:
2010-07-15 Bharath Suri <bharath.s.jois at gmail.com>
PR 1617/testing
* psxfile01/test.c, psxfile01/psxfile01.scn: Added new cases to
exercise_link_r and _unlink_r
* psxstat/test.c, psxstat/psxstat.scn: Added new cases to exercise
_lstat_r and _stat_r.
* psxtime/test.c, psxtime/psxtime.scn: Added new cases to exercise
_gettimeofday.
M 1.294 testsuites/psxtests/ChangeLog
M 1.12 testsuites/psxtests/psxfile01/psxfile01.scn
M 1.27 testsuites/psxtests/psxfile01/test.c
M 1.12 testsuites/psxtests/psxstat/psxstat.scn
M 1.30 testsuites/psxtests/psxstat/test.c
M 1.8 testsuites/psxtests/psxtime/psxtime.scn
M 1.18 testsuites/psxtests/psxtime/test.c
diff -u rtems/testsuites/psxtests/ChangeLog:1.293 rtems/testsuites/psxtests/ChangeLog:1.294
--- rtems/testsuites/psxtests/ChangeLog:1.293 Thu Jul 15 07:15:56 2010
+++ rtems/testsuites/psxtests/ChangeLog Thu Jul 15 08:59:25 2010
@@ -1,3 +1,13 @@
+2010-07-15 Bharath Suri <bharath.s.jois at gmail.com>
+
+ PR 1617/testing
+ * psxfile01/test.c, psxfile01/psxfile01.scn: Added new cases to
+ exercise_link_r and _unlink_r
+ * psxstat/test.c, psxstat/psxstat.scn: Added new cases to exercise
+ _lstat_r and _stat_r.
+ * psxtime/test.c, psxtime/psxtime.scn: Added new cases to exercise
+ _gettimeofday.
+
2010-07-16 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
* psxstat/test.c: Avoid NULL pointer access.
diff -u rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.11 rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.12
--- rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.11 Thu Jul 8 14:37:00 2010
+++ rtems/testsuites/psxtests/psxfile01/psxfile01.scn Thu Jul 15 08:59:25 2010
@@ -1,4 +1,3 @@
-
*** FILE TEST 1 ***
*************** Dump of Entire IMFS ***************
/
@@ -49,6 +48,8 @@
create /tmp/john
tcdrain /tmp/john
Attempt to create a file, open in read-only mode and truncate it
+Exercise the reentrant version _link_r -- Expect EFAULT
+Unlink /tmp/bha using the reentrant version -- OK
mknod /tmp/joel
(0)the first write!!!
diff -u rtems/testsuites/psxtests/psxfile01/test.c:1.26 rtems/testsuites/psxtests/psxfile01/test.c:1.27
--- rtems/testsuites/psxtests/psxfile01/test.c:1.26 Thu Jul 8 14:37:01 2010
+++ rtems/testsuites/psxtests/psxfile01/test.c Thu Jul 15 08:59:25 2010
@@ -30,6 +30,7 @@
#include <errno.h>
#include <string.h>
#include <ctype.h>
+#include <reent.h>
#include <rtems/imfs.h>
#include <rtems.h>
@@ -338,7 +339,13 @@
rtems_test_assert( fd == -1 );
rtems_test_assert( errno == EINVAL );
- status = unlink( "/tmp/bha" );
+ puts( "Exercise the reentrant version _link_r -- Expect EFAULT" );
+ status = _link_r( NULL, NULL, NULL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EFAULT );
+
+ puts( "Unlink /tmp/bha using the reentrant version -- OK" );
+ status = _unlink_r( NULL, "/tmp/bha" );
rtems_test_assert( status == 0 );
/*
diff -u rtems/testsuites/psxtests/psxstat/psxstat.scn:1.11 rtems/testsuites/psxtests/psxstat/psxstat.scn:1.12
--- rtems/testsuites/psxtests/psxstat/psxstat.scn:1.11 Tue Jul 13 16:13:12 2010
+++ rtems/testsuites/psxtests/psxstat/psxstat.scn Thu Jul 15 08:59:25 2010
@@ -1708,6 +1708,8 @@
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
*** END OF STAT TEST 01 ***
diff -u rtems/testsuites/psxtests/psxstat/test.c:1.29 rtems/testsuites/psxtests/psxstat/test.c:1.30
--- rtems/testsuites/psxtests/psxstat/test.c:1.29 Thu Jul 15 07:15:56 2010
+++ rtems/testsuites/psxtests/psxstat/test.c Thu Jul 15 08:59:25 2010
@@ -5,7 +5,7 @@
* This test also exercises lstat() and lchown() when symlinks are
* involved.
*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+#include <reent.h>
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/imfs.h>
@@ -31,6 +32,7 @@
#define MAXSYMLINK 5 /* There needs to be a better way of getting this. */
#define TIMEOUT_VALUE ( 5 * rtems_clock_get_ticks_per_second() )
+int _lstat_r(struct _reent *, const char *, struct stat *);
/*
* List of files which should exist.
@@ -927,6 +929,16 @@
test_statvfs();
+ puts( "Exercise the reentrant version - _stat_r - expect EFAULT" );
+ status = _stat_r( NULL, NULL, NULL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EFAULT );
+
+ puts( "Exercise the reentrant version - _lstat_r - expect EFAULT" );
+ status = _lstat_r( NULL, NULL, NULL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EFAULT );
+
puts( "\n\n*** END OF STAT TEST 01 ***" );
rtems_test_exit(0);
}
diff -u rtems/testsuites/psxtests/psxtime/psxtime.scn:1.7 rtems/testsuites/psxtests/psxtime/psxtime.scn:1.8
--- rtems/testsuites/psxtests/psxtime/psxtime.scn:1.7 Mon Jun 28 16:00:15 2010
+++ rtems/testsuites/psxtests/psxtime/psxtime.scn Thu Jul 15 08:59:25 2010
@@ -1,5 +1,7 @@
+
*** POSIX TIME OF DAY TEST ***
gettimeofday( NULL, NULL ) - EFAULT
+_gettimeofday( NULL, NULL ) - EFAULT
rtems_clock_set 12:45:00 01/01/1988
adjtime - NULL delta - EINVAL
adjtime - delta out of range - EINVAL
@@ -9,7 +11,7 @@
adjtime - delta of one second forward
adjtime - delta of almost two seconds forward
adjtime - delta of almost one second forward which bumps second
-rtems_clock_get_tod 12:45:04 01/01/1988
+rtems_clock_get_tod 12:45:05 01/01/1988
rtems_clock_set 12:45:00 01/01/1988
rtems_clock_get_tod 12:45:00 01/01/1988
gettimeofday: Fri Jan 1 12:45:00 1988
diff -u rtems/testsuites/psxtests/psxtime/test.c:1.17 rtems/testsuites/psxtests/psxtime/test.c:1.18
--- rtems/testsuites/psxtests/psxtime/test.c:1.17 Mon Jun 28 16:00:15 2010
+++ rtems/testsuites/psxtests/psxtime/test.c Thu Jul 15 08:59:25 2010
@@ -27,6 +27,8 @@
extern int adjtime(const struct timeval *delta, struct timeval *olddelta);
#endif
+extern int _gettimeofday(struct timeval *__p, void *__tz);
+
void test_adjtime(void);
void check_a_tod(
rtems_time_of_day *the_tod
@@ -202,6 +204,11 @@
rtems_test_assert( sc == -1 );
rtems_test_assert( errno == EFAULT );
+ puts( "_gettimeofday( NULL, NULL ) - EFAULT" );
+ sc = _gettimeofday( NULL, NULL );
+ rtems_test_assert( sc == -1 );
+ rtems_test_assert( errno == EFAULT );
+
test_adjtime();
/*
--
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/20100715/f136d0c7/attachment.html>
More information about the vc
mailing list