change log for rtems (2011-07-22)

rtems-vc at rtems.org rtems-vc at rtems.org
Fri Jul 22 18:11:43 UTC 2011


 *joel*:
2011-07-22	Ricardo Aguirre <el.mastin at ymail.com>

	PR 1847/tests
	* Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
	various non-blocking semaphore operations.
	* psxtmsem02/.cvsignore, psxtmsem02/Makefile.am, psxtmsem02/init.c,
	psxtmsem02/psxtmsem02.doc: New files.

M   1.29  testsuites/psxtmtests/ChangeLog
M   1.14  testsuites/psxtmtests/Makefile.am
M   1.17  testsuites/psxtmtests/configure.ac
A    1.1  testsuites/psxtmtests/psxtmsem02/.cvsignore
A    1.1  testsuites/psxtmtests/psxtmsem02/Makefile.am
A    1.1  testsuites/psxtmtests/psxtmsem02/init.c
A    1.1  testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc
M   1.16  testsuites/psxtmtests/psxtmtests_plan.csv

diff -u rtems/testsuites/psxtmtests/ChangeLog:1.28 rtems/testsuites/psxtmtests/ChangeLog:1.29
--- rtems/testsuites/psxtmtests/ChangeLog:1.28	Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/ChangeLog	Fri Jul 22 12:22:10 2011
@@ -1,5 +1,13 @@
 2011-07-22	Ricardo Aguirre <el.mastin at ymail.com>
 
+	PR 1847/tests
+	* Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
+	various non-blocking semaphore operations.
+	* psxtmsem02/.cvsignore, psxtmsem02/Makefile.am, psxtmsem02/init.c,
+	psxtmsem02/psxtmsem02.doc: New files.
+
+2011-07-22	Ricardo Aguirre <el.mastin at ymail.com>
+
 	PR 1846/tests
 	* Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
 	various sem_open(), sem_close(), sem_unlink(), sem_init(), and

diff -u rtems/testsuites/psxtmtests/Makefile.am:1.13 rtems/testsuites/psxtmtests/Makefile.am:1.14
--- rtems/testsuites/psxtmtests/Makefile.am:1.13	Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/Makefile.am	Fri Jul 22 12:22:10 2011
@@ -19,6 +19,7 @@
 SUBDIRS += psxtmnanosleep01
 SUBDIRS += psxtmnanosleep02
 SUBDIRS += psxtmsem01
+SUBDIRS += psxtmsem02
 SUBDIRS += psxtmsleep01
 SUBDIRS += psxtmsleep02
 SUBDIRS += psxtmthread01

diff -u rtems/testsuites/psxtmtests/configure.ac:1.16 rtems/testsuites/psxtmtests/configure.ac:1.17
--- rtems/testsuites/psxtmtests/configure.ac:1.16	Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/configure.ac	Fri Jul 22 12:22:10 2011
@@ -91,6 +91,7 @@
 psxtmnanosleep01/Makefile
 psxtmnanosleep02/Makefile
 psxtmsem01/Makefile
+psxtmsem02/Makefile
 psxtmsleep01/Makefile
 psxtmsleep02/Makefile
 psxtmthread01/Makefile

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmsem02/.cvsignore:1.1
--- /dev/null	Fri Jul 22 13:11:42 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/.cvsignore	Fri Jul 22 12:22:10 2011
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmsem02/Makefile.am:1.1
--- /dev/null	Fri Jul 22 13:11:42 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/Makefile.am	Fri Jul 22 12:22:10 2011
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxtmsem02
+psxtmsem02_SOURCES = init.c ../../tmtests/include/timesys.h \
+    ../../support/src/tmtests_empty_function.c \
+    ../../support/src/tmtests_support.c
+
+dist_rtems_tests_DATA = psxtmsem02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+OPERATION_COUNT = @OPERATION_COUNT@
+AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
+AM_CPPFLAGS += -DOPERATION_COUNT=$(OPERATION_COUNT)
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxtmsem02_OBJECTS) $(psxtmsem02_LDADD)
+LINK_LIBS = $(psxtmsem02_LDLIBS)
+
+psxtmsem02$(EXEEXT): $(psxtmsem02_OBJECTS) $(psxtmsem02_DEPENDENCIES)
+	@rm -f psxtmsem02$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmsem02/init.c:1.1
--- /dev/null	Fri Jul 22 13:11:43 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/init.c	Fri Jul 22 12:22:10 2011
@@ -0,0 +1,164 @@
+/*
+ *  COPYRIGHT (c) 1989-2011.
+ *  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$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <semaphore.h>
+#include <tmacros.h>
+#include <timesys.h>
+#include <rtems/timerdrv.h>
+#include "test_support.h"
+
+sem_t           sem1;
+sem_t           *n_sem1;
+
+void benchmark_sem_getvalue(void)
+{
+  long end_time;
+  int  status;
+  int  value;
+
+  benchmark_timer_initialize();
+    status = sem_getvalue(&sem1, &value);
+  end_time = benchmark_timer_read();
+  rtems_test_assert( status == 0 );
+
+  put_time(
+    "sem_getvalue",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void benchmark_sem_wait(void)
+{
+  long end_time;
+  int  status;
+
+  benchmark_timer_initialize();
+    status = sem_wait(&sem1);
+  end_time = benchmark_timer_read();
+  rtems_test_assert( status == 0 );
+
+  put_time(
+    "sem_wait – available",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void benchmark_sem_post(void)
+{
+  long end_time;
+  int  status;
+
+  benchmark_timer_initialize();
+    status = sem_post(&sem1);
+  end_time = benchmark_timer_read();
+  rtems_test_assert( status == 0 );
+
+  put_time(
+    "sem_post - no threads waiting",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void benchmark_sem_trywait_available(void)
+{
+  long end_time;
+  int  status;
+
+  benchmark_timer_initialize();
+  status = sem_trywait(&sem1);
+  end_time = benchmark_timer_read();
+  rtems_test_assert( status == 0 );
+
+  put_time(
+    "sem_trywait - available",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void benchmark_sem_trywait_not_available(void)
+{
+  long end_time;
+  int  status;
+
+  benchmark_timer_initialize();
+    status = sem_trywait(&sem1);
+  end_time = benchmark_timer_read();
+  /*it must be non avalible, so status should be non zero*/
+  rtems_test_assert( status != 0 );
+
+  put_time(
+    "sem_trywait - not available",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void *POSIX_Init(void *argument)
+{
+  int status;
+  puts( "\n\n*** POSIX TIME TEST PSXTMSEM02 ***" );
+
+  /* create the semaphore */
+  status = sem_init( &sem1, 0, 1 );
+  rtems_test_assert( status == 0 );
+
+  /* obtain the actual semaphore value */
+  benchmark_sem_getvalue();
+  /* lock the semaphore */
+  benchmark_sem_wait();
+  /* unlock the semaphore */
+  benchmark_sem_post();
+  /* try to lock the semaphore - available */
+  benchmark_sem_trywait_available();
+  /* try to lock the semaphore, not available */
+  benchmark_sem_trywait_not_available();
+
+  puts( "*** END OF POSIX TIME TEST PSXTMSEM02 ***" );
+
+  /*Destroying the semaphore*/
+  status = sem_destroy(&sem1);
+  rtems_test_assert( status == 0 );
+
+  rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS     1
+#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES  2
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc:1.1
--- /dev/null	Fri Jul 22 13:11:43 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc	Fri Jul 22 12:22:10 2011
@@ -0,0 +1,19 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2011.
+#  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 test benchmarks the following operations:
+
++ sem_getvalue
++ sem_wait – available
++ sem_post - no threads waiting
++ sem_trywait - available_
++ sem_trywait - not available
+

diff -u rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.15 rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.16
--- rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.15	Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/psxtmtests_plan.csv	Fri Jul 22 12:22:10 2011
@@ -106,14 +106,14 @@
 "sem_unlink (does not delete)","psxtmsem01","psxtmtest_single","Yes"
 "sem_close (named second close - removes)","psxtmsem01","psxtmtest_single","Yes"
 "sem_unlink (deletes)","psxtmsem01","psxtmtest_single","Yes"
-"sem_wait - available",,"psxtmtest_single",
+"sem_wait - available","psxtmsem02","psxtmtest_single","Yes"
 "sem_wait - not available, block",,"psxtmtest_blocking",
-"sem_trywait - available",,"psxtmtest_single",
-"sem_trywait - not available",,"psxtmtest_single",
-"sem_post - no threads waiting",,"psxtmtest_single",
+"sem_trywait - available","psxtmsem02","psxtmtest_single","Yes"
+"sem_trywait - not available","psxtmsem02","psxtmtest_single","Yes"
+"sem_post - no threads waiting","psxtmsem02","psxtmtest_single","Yes"
 "sem_post - thread waiting, no preempt",,"psxtmtest_unblocking_nopreempt",
 "sem_post - thread waiting, preempt",,"psxtmtest_unblocking_preempt",
-"sem_getvalue",,"psxtmtest_single",
+"sem_getvalue","psxtmsem02","psxtmtest_single","Yes"
 ,,,
 "sleep - yield","psxtmsleep01","psxtmtest_single","Yes"
 "sleep - blocking","psxtmsleep02","psxtmtest_blocking","Yes"


 *joel*:
2011-07-22	Joel Sherrill <joel.sherrill at oarcorp.com>

	* psxtmmutex02/psxtmmutex02.doc, psxtmsem01/psxtmsem01.doc,
	psxtmsem02/psxtmsem02.doc, psxtmthread01/psxtmthread01.doc: Ensure
	all are correct.

M   1.30  testsuites/psxtmtests/ChangeLog
M    1.2  testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc
M    1.2  testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc
M    1.2  testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc
M    1.2  testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc

diff -u rtems/testsuites/psxtmtests/ChangeLog:1.29 rtems/testsuites/psxtmtests/ChangeLog:1.30
--- rtems/testsuites/psxtmtests/ChangeLog:1.29	Fri Jul 22 12:22:10 2011
+++ rtems/testsuites/psxtmtests/ChangeLog	Fri Jul 22 12:28:28 2011
@@ -1,3 +1,9 @@
+2011-07-22	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* psxtmmutex02/psxtmmutex02.doc, psxtmsem01/psxtmsem01.doc,
+	psxtmsem02/psxtmsem02.doc, psxtmthread01/psxtmthread01.doc: Ensure
+	all are correct.
+
 2011-07-22	Ricardo Aguirre <el.mastin at ymail.com>
 
 	PR 1847/tests

diff -u rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc:1.1 rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc:1.2
--- rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc:1.1	Mon Dec  6 10:35:30 2010
+++ rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc	Fri Jul 22 12:28:28 2011
@@ -11,4 +11,4 @@
 
 This test benchmarks the following operations:
 
-+ TBD
++ pthread_mutex_lock - unavailable, block 

diff -u rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc:1.1 rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc:1.2
--- rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc:1.1	Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc	Fri Jul 22 12:28:28 2011
@@ -12,9 +12,11 @@
 This test benchmarks the following operations:
 
 + sem_init
-+ sem_open (first 'O_CREAT')
-+ sem_close (first)
-+ sem_open (second 'O_EXCL')
-+ sem_close (second)
 + sem_destroy
++ sem_open (first open 'O_CREAT')
++ sem_open (second open 'O_EXCL')
++ sem_close (named first/nested close)
++ sem_unlink (does not delete)
++ sem_close (named second close)
++ sem_unlink (deletes semaphore)
 

diff -u rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc:1.1 rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc:1.2
--- rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc:1.1	Fri Jul 22 12:22:10 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc	Fri Jul 22 12:28:28 2011
@@ -14,6 +14,6 @@
 + sem_getvalue
 + sem_wait – available
 + sem_post - no threads waiting
-+ sem_trywait - available_
++ sem_trywait - available
 + sem_trywait - not available
 

diff -u rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc:1.1 rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc:1.2
--- rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc:1.1	Mon Dec  6 10:35:31 2010
+++ rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc	Fri Jul 22 12:28:28 2011
@@ -11,4 +11,4 @@
 
 This test benchmarks the following operations:
 
-+ TBD
++ pthread_create



--

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/20110722/5c157ee5/attachment-0001.html>


More information about the vc mailing list