<!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-07)</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-07 Bharath Suri <bharath.s.jois@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.
</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.397&r2=text&tr2=1.398&diff_format=h">M</a></td><td width='1%'>1.398</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.97&r2=text&tr2=1.98&diff_format=h">M</a></td><td width='1%'>1.98</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.102&r2=text&tr2=1.103&diff_format=h">M</a></td><td width='1%'>1.103</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/spassoc01/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spassoc01/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spassoc01/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spassoc01/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spassoc01/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spassoc01/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spassoc01/spassoc01.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spassoc01/spassoc01.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spassoc01/spassoc01.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spassoc01/spassoc01.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>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
</font><font color='#997700'>@@ -1,3 +1,11 @@
</font><font color='#000088'>+2010-07-07    Bharath Suri <bharath.s.jois@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.
+
</font> 2010-07-07        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        PR 1606/cpukit

<font color='#006600'>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
</font><font color='#997700'>@@ -15,8 +15,9 @@
</font>     sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \
     sp60 sp61 sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
     sp70 sp71 \
<font color='#880000'>-    spchain spclockget spcoverage spobjgetnext spnotepad01 spprintk spsize \
-    spstkalloc spthreadq01 spwatchdog spwkspace \
</font><font color='#000088'>+    spassoc01 spchain spclockget spcoverage spobjgetnext \
+    spnotepad01 spprintk spsize spstkalloc spthreadq01 \
+    spwatchdog spwkspace \
</font>     sperror01 sperror02 sperror03 \
     spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
     spfatal08 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \

<font color='#006600'>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
</font><font color='#997700'>@@ -97,6 +97,7 @@
</font> sp69/Makefile
 sp70/Makefile
 sp71/Makefile
<font color='#000088'>+spassoc01/Makefile
</font> spchain/Makefile
 spclockget/Makefile
 spcoverage/Makefile

<font color='#006600'>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
</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/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
</font><font color='#997700'>@@ -0,0 +1,24 @@
</font><font color='#000088'>+##
+## $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@.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
</font>
<font color='#006600'>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
</font><font color='#997700'>@@ -0,0 +1,229 @@
</font><font color='#000088'>+/*
+ *  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[] =<span style="background-color: #FF0000"> </span>
+  {
+    { 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[] =<span style="background-color: #FF0000"> </span>
+  {
+    { "(default)", 0 , 0  },
+    { "zero"     , 1 , 8  },
+    { "one"      , 2 , 4  },
+    { "two"      , 4 , 2  },
+    { "three"    , 8 , 1  },
+    { NULL       , -1, -1 }
+  };
+
+const rtems_assoc_t assoc_table[] =<span style="background-color: #FF0000"> </span>
+  {
+    { "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, "" ) );
+<span style="background-color: #FF0000">  </span>
+  reset_name();
+  puts( "Init - get name by local -- OK" );
+  rtems_test_assert( !strcmp( rtems_assoc_name_by_local( assoc_table, 1 ),<span style="background-color: #FF0000"> </span>
+                             "zero" ) );
+<span style="background-color: #FF0000">  </span>
+  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 =<span style="background-color: #FF0000"> </span>
+    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 =<span style="background-color: #FF0000"> </span>
+    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 =<span style="background-color: #FF0000"> </span>
+    rtems_assoc_name_by_remote_bitfield( assoc_table, 0, name );
+  rtems_test_assert ( !strcmp( name, "" ) );
+<span style="background-color: #FF0000">  </span>
+  reset_name();
+  puts( "Init - get name by remote -- OK" );
+  rtems_test_assert( !strcmp( rtems_assoc_name_by_remote( assoc_table, 1 ),
+                             "three" ) );
+<span style="background-color: #FF0000">  </span>
+  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 */
</font>
<font color='#006600'>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
</font><font color='#997700'>@@ -0,0 +1,39 @@
</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:  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
</font>
<font color='#006600'>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
</font><font color='#997700'>@@ -0,0 +1,38 @@
</font><font color='#000088'>+*** 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 ***
</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>