change log for rtems (2010-07-07)
rtems-vc at rtems.org
rtems-vc at rtems.org
Wed Jul 7 15:13:15 UTC 2010
*joel*:
2010-07-07 Bharath Suri <bharath.s.jois at gmail.com>
PR 1603/testing
* spassoc01/init.c, spassoc01/Makefile.am,
spassoc01/spassoc01.doc, spassoc01/spassoc01.scn: Added new test.
* Makefile.am, configure.ac: Added new test spassoc01 for
rtems_assoc routines.
M 1.398 testsuites/sptests/ChangeLog
M 1.98 testsuites/sptests/Makefile.am
M 1.103 testsuites/sptests/configure.ac
A 1.1 testsuites/sptests/spassoc01/.cvsignore
A 1.1 testsuites/sptests/spassoc01/Makefile.am
A 1.1 testsuites/sptests/spassoc01/init.c
A 1.1 testsuites/sptests/spassoc01/spassoc01.doc
A 1.1 testsuites/sptests/spassoc01/spassoc01.scn
diff -u rtems/testsuites/sptests/ChangeLog:1.397 rtems/testsuites/sptests/ChangeLog:1.398
--- rtems/testsuites/sptests/ChangeLog:1.397 Wed Jul 7 09:07:12 2010
+++ rtems/testsuites/sptests/ChangeLog Wed Jul 7 09:16:54 2010
@@ -1,3 +1,11 @@
+2010-07-07 Bharath Suri <bharath.s.jois at gmail.com>
+
+ PR 1603/testing
+ * spassoc01/init.c, spassoc01/Makefile.am,
+ spassoc01/spassoc01.doc, spassoc01/spassoc01.scn: Added new test.
+ * Makefile.am, configure.ac: Added new test spassoc01 for
+ rtems_assoc routines.
+
2010-07-07 Joel Sherrill <joel.sherrill at oarcorp.com>
PR 1606/cpukit
diff -u rtems/testsuites/sptests/Makefile.am:1.97 rtems/testsuites/sptests/Makefile.am:1.98
--- rtems/testsuites/sptests/Makefile.am:1.97 Wed Jul 7 04:03:06 2010
+++ rtems/testsuites/sptests/Makefile.am Wed Jul 7 09:16:54 2010
@@ -15,8 +15,9 @@
sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \
sp60 sp61 sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
sp70 sp71 \
- spchain spclockget spcoverage spobjgetnext spnotepad01 spprintk spsize \
- spstkalloc spthreadq01 spwatchdog spwkspace \
+ spassoc01 spchain spclockget spcoverage spobjgetnext \
+ spnotepad01 spprintk spsize spstkalloc spthreadq01 \
+ spwatchdog spwkspace \
sperror01 sperror02 sperror03 \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
diff -u rtems/testsuites/sptests/configure.ac:1.102 rtems/testsuites/sptests/configure.ac:1.103
--- rtems/testsuites/sptests/configure.ac:1.102 Wed Jul 7 04:03:08 2010
+++ rtems/testsuites/sptests/configure.ac Wed Jul 7 09:16:54 2010
@@ -97,6 +97,7 @@
sp69/Makefile
sp70/Makefile
sp71/Makefile
+spassoc01/Makefile
spchain/Makefile
spclockget/Makefile
spcoverage/Makefile
diff -u /dev/null rtems/testsuites/sptests/spassoc01/.cvsignore:1.1
--- /dev/null Wed Jul 7 10:13:14 2010
+++ rtems/testsuites/sptests/spassoc01/.cvsignore Wed Jul 7 09:16:55 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/sptests/spassoc01/Makefile.am:1.1
--- /dev/null Wed Jul 7 10:13:14 2010
+++ rtems/testsuites/sptests/spassoc01/Makefile.am Wed Jul 7 09:16:55 2010
@@ -0,0 +1,24 @@
+##
+## $Id$
+##
+
+rtems_tests_PROGRAMS = spassoc01
+spassoc01_SOURCES = init.c
+
+dist_rtems_tests_DATA = spassoc01.scn
+dist_rtems_tests_DATA += spassoc01.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 = $(spassoc01_OBJECTS) $(spassoc01_LDADD)
+LINK_LIBS = $(spassoc01_LDLIBS)
+
+spassoc01$(EXEEXT): $(spassoc01_OBJECTS) $(spassoc01_DEPENDENCIES)
+ @rm -f spassoc01$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff -u /dev/null rtems/testsuites/sptests/spassoc01/init.c:1.1
--- /dev/null Wed Jul 7 10:13:14 2010
+++ rtems/testsuites/sptests/spassoc01/init.c Wed Jul 7 09:16:55 2010
@@ -0,0 +1,229 @@
+/*
+ * 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 <stdio.h>
+#include <rtems/assoc.h>
+
+const rtems_assoc_t assoc_table_null[] =
+ {
+ { NULL , 0 , 0 },
+ { "zero" , 1 , 8 },
+ { "one" , 2 , 4 },
+ { "two" , 4 , 2 },
+ { "three" , 8 , 1 },
+ { NULL , -1, -1 }
+ };
+
+const rtems_assoc_t assoc_table_default[] =
+ {
+ { "(default)", 0 , 0 },
+ { "zero" , 1 , 8 },
+ { "one" , 2 , 4 },
+ { "two" , 4 , 2 },
+ { "three" , 8 , 1 },
+ { NULL , -1, -1 }
+ };
+
+const rtems_assoc_t assoc_table[] =
+ {
+ { "zero" , 1 , 8 },
+ { "one" , 2 , 4 },
+ { "two" , 4 , 2 },
+ { "three", 8 , 1 },
+ { NULL , -1, -1 }
+ };
+
+uint32_t local;
+uint32_t remote;
+const rtems_assoc_t *assoc_item;
+char *name;
+
+static void reset_name( void )
+{
+ memset( name, 0, 40 );
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ name = malloc(40);
+ puts( "\n\n*** TEST ASSOC ROUTINES - 1 ***" );
+
+ puts( "Init - get local by name -- OK" );
+ local = rtems_assoc_local_by_name( assoc_table, "zero" );
+ rtems_test_assert( local == 1 );
+
+ puts( "Init - get local by name -- expect 0" );
+ local = rtems_assoc_local_by_name( assoc_table, "four" );
+ rtems_test_assert( local == 0 );
+
+ puts( "Init - get local by remote bitfield -- OK" );
+ local = rtems_assoc_local_by_remote_bitfield( assoc_table, 1 );
+ rtems_test_assert( local == 8 );
+
+ puts( "Init - get local by remote bitfield -- expect 0" );
+ local = rtems_assoc_local_by_remote_bitfield( assoc_table, 0 );
+ rtems_test_assert( local == 0 );
+
+ puts( "Init - get local by remote -- OK" );
+ local = rtems_assoc_local_by_remote( assoc_table, 1 );
+ rtems_test_assert( local == 8 );
+
+ puts( "Init - get local by remote -- expect 0" );
+ local = rtems_assoc_local_by_remote( assoc_table, 0 );
+ rtems_test_assert( local == 0 );
+
+ reset_name();
+ puts( "Init - get name by local bitfield -- OK" );
+ name = rtems_assoc_name_by_local_bitfield( assoc_table, 1, name );
+ rtems_test_assert ( !strcmp( name, "zero" ) );
+
+ reset_name();
+ puts( "Init - get name by local bitfield -- OK" );
+ name = rtems_assoc_name_by_local_bitfield( assoc_table, 3, name );
+ rtems_test_assert ( !strcmp( name, "zero one" ) );
+
+ reset_name();
+ puts( "Init - get name by local bitfield -- expect\"\"" );
+ name = rtems_assoc_name_by_local_bitfield( assoc_table, 0, name );
+ rtems_test_assert ( !strcmp( name, "" ) );
+
+ reset_name();
+ puts( "Init - get name by local -- OK" );
+ rtems_test_assert( !strcmp( rtems_assoc_name_by_local( assoc_table, 1 ),
+ "zero" ) );
+
+ reset_name();
+ puts( "Init - get name by local -- using bad value" );
+ puts( rtems_assoc_name_by_local( assoc_table, 0 ) );
+
+ reset_name();
+ puts( "Init - get name by remote bitfield -- OK" );
+ name =
+ rtems_assoc_name_by_remote_bitfield( assoc_table, 1, name );
+ rtems_test_assert ( !strcmp( name, "three" ) );
+
+ reset_name();
+ puts( "Init - get name by remote bitfield -- OK" );
+ name =
+ rtems_assoc_name_by_remote_bitfield( assoc_table, 3, name );
+ rtems_test_assert ( !strcmp( name, "three two" ) );
+
+ reset_name();
+ puts( "Init - get name by remote bitfield -- expect\"\"" );
+ name =
+ rtems_assoc_name_by_remote_bitfield( assoc_table, 0, name );
+ rtems_test_assert ( !strcmp( name, "" ) );
+
+ reset_name();
+ puts( "Init - get name by remote -- OK" );
+ rtems_test_assert( !strcmp( rtems_assoc_name_by_remote( assoc_table, 1 ),
+ "three" ) );
+
+ reset_name();
+ puts( "Init - get name by remote -- using bad value" );
+ puts( rtems_assoc_name_by_remote( assoc_table, 0 ) );
+
+ puts( "Init - get ptr by local -- OK" );
+ assoc_item = rtems_assoc_ptr_by_local( assoc_table, 1 );
+ rtems_test_assert( assoc_item == assoc_table );
+
+ puts( "Init - get ptr by local -- expect NULL" );
+ assoc_item = rtems_assoc_ptr_by_local( assoc_table, 0 );
+ rtems_test_assert( assoc_item == 0 );
+
+ puts( "Init - get ptr by remote -- OK" );
+ assoc_item = rtems_assoc_ptr_by_remote( assoc_table, 8 );
+ rtems_test_assert( assoc_item == assoc_table );
+
+ puts( "Init - get ptr by remote -- expect NULL" );
+ assoc_item = rtems_assoc_ptr_by_remote( assoc_table, 0 );
+ rtems_test_assert( assoc_item == 0 );
+
+ puts( "Init - get ptr by name -- OK" );
+ assoc_item = rtems_assoc_ptr_by_name( assoc_table, "zero" );
+ rtems_test_assert( assoc_item == assoc_table );
+
+ puts( "Init - get ptr by name -- expect NULL" );
+ assoc_item = rtems_assoc_ptr_by_name( assoc_table, "six" );
+ rtems_test_assert( assoc_item == 0 );
+
+ puts( "Init - get remote by local bitfield -- OK" );
+ remote = rtems_assoc_remote_by_local_bitfield( assoc_table, 1 );
+ rtems_test_assert( remote == 8 );
+
+ puts( "Init - get remote by local bitfield -- expect 0" );
+ remote = rtems_assoc_remote_by_local_bitfield( assoc_table, 0 );
+ rtems_test_assert( remote == 0 );
+
+ puts( "Init - get remote by local -- OK" );
+ remote = rtems_assoc_remote_by_local( assoc_table, 1 );
+ rtems_test_assert( remote == 8 );
+
+ puts( "Init - get remote by local -- expect 0" );
+ remote = rtems_assoc_remote_by_local( assoc_table, 0 );
+ rtems_test_assert( remote == 0 );
+
+ puts( "Init - get remote by name -- OK" );
+ remote = rtems_assoc_remote_by_name( assoc_table, "zero" );
+ rtems_test_assert( remote == 8 );
+
+ puts( "Init - get remote by name -- expect 0" );
+ remote = rtems_assoc_remote_by_name( assoc_table, "six" );
+ rtems_test_assert( remote == 0 );
+
+ puts( "Init - get ptr by name -- expect (default)" );
+ assoc_item = rtems_assoc_ptr_by_name( assoc_table_default, "six" );
+ rtems_test_assert( assoc_item == assoc_table_default );
+
+ puts( "Init - get ptr by local -- expect (default)" );
+ assoc_item = rtems_assoc_ptr_by_local( assoc_table_default, 0 );
+ rtems_test_assert( assoc_item == assoc_table_default );
+
+ puts( "Init - get ptr by remote -- expect (default)" );
+ assoc_item = rtems_assoc_ptr_by_remote( assoc_table_default, 0 );
+ rtems_test_assert( assoc_item == assoc_table_default );
+
+ puts( "Init - get ptr by name -- expect NULL" );
+ assoc_item = rtems_assoc_ptr_by_name( assoc_table_null, "six" );
+ rtems_test_assert( assoc_item == 0 );
+
+ puts( "Init - get ptr by local -- expect NULL" );
+ assoc_item = rtems_assoc_ptr_by_local( assoc_table_null, 0 );
+ rtems_test_assert( assoc_item == 0 );
+
+ puts( "Init - get ptr by remote -- expect NULL" );
+ assoc_item = rtems_assoc_ptr_by_remote( assoc_table_null, 0 );
+ rtems_test_assert( assoc_item == 0 );
+
+ free( name );
+
+ puts( "*** END OF TEST ASSOC ROUTINES - 1 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_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/spassoc01/spassoc01.doc:1.1
--- /dev/null Wed Jul 7 10:13:14 2010
+++ rtems/testsuites/sptests/spassoc01/spassoc01.doc Wed Jul 7 09:16:55 2010
@@ -0,0 +1,39 @@
+#
+# $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: spassoc01
+
+directives:
+
++ rtems_assoc_local_by_name
++ rtems_assoc_local_by_remote_bitfield
++ rtems_assoc_local_by_remote
+
++ rtems_assoc_name_by_local_bitfield
++ rtems_assoc_name_by_local
++ rtems_assoc_name_by_remote_bitfield
++ rtems_assoc_name_by_remote
++ rtems_assoc_name_bad
+
++ rtems_assoc_ptr_by_local
++ rtems_assoc_ptr_by_remote
++ rtems_assoc_ptr_by_name
+
++ rtems_assoc_remote_by_local_bitfield
++ rtems_assoc_remote_by_local
++ rtems_assoc_remote_by_name
+
+concepts:
+
++ exercise the rtems_assoc* routines completely, including all the
+possible branching
diff -u /dev/null rtems/testsuites/sptests/spassoc01/spassoc01.scn:1.1
--- /dev/null Wed Jul 7 10:13:14 2010
+++ rtems/testsuites/sptests/spassoc01/spassoc01.scn Wed Jul 7 09:16:55 2010
@@ -0,0 +1,38 @@
+*** TEST ASSOC ROUTINES - 1 ***
+Init - get local by name -- OK
+Init - get local by name -- expect 0
+Init - get local by remote bitfield -- OK
+Init - get local by remote bitfield -- expect 0
+Init - get local by remote -- OK
+Init - get local by remote -- expect 0
+Init - get name by local bitfield -- OK
+Init - get name by local bitfield -- OK
+Init - get name by local bitfield -- expect""
+Init - get name by local -- OK
+Init - get name by local -- using bad value
+<assocnamebad.c: : BAD NAME>
+Init - get name by remote bitfield -- OK
+Init - get name by remote bitfield -- OK
+Init - get name by remote bitfield -- expect""
+Init - get name by remote -- OK
+Init - get name by remote -- using bad value
+<assocnamebad.c: : BAD NAME>
+Init - get ptr by local -- OK
+Init - get ptr by local -- expect NULL
+Init - get ptr by remote -- OK
+Init - get ptr by remote -- expect NULL
+Init - get ptr by name -- OK
+Init - get ptr by name -- expect NULL
+Init - get remote by local bitfield -- OK
+Init - get remote by local bitfield -- expect 0
+Init - get remote by local -- OK
+Init - get remote by local -- expect 0
+Init - get remote by name -- OK
+Init - get remote by name -- expect 0
+Init - get ptr by name -- expect (default)
+Init - get ptr by local -- expect (default)
+Init - get ptr by remote -- expect (default)
+Init - get ptr by name -- expect NULL
+Init - get ptr by local -- expect NULL
+Init - get ptr by remote -- expect NULL
+*** END OF TEST ASSOC ROUTINES - 1 ***
--
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/20100707/97de526c/attachment.html>
More information about the vc
mailing list