change log for rtems (2010-07-14)
rtems-vc at rtems.org
rtems-vc at rtems.org
Wed Jul 14 16:10:59 UTC 2010
*joel*:
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
* libfs/Makefile.am: Remove reference to imfs_free.c,
wrapup/Makefile.am: Split devfs into its own library.
* libfs/src/imfs/fifoimfs_init.c, libfs/src/imfs/imfs.h,
libfs/src/imfs/imfs_init.c, libfs/src/rfs/rtems-rfs-rtems.c:
Use default freenode implementation.
* libfs/src/imfs/imfs_free.c: Removed.
M 1.2503 cpukit/ChangeLog
M 1.45 cpukit/libfs/Makefile.am
M 1.3 cpukit/libfs/src/imfs/fifoimfs_init.c
M 1.45 cpukit/libfs/src/imfs/imfs.h
R 1.8 cpukit/libfs/src/imfs/imfs_free.c
M 1.20 cpukit/libfs/src/imfs/imfs_init.c
M 1.13 cpukit/libfs/src/rfs/rtems-rfs-rtems.c
M 1.74 cpukit/wrapup/Makefile.am
diff -u rtems/cpukit/ChangeLog:1.2502 rtems/cpukit/ChangeLog:1.2503
--- rtems/cpukit/ChangeLog:1.2502 Wed Jul 14 10:01:00 2010
+++ rtems/cpukit/ChangeLog Wed Jul 14 10:44:43 2010
@@ -1,5 +1,14 @@
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
+ * libfs/Makefile.am: Remove reference to imfs_free.c,
+ wrapup/Makefile.am: Split devfs into its own library.
+ * libfs/src/imfs/fifoimfs_init.c, libfs/src/imfs/imfs.h,
+ libfs/src/imfs/imfs_init.c, libfs/src/rfs/rtems-rfs-rtems.c:
+ Use default freenode implementation.
+ * libfs/src/imfs/imfs_free.c: Removed.
+
+2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
+
PR 1612/networking
* ChangeLog, libcsupport/src/libio_sockets.c: Sockets need to have
handlers in place. Null is no longer allowed.
diff -u rtems/cpukit/libfs/Makefile.am:1.44 rtems/cpukit/libfs/Makefile.am:1.45
--- rtems/cpukit/libfs/Makefile.am:1.44 Wed Jun 30 08:58:56 2010
+++ rtems/cpukit/libfs/Makefile.am Wed Jul 14 10:44:43 2010
@@ -35,30 +35,32 @@
noinst_LIBRARIES += libimfs.a
libimfs_a_SOURCES =
-libimfs_a_SOURCES += src/imfs/imfs_chown.c src/imfs/imfs_config.c \
- src/imfs/imfs_creat.c src/imfs/imfs_directory.c src/imfs/imfs_eval.c \
- src/imfs/imfs_free.c src/imfs/imfs_fsunmount.c src/imfs/imfs_gtkn.c \
- src/imfs/imfs_init.c src/imfs/imfs_initsupp.c src/imfs/imfs_link.c \
- src/imfs/imfs_mknod.c src/imfs/imfs_mount.c src/imfs/imfs_fchmod.c \
- src/imfs/imfs_unlink.c src/imfs/imfs_unmount.c src/imfs/imfs_utime.c \
- src/imfs/imfs_ntype.c src/imfs/imfs_stat.c src/imfs/imfs_getchild.c \
- src/imfs/memfile.c src/imfs/imfs_fifo.c src/imfs/deviceio.c \
- src/imfs/imfs_handlers_device.c src/imfs/imfs_handlers_directory.c \
- src/imfs/imfs_handlers_link.c src/imfs/imfs_handlers_memfile.c \
- src/imfs/imfs_debug.c src/imfs/imfs_rmnod.c src/imfs/imfs_symlink.c \
- src/imfs/imfs_readlink.c src/imfs/imfs_fdatasync.c src/imfs/imfs_fcntl.c \
- src/imfs/ioman.c src/imfs/miniimfs_init.c src/imfs/imfs_load_tar.c \
- src/imfs/imfs_rename.c src/imfs/fifoimfs_init.c src/imfs/imfs.h \
- src/imfs/deviceerrno.c \
- src/devfs/devfs_init.c src/devfs/devfs_eval.c src/devfs/devfs_mknod.c \
- src/devfs/devfs_show.c src/devfs/devfs_node_type.c \
- src/devfs/devopen.c src/devfs/devread.c src/devfs/devwrite.c \
- src/devfs/devclose.c src/devfs/devioctl.c src/devfs/devstat.c \
- src/devfs/devfs.h
+libimfs_a_SOURCES += src/imfs/deviceerrno.c src/imfs/deviceio.c \
+ src/imfs/fifoimfs_init.c src/imfs/imfs_chown.c src/imfs/imfs_config.c \
+ src/imfs/imfs_creat.c src/imfs/imfs_debug.c src/imfs/imfs_directory.c \
+ src/imfs/imfs_eval.c src/imfs/imfs_fchmod.c src/imfs/imfs_fcntl.c \
+ src/imfs/imfs_fdatasync.c src/imfs/imfs_fifo.c \
+ src/imfs/imfs_fsunmount.c src/imfs/imfs_getchild.c \
+ src/imfs/imfs_gtkn.c src/imfs/imfs_handlers_device.c \
+ src/imfs/imfs_handlers_directory.c src/imfs/imfs_handlers_link.c \
+ src/imfs/imfs_handlers_memfile.c src/imfs/imfs_init.c \
+ src/imfs/imfs_initsupp.c src/imfs/imfs_link.c src/imfs/imfs_load_tar.c \
+ src/imfs/imfs_mknod.c src/imfs/imfs_mount.c src/imfs/imfs_ntype.c \
+ src/imfs/imfs_readlink.c src/imfs/imfs_rename.c src/imfs/imfs_rmnod.c \
+ src/imfs/imfs_stat.c src/imfs/imfs_symlink.c src/imfs/imfs_unlink.c \
+ src/imfs/imfs_unmount.c src/imfs/imfs_utime.c src/imfs/ioman.c \
+ src/imfs/memfile.c src/imfs/miniimfs_init.c src/imfs/imfs.h
# POSIX FIFO/pipe
libimfs_a_SOURCES += src/pipe/fifo.c src/pipe/pipe.c src/pipe/pipe.h
+noinst_LIBRARIES += libdevfs.a
+libdevfs_a_SOURCES = src/devfs/devfs_init.c src/devfs/devfs_eval.c \
+ src/devfs/devfs_mknod.c src/devfs/devfs_show.c \
+ src/devfs/devfs_node_type.c src/devfs/devopen.c src/devfs/devread.c \
+ src/devfs/devwrite.c src/devfs/devclose.c src/devfs/devioctl.c \
+ src/devfs/devstat.c src/devfs/devfs.h
+
# dosfs
if LIBDOSFS
noinst_LIBRARIES += libdosfs.a
diff -u rtems/cpukit/libfs/src/imfs/fifoimfs_init.c:1.2 rtems/cpukit/libfs/src/imfs/fifoimfs_init.c:1.3
--- rtems/cpukit/libfs/src/imfs/fifoimfs_init.c:1.2 Tue Jul 13 16:43:32 2010
+++ rtems/cpukit/libfs/src/imfs/fifoimfs_init.c Wed Jul 14 10:44:43 2010
@@ -33,7 +33,7 @@
.node_type_h = IMFS_node_type,
.mknod_h = IMFS_mknod,
.chown_h = IMFS_chown,
- .freenod_h = IMFS_freenodinfo,
+ .freenod_h = rtems_filesystem_default_freenode,
.mount_h = IMFS_mount,
.fsmount_me_h = fifoIMFS_initialize,
.unmount_h = IMFS_unmount,
diff -u rtems/cpukit/libfs/src/imfs/imfs.h:1.44 rtems/cpukit/libfs/src/imfs/imfs.h:1.45
--- rtems/cpukit/libfs/src/imfs/imfs.h:1.44 Tue Jul 13 16:43:32 2010
+++ rtems/cpukit/libfs/src/imfs/imfs.h Wed Jul 14 10:44:43 2010
@@ -355,10 +355,6 @@
gid_t group /* IN */
);
-extern int IMFS_freenodinfo(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
extern int IMFS_mknod(
const char *path, /* IN */
mode_t mode, /* IN */
@@ -396,10 +392,6 @@
rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
);
-extern int IMFS_freenod(
- rtems_filesystem_location_info_t *node /* IN/OUT */
-);
-
extern int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode /* IN/OUT */
);
diff -u rtems/cpukit/libfs/src/imfs/imfs_init.c:1.19 rtems/cpukit/libfs/src/imfs/imfs_init.c:1.20
--- rtems/cpukit/libfs/src/imfs/imfs_init.c:1.19 Tue Jun 29 14:37:28 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_init.c Wed Jul 14 10:44:43 2010
@@ -33,7 +33,7 @@
.node_type_h = IMFS_node_type,
.mknod_h = IMFS_mknod,
.chown_h = IMFS_chown,
- .freenod_h = IMFS_freenodinfo,
+ .freenod_h = rtems_filesystem_default_freenode,
.mount_h = IMFS_mount,
.fsmount_me_h = IMFS_initialize,
.unmount_h = IMFS_unmount,
diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.12 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.13
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.12 Sat Jul 3 14:13:25 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c Wed Jul 14 10:44:43 2010
@@ -662,20 +662,6 @@
}
/**
- * This routine is the RFS free node handler for the file system operations
- * table. The RFS does not need to free anything.
- *
- * @param pathloc
- * @retval 0 Always returned.
- */
-
-int
-rtems_rfs_rtems_freenodinfo (rtems_filesystem_location_info_t* pathloc)
-{
- return 0;
-}
-
-/**
* This routine is the implementation of the utime() system call for the
* RFS.
*
@@ -1239,7 +1225,7 @@
.node_type_h = rtems_rfs_rtems_node_type,
.mknod_h = rtems_rfs_rtems_mknod,
.chown_h = rtems_rfs_rtems_chown,
- .freenod_h = rtems_rfs_rtems_freenodinfo,
+ .freenod_h = rtems_filesystem_default_freenode,
.mount_h = rtems_filesystem_default_mount,
.fsmount_me_h = rtems_rfs_rtems_initialise,
.unmount_h = rtems_filesystem_default_unmount,
diff -u rtems/cpukit/wrapup/Makefile.am:1.73 rtems/cpukit/wrapup/Makefile.am:1.74
--- rtems/cpukit/wrapup/Makefile.am:1.73 Tue Jun 29 14:37:28 2010
+++ rtems/cpukit/wrapup/Makefile.am Wed Jul 14 10:44:44 2010
@@ -28,6 +28,7 @@
TMP_LIBS += ../libfs/libdosfs.a
endif
TMP_LIBS += ../libfs/libdefaultfs.a
+TMP_LIBS += ../libfs/libdevfs.a
TMP_LIBS += ../libfs/libimfs.a
TMP_LIBS += ../libfs/librfs.a
*joel*:
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
* libnetworking/rtems/rtems_syscall.c: Fix warning.
M 1.2504 cpukit/ChangeLog
M 1.29 cpukit/libnetworking/rtems/rtems_syscall.c
diff -u rtems/cpukit/ChangeLog:1.2503 rtems/cpukit/ChangeLog:1.2504
--- rtems/cpukit/ChangeLog:1.2503 Wed Jul 14 10:44:43 2010
+++ rtems/cpukit/ChangeLog Wed Jul 14 10:49:12 2010
@@ -1,5 +1,9 @@
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
+ * libnetworking/rtems/rtems_syscall.c: Fix warning.
+
+2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
+
* libfs/Makefile.am: Remove reference to imfs_free.c,
wrapup/Makefile.am: Split devfs into its own library.
* libfs/src/imfs/fifoimfs_init.c, libfs/src/imfs/imfs.h,
diff -u rtems/cpukit/libnetworking/rtems/rtems_syscall.c:1.28 rtems/cpukit/libnetworking/rtems/rtems_syscall.c:1.29
--- rtems/cpukit/libnetworking/rtems/rtems_syscall.c:1.28 Mon Jul 12 08:51:59 2010
+++ rtems/cpukit/libnetworking/rtems/rtems_syscall.c Wed Jul 14 10:49:12 2010
@@ -772,7 +772,7 @@
rtems_bsdnet_ioctl, /* ioctl */
rtems_filesystem_default_lseek, /* lseek */
rtems_bsdnet_fstat, /* fstat */
- rtems_filesystem_default_fstat, /* fchmod */
+ rtems_filesystem_default_fchmod, /* fchmod */
rtems_filesystem_default_ftruncate, /* ftruncate */
rtems_filesystem_default_fpathconf, /* fpathconf */
rtems_filesystem_default_fsync, /* fsync */
*joel*:
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
* termios01/init.c, termios01/termios01.scn: Fully exercise tcsetattr.
M 1.202 testsuites/libtests/ChangeLog
M 1.11 testsuites/libtests/termios01/init.c
M 1.5 testsuites/libtests/termios01/termios01.scn
diff -u rtems/testsuites/libtests/ChangeLog:1.201 rtems/testsuites/libtests/ChangeLog:1.202
--- rtems/testsuites/libtests/ChangeLog:1.201 Thu Jul 8 15:11:47 2010
+++ rtems/testsuites/libtests/ChangeLog Wed Jul 14 10:59:37 2010
@@ -1,3 +1,7 @@
+2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * termios01/init.c, termios01/termios01.scn: Fully exercise tcsetattr.
+
2010-07-08 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile.am, configure.ac: Add test for exercising sbrk() extension
diff -u rtems/testsuites/libtests/termios01/init.c:1.10 rtems/testsuites/libtests/termios01/init.c:1.11
--- rtems/testsuites/libtests/termios01/init.c:1.10 Wed Jun 23 18:24:11 2010
+++ rtems/testsuites/libtests/termios01/init.c Wed Jul 14 10:59:37 2010
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -122,10 +122,7 @@
int i;
int index;
- puts(
- "\n"
- "Test termios_baud2index..."
- );
+ puts( "Test termios_baud2index..." );
puts( "termios_baud_to_index(-2) - NOT OK" );
i = rtems_termios_baud_to_index( -2 );
rtems_test_assert( i == -1 );
@@ -168,7 +165,10 @@
rtems_test_assert( i == -1 );
for (i=0 ; baud_table[i].constant != -1 ; i++ ) {
- printf( "termios_baud_to_number(B%" PRIdrtems_termios_baud_t ") - OK\n", baud_table[i].baud );
+ printf(
+ "termios_baud_to_number(B%" PRIdrtems_termios_baud_t ") - OK\n",
+ baud_table[i].baud
+ );
number = rtems_termios_baud_to_number( baud_table[i].constant );
if ( number != baud_table[i].baud ) {
printf(
@@ -202,7 +202,10 @@
rtems_test_assert( i == -1 );
for (i=0 ; baud_table[i].constant != -1 ; i++ ) {
- printf( "termios_number_to_baud(B%" PRIdrtems_termios_baud_t ") - OK\n", baud_table[i].baud );
+ printf(
+ "termios_number_to_baud(B%" PRIdrtems_termios_baud_t ") - OK\n",
+ baud_table[i].baud
+ );
termios_baud = rtems_termios_number_to_baud( baud_table[i].baud );
if ( termios_baud != baud_table[i].constant ) {
printf(
@@ -237,14 +240,20 @@
attr.c_cflag &= ~CBAUD;
attr.c_cflag |= baud_table[i].constant;
- printf( "tcsetattr(TCSANOW, B%" PRIdrtems_termios_baud_t ") - OK\n", baud_table[i].baud );
+ printf(
+ "tcsetattr(TCSANOW, B%" PRIdrtems_termios_baud_t ") - OK\n",
+ baud_table[i].baud
+ );
sc = tcsetattr( test, TCSANOW, &attr );
if ( sc != 0 ) {
printf( "ERROR - return %d\n", sc );
rtems_test_exit(0);
}
- printf( "tcsetattr(TCSADRAIN, B%" PRIdrtems_termios_baud_t ") - OK\n", baud_table[i].baud );
+ printf(
+ "tcsetattr(TCSADRAIN, B%" PRIdrtems_termios_baud_t ") - OK\n",
+ baud_table[i].baud
+ );
sc = tcsetattr( test, TCSANOW, &attr );
if ( sc != 0 ) {
printf( "ERROR - return %d\n", sc );
@@ -452,6 +461,7 @@
rtems_status_code sc;
rtems_device_major_number registered;
int test;
+ struct termios t;
puts( "\n\n*** TEST TERMIOS 01 ***" );
@@ -459,6 +469,24 @@
test_termios_baud2number();
test_termios_number_to_baud();
+ /*
+ * tcsetattr - ERROR invalid operation
+ */
+ puts( "tcsetattr - invalid operation - ENOTSUP" );
+ rc = tcsetattr( 0, 0x12345, &t );
+ rtems_test_assert( rc == -1 );
+ rtems_test_assert( errno == ENOTSUP );
+
+ /*
+ * tcsetattr - TCSADRAIN
+ */
+ puts( "\ntcsetattr - drain - OK" );
+ rc = tcsetattr( 1, TCSADRAIN, &t );
+ rtems_test_assert( rc == 0 );
+
+ /*
+ * Register a driver
+ */
puts(
"\n"
"Init - rtems_io_register_driver - Termios Test Driver - OK"
diff -u rtems/testsuites/libtests/termios01/termios01.scn:1.4 rtems/testsuites/libtests/termios01/termios01.scn:1.5
--- rtems/testsuites/libtests/termios01/termios01.scn:1.4 Wed Jun 23 18:25:45 2010
+++ rtems/testsuites/libtests/termios01/termios01.scn Wed Jul 14 10:59:37 2010
@@ -1,5 +1,4 @@
*** TEST TERMIOS 01 ***
-
Test termios_baud2index...
termios_baud_to_index(-2) - NOT OK
termios_baud_to_index(572) - NOT OK
@@ -33,7 +32,7 @@
termios_baud_to_number(B110) - OK
termios_baud_to_number(B134) - OK
termios_baud_to_number(B150) - OK
-termios_baud_to_number(B200) - OK
+termios_baud_to_number(B200) - O
termios_baud_to_number(B300) - OK
termios_baud_to_number(B600) - OK
termios_baud_to_number(B1200) - OK
@@ -71,6 +70,9 @@
termios_number_to_baud(B115200) - OK
termios_number_to_baud(B230400) - OK
termios_number_to_baud(B460800) - OK
+tcsetattr - invalid operation - ENOTSUP
+
+tcsetattr - drain - OK
Init - rtems_io_register_driver - Termios Test Driver - OK
Termios_test_driver - rtems_io_register /dev/test - OK
*joel*:
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile.am, configure.ac: Add tests for sbrk fatal error case and
libio initialization fatal error case.
* spfatal21/.cvsignore, spfatal21/Makefile.am, spfatal21/spfatal21.doc,
spfatal21/spfatal21.scn, spfatal21/testcase.h, spfatal22/.cvsignore,
spfatal22/Makefile.am, spfatal22/spfatal22.doc,
spfatal22/spfatal22.scn, spfatal22/testcase.h: New files.
M 1.401 testsuites/sptests/ChangeLog
M 1.100 testsuites/sptests/Makefile.am
M 1.105 testsuites/sptests/configure.ac
A 1.1 testsuites/sptests/spfatal21/.cvsignore
A 1.1 testsuites/sptests/spfatal21/Makefile.am
A 1.1 testsuites/sptests/spfatal21/spfatal21.doc
A 1.1 testsuites/sptests/spfatal21/spfatal21.scn
A 1.1 testsuites/sptests/spfatal21/testcase.h
A 1.1 testsuites/sptests/spfatal22/.cvsignore
A 1.1 testsuites/sptests/spfatal22/Makefile.am
A 1.1 testsuites/sptests/spfatal22/spfatal22.doc
A 1.1 testsuites/sptests/spfatal22/spfatal22.scn
A 1.1 testsuites/sptests/spfatal22/testcase.h
diff -u rtems/testsuites/sptests/ChangeLog:1.400 rtems/testsuites/sptests/ChangeLog:1.401
--- rtems/testsuites/sptests/ChangeLog:1.400 Wed Jul 14 02:33:55 2010
+++ rtems/testsuites/sptests/ChangeLog Wed Jul 14 11:02:40 2010
@@ -1,3 +1,12 @@
+2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * Makefile.am, configure.ac: Add tests for sbrk fatal error case and
+ libio initialization fatal error case.
+ * spfatal21/.cvsignore, spfatal21/Makefile.am, spfatal21/spfatal21.doc,
+ spfatal21/spfatal21.scn, spfatal21/testcase.h, spfatal22/.cvsignore,
+ spfatal22/Makefile.am, spfatal22/spfatal22.doc,
+ spfatal22/spfatal22.scn, spfatal22/testcase.h: New files.
+
2010-07-14 Sebastian Huber <sebastian.huber at embedded-brains.de>
* spintrcritical06/init.c: Switch semaphore obtain timeouts of
diff -u rtems/testsuites/sptests/Makefile.am:1.99 rtems/testsuites/sptests/Makefile.am:1.100
--- rtems/testsuites/sptests/Makefile.am:1.99 Thu Jul 8 14:39:11 2010
+++ rtems/testsuites/sptests/Makefile.am Wed Jul 14 11:02:40 2010
@@ -21,14 +21,15 @@
sperror01 sperror02 sperror03 \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
- spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
+ spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 spfatal21 \
+ spfatal22 \
spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
spintrcritical09 spintrcritical10 spintrcritical11 spintrcritical12 \
spintrcritical13 spintrcritical14 spintrcritical15 spintrcritical16 \
spintrcritical17 spmkdir
-
+
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.104 rtems/testsuites/sptests/configure.ac:1.105
--- rtems/testsuites/sptests/configure.ac:1.104 Thu Jul 8 14:39:12 2010
+++ rtems/testsuites/sptests/configure.ac Wed Jul 14 11:02:40 2010
@@ -124,6 +124,8 @@
spfatal18/Makefile
spfatal19/Makefile
spfatal20/Makefile
+spfatal21/Makefile
+spfatal22/Makefile
spfifo01/Makefile
spfifo02/Makefile
spfifo03/Makefile
diff -u /dev/null rtems/testsuites/sptests/spfatal21/.cvsignore:1.1
--- /dev/null Wed Jul 14 11:10:58 2010
+++ rtems/testsuites/sptests/spfatal21/.cvsignore Wed Jul 14 11:02:40 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/sptests/spfatal21/Makefile.am:1.1
--- /dev/null Wed Jul 14 11:10:58 2010
+++ rtems/testsuites/sptests/spfatal21/Makefile.am Wed Jul 14 11:02:40 2010
@@ -0,0 +1,25 @@
+##
+## $Id$
+##
+
+rtems_tests_PROGRAMS = spfatal21
+spfatal21_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/system.h ../../support/src/test_support.c testcase.h
+
+dist_rtems_tests_DATA = spfatal21.scn
+dist_rtems_tests_DATA += spfatal21.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 = $(spfatal21_OBJECTS) $(spfatal22_LDADD)
+LINK_LIBS = $(spfatal21_LDLIBS)
+
+spfatal21$(EXEEXT): $(spfatal22_OBJECTS) $(spfatal22_DEPENDENCIES)
+ @rm -f spfatal21$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff -u /dev/null rtems/testsuites/sptests/spfatal21/spfatal21.doc:1.1
--- /dev/null Wed Jul 14 11:10:58 2010
+++ rtems/testsuites/sptests/spfatal21/spfatal21.doc Wed Jul 14 11:02:40 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: spfatal21
+
+directives:
+
+ malloc_sbrk_initialize
+
+concepts:
+
++ exercise fatal error when sbrk fails to extend memory on the initial call.
diff -u /dev/null rtems/testsuites/sptests/spfatal21/spfatal21.scn:1.1
--- /dev/null Wed Jul 14 11:10:58 2010
+++ rtems/testsuites/sptests/spfatal21/spfatal21.scn Wed Jul 14 11:02:40 2010
@@ -0,0 +1,3 @@
+*** TEST FATAL FATAL 21 ***
+Fatal error (sbrk during init fails) hit
+*** END OF TEST ***
diff -u /dev/null rtems/testsuites/sptests/spfatal21/testcase.h:1.1
--- /dev/null Wed Jul 14 11:10:58 2010
+++ rtems/testsuites/sptests/spfatal21/testcase.h Wed Jul 14 11:02:40 2010
@@ -0,0 +1,35 @@
+/*
+ * 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$
+ */
+
+#define FATAL_ERROR_TEST_NAME "FATAL 21"
+#define FATAL_ERROR_DESCRIPTION "sbrk during init fails"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR RTEMS_NO_MEMORY
+
+#include <rtems/libcsupport.h>
+#include <rtems/malloc.h>
+
+/* Safe information on real heap */
+extern rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers;
+extern rtems_malloc_sbrk_functions_t rtems_malloc_sbrk_helpers_table;
+
+void * sbrk(ptrdiff_t incr)
+{
+ return (void *) -1;
+}
+
+void force_error()
+{
+ rtems_malloc_sbrk_helpers = &rtems_malloc_sbrk_helpers_table;
+
+ RTEMS_Malloc_Initialize( NULL, 0, 64 );
+}
diff -u /dev/null rtems/testsuites/sptests/spfatal22/.cvsignore:1.1
--- /dev/null Wed Jul 14 11:10:58 2010
+++ rtems/testsuites/sptests/spfatal22/.cvsignore Wed Jul 14 11:02:40 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/sptests/spfatal22/Makefile.am:1.1
--- /dev/null Wed Jul 14 11:10:58 2010
+++ rtems/testsuites/sptests/spfatal22/Makefile.am Wed Jul 14 11:02:40 2010
@@ -0,0 +1,25 @@
+##
+## $Id$
+##
+
+rtems_tests_PROGRAMS = spfatal22
+spfatal22_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/system.h ../../support/src/test_support.c testcase.h
+
+dist_rtems_tests_DATA = spfatal22.scn
+dist_rtems_tests_DATA += spfatal22.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 = $(spfatal22_OBJECTS) $(spfatal22_LDADD)
+LINK_LIBS = $(spfatal22_LDLIBS)
+
+spfatal22$(EXEEXT): $(spfatal22_OBJECTS) $(spfatal22_DEPENDENCIES)
+ @rm -f spfatal22$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff -u /dev/null rtems/testsuites/sptests/spfatal22/spfatal22.doc:1.1
--- /dev/null Wed Jul 14 11:10:58 2010
+++ rtems/testsuites/sptests/spfatal22/spfatal22.doc Wed Jul 14 11:02:40 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: spfatal22
+
+directives:
+
+ rtems_libio_init
+
+concepts:
+
++ Exercise path when unable to allocate memory.
diff -u /dev/null rtems/testsuites/sptests/spfatal22/spfatal22.scn:1.1
--- /dev/null Wed Jul 14 11:10:59 2010
+++ rtems/testsuites/sptests/spfatal22/spfatal22.scn Wed Jul 14 11:02:40 2010
@@ -0,0 +1,4 @@
+*** TEST FATAL FATAL 22 ***
+Allocate_majority_of_heap:
+Fatal error (libio init out of memory) hit
+*** END OF TEST ***
diff -u /dev/null rtems/testsuites/sptests/spfatal22/testcase.h:1.1
--- /dev/null Wed Jul 14 11:10:59 2010
+++ rtems/testsuites/sptests/spfatal22/testcase.h Wed Jul 14 11:02:40 2010
@@ -0,0 +1,26 @@
+/*
+ * 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$
+ */
+
+#define FATAL_ERROR_TEST_NAME "FATAL 22"
+#define FATAL_ERROR_DESCRIPTION "libio init out of memory"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR RTEMS_NO_MEMORY
+
+#include <rtems/libio.h>
+#include "test_support.h"
+
+void force_error()
+{
+ Allocate_majority_of_heap( 1 );
+
+ rtems_libio_init();
+}
*joel*:
2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
* support/include/test_support.h, support/src/test_support.c: Add
Allocate_majority_of_heap().
M 1.169 testsuites/ChangeLog
M 1.5 testsuites/support/include/test_support.h
M 1.7 testsuites/support/src/test_support.c
diff -u rtems/testsuites/ChangeLog:1.168 rtems/testsuites/ChangeLog:1.169
--- rtems/testsuites/ChangeLog:1.168 Fri Jun 25 11:58:59 2010
+++ rtems/testsuites/ChangeLog Wed Jul 14 11:03:57 2010
@@ -1,3 +1,8 @@
+2010-07-14 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * support/include/test_support.h, support/src/test_support.c: Add
+ Allocate_majority_of_heap().
+
2010-06-25 Joel Sherrill <joel.sherrilL at OARcorp.com>
* support/src/tmtests_support.c: Fix warning.
diff -u rtems/testsuites/support/include/test_support.h:1.4 rtems/testsuites/support/include/test_support.h:1.5
--- rtems/testsuites/support/include/test_support.h:1.4 Mon Jun 21 11:54:17 2010
+++ rtems/testsuites/support/include/test_support.h Wed Jul 14 11:03:57 2010
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,7 +17,7 @@
#endif
/*
- * Allocate a number of small blocks from the heap
+ * Allocate a number of small blocks from the workspace
* until the largest free block of memory available is
* smaller than smallest.
*
@@ -26,6 +26,15 @@
void Allocate_majority_of_workspace( int smallest );
/*
+ * Allocate a number of small blocks from the heap
+ * until the largest free block of memory available is
+ * smaller than smallest.
+ *
+ * NOTE: The memory CANNOT be freed.
+ */
+void Allocate_majority_of_heap( int smallest );
+
+/*
* Return a pointer to the POSIX name that is slightly
* beyond the legal limit.
*/
diff -u rtems/testsuites/support/src/test_support.c:1.6 rtems/testsuites/support/src/test_support.c:1.7
--- rtems/testsuites/support/src/test_support.c:1.6 Tue Dec 8 15:39:21 2009
+++ rtems/testsuites/support/src/test_support.c Wed Jul 14 11:03:57 2010
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -12,6 +12,7 @@
#include <fcntl.h>
#include <tmacros.h>
#include "test_support.h"
+#include <rtems/libcsupport.h>
static char Too_Long_Name[PATH_MAX + 2];
static char Longest_Name[PATH_MAX + 1];
@@ -58,3 +59,19 @@
} while ( info.Free.largest >= smallest );
}
+
+void Allocate_majority_of_heap( int smallest )
+{
+ size_t size;
+ void *temp;
+
+ puts("Allocate_majority_of_heap: ");
+ size = malloc_free_space();
+ do {
+ temp = malloc( size-16 );
+ if (!temp)
+ perror("Unable to allocate from workspace");
+ size = malloc_free_space();
+ } while ( size >= smallest );
+
+}
--
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/20100714/fc75ff87/attachment.html>
More information about the vc
mailing list