change log for rtems (2010-06-25)

rtems-vc at rtems.org rtems-vc at rtems.org
Fri Jun 25 17:33:20 UTC 2010


 *joel*:
2010-06-25	Joel Sherrill <joel.sherrill at oarcorp.com>

	* termios03/.cvsignore, termios03/Makefile.am, termios03/init.c,
	termios03/termios03.doc, termios03/termios03.scn,
	termios03/termios_testdriver_polled.c,
	termios03/termios_testdriver_polled.h: New files.
	* Makefile.am, configure.ac: Add initial version of new test for polled
	IO support in termios.

M  1.188  testsuites/libtests/ChangeLog
M   1.29  testsuites/libtests/Makefile.am
M   1.36  testsuites/libtests/configure.ac
A    1.1  testsuites/libtests/termios03/.cvsignore
A    1.1  testsuites/libtests/termios03/Makefile.am
A    1.1  testsuites/libtests/termios03/init.c
A    1.1  testsuites/libtests/termios03/termios03.doc
A    1.1  testsuites/libtests/termios03/termios03.scn
A    1.1  testsuites/libtests/termios03/termios_testdriver_polled.h
A    1.1  testsuites/libtests/termios03/termios_testdriver_polled.c

diff -u rtems/testsuites/libtests/ChangeLog:1.187 rtems/testsuites/libtests/ChangeLog:1.188
--- rtems/testsuites/libtests/ChangeLog:1.187	Wed Jun 23 18:26:05 2010
+++ rtems/testsuites/libtests/ChangeLog	Fri Jun 25 11:52:23 2010
@@ -1,3 +1,12 @@
+2010-06-25	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* termios03/.cvsignore, termios03/Makefile.am, termios03/init.c,
+	termios03/termios03.doc, termios03/termios03.scn,
+	termios03/termios_testdriver_polled.c,
+	termios03/termios_testdriver_polled.h: New files.
+	* Makefile.am, configure.ac: Add initial version of new test for polled
+	IO support in termios.
+
 2010-06-23	Joel Sherrill <joel.sherrilL at OARcorp.com>
 
 	* block01/Makefile.am, block02/Makefile.am, block03/Makefile.am,

diff -u rtems/testsuites/libtests/Makefile.am:1.28 rtems/testsuites/libtests/Makefile.am:1.29
--- rtems/testsuites/libtests/Makefile.am:1.28	Tue Jun 22 14:27:12 2010
+++ rtems/testsuites/libtests/Makefile.am	Fri Jun 25 11:52:24 2010
@@ -8,7 +8,7 @@
 
 SUBDIRS += bspcmdline01 cpuuse malloctest malloc02 malloc03 heapwalk \
     putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
-    termios termios01 termios02 \
+    termios termios01 termios02 termios03 \
     rtems++ tztest block01 block02 block03 block04 block05 block06 block07 \
     block08 block09 block10 stringto01
 

diff -u rtems/testsuites/libtests/configure.ac:1.35 rtems/testsuites/libtests/configure.ac:1.36
--- rtems/testsuites/libtests/configure.ac:1.35	Tue Jun 22 14:27:12 2010
+++ rtems/testsuites/libtests/configure.ac	Fri Jun 25 11:52:24 2010
@@ -60,6 +60,7 @@
 termios/Makefile
 termios01/Makefile
 termios02/Makefile
+termios03/Makefile
 tztest/Makefile
 POSIX/Makefile
 ])

diff -u /dev/null rtems/testsuites/libtests/termios03/.cvsignore:1.1
--- /dev/null	Fri Jun 25 12:33:18 2010
+++ rtems/testsuites/libtests/termios03/.cvsignore	Fri Jun 25 11:52:25 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/libtests/termios03/Makefile.am:1.1
--- /dev/null	Fri Jun 25 12:33:18 2010
+++ rtems/testsuites/libtests/termios03/Makefile.am	Fri Jun 25 11:52:25 2010
@@ -0,0 +1,26 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = termios03
+termios03_SOURCES = init.c termios_testdriver_polled.c
+
+dist_rtems_tests_DATA = termios03.scn
+dist_rtems_tests_DATA += termios03.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 = $(termios03_OBJECTS) $(termios03_LDADD)
+LINK_LIBS = $(termios03_LDLIBS)
+
+termios03$(EXEEXT): $(termios03_OBJECTS) $(termios03_DEPENDENCIES)
+	@rm -f termios03$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/libtests/termios03/init.c:1.1
--- /dev/null	Fri Jun 25 12:33:19 2010
+++ rtems/testsuites/libtests/termios03/init.c	Fri Jun 25 11:52:26 2010
@@ -0,0 +1,78 @@
+/*
+ *  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 "termios_testdriver_polled.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+void write_helper(
+  int        fd,
+  const char *c
+)
+{
+  size_t len;
+  int    rc;
+  
+  len = strlen( c );
+  rc = write( fd, c, len );
+  rtems_test_assert( rc == len );
+}
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  int  fd;
+  int  rc;
+
+  puts( "\n\n*** TEST TERMIOS03 ***" );
+
+  puts( "open(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+  fd = open( TERMIOS_TEST_DRIVER_DEVICE_NAME, O_RDWR );
+  rtems_test_assert( fd != -1 );
+
+  write_helper( fd, "This is a test\n" );
+
+  puts( "close(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+  rc = close( fd );
+  rtems_test_assert( rc == 0 );
+
+  puts( "*** END OF TEST TERMIOS03 ***" );
+
+  rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
+  TERMIOS_TEST_DRIVER_TABLE_ENTRY
+
+/* include an extra slot for registering the termios one dynamically */
+#define CONFIGURE_MAXIMUM_DRIVERS 3
+
+/* one for the console and one for the test port */
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 3
+
+/* we need to be able to open the test device */
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+#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/libtests/termios03/termios03.doc:1.1
--- /dev/null	Fri Jun 25 12:33:19 2010
+++ rtems/testsuites/libtests/termios03/termios03.doc	Fri Jun 25 11:52:26 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:  termios03
+
+directives:
+
+  + various termios services
+
+concepts:
+
++ exercise termios polled support for input and output

diff -u /dev/null rtems/testsuites/libtests/termios03/termios03.scn:1.1
--- /dev/null	Fri Jun 25 12:33:19 2010
+++ rtems/testsuites/libtests/termios03/termios03.scn	Fri Jun 25 11:52:26 2010
@@ -0,0 +1 @@
+XXX fill in with test output

diff -u /dev/null rtems/testsuites/libtests/termios03/termios_testdriver_polled.h:1.1
--- /dev/null	Fri Jun 25 12:33:19 2010
+++ rtems/testsuites/libtests/termios03/termios_testdriver_polled.h	Fri Jun 25 11:52:26 2010
@@ -0,0 +1,157 @@
+/**
+ * @file termios_testdriver.h
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2009.
+ *  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$
+ */
+
+#ifndef _TERMIOS_TESTDRIVER_H
+#define _TERMIOS_TESTDRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  This macro defines the standard name for the Termios Test device
+ *  that is available to applications.
+ */
+#define TERMIOS_TEST_DRIVER_DEVICE_NAME "/dev/test"
+
+/**
+ *  This macro defines the standard device driver table entry for
+ *  a Termios Test device driver.
+ */
+#define TERMIOS_TEST_DRIVER_TABLE_ENTRY \
+  { termios_test_driver_initialize, termios_test_driver_open, \
+    termios_test_driver_close, termios_test_driver_read, \
+    termios_test_driver_write, termios_test_driver_control }
+
+/**
+ *  @brief Console Initialization Entry Point
+ *
+ *  This method initializes the Termios Test device driver.
+ *
+ *  @param[in] major is the device driver major number
+ *  @param[in] minor is the device driver minor number
+ *  @param[in] arg is the parameters to this call
+ *
+ *  @return This method returns RTEMS_SUCCESSFUL when
+ *          the device driver is successfully initialized.
+ */
+rtems_device_driver termios_test_driver_initialize(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void                      *arg
+);
+
+/**
+ *  @brief Console Open Entry Point
+ *
+ *  This method opens a specific device supported by the
+ *  Termios Test device driver.
+ *
+ *  @param[in] major is the device driver major number
+ *  @param[in] minor is the device driver minor number
+ *  @param[in] arg is the parameters to this call
+ *
+ *  @return This method returns RTEMS_SUCCESSFUL when
+ *          the device driver is successfully opened.
+ */
+rtems_device_driver termios_test_driver_open(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void                      *arg
+);
+
+/**
+ *  @brief Console Close Entry Point
+ *
+ *  This method closes a specific device supported by the
+ *  Termios Test device driver.
+ *
+ *  @param[in] major is the device driver major number
+ *  @param[in] minor is the device driver minor number
+ *  @param[in] arg is the parameters to this call
+ *
+ *  @return This method returns RTEMS_SUCCESSFUL when
+ *          the device is successfully closed.
+ */
+rtems_device_driver termios_test_driver_close(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void                      *arg
+);
+
+/**
+ *  @brief Console Read Entry Point
+ *
+ *  This method reads from a specific device supported by the
+ *  Termios Test device driver.
+ *
+ *  @param[in] major is the device driver major number
+ *  @param[in] minor is the device driver minor number
+ *  @param[in] arg is the parameters to this call
+ *
+ *  @return This method returns RTEMS_SUCCESSFUL when
+ *          the device is successfully read from.
+ */
+rtems_device_driver termios_test_driver_read(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void                      *arg
+);
+
+/**
+ *  @brief Console Write Entry Point
+ *
+ *  This method writes to a specific device supported by the
+ *  Termios Test device driver.
+ *
+ *  @param[in] major is the device driver major number
+ *  @param[in] minor is the device driver minor number
+ *  @param[in] arg is the parameters to this call
+ *
+ *  @return This method returns RTEMS_SUCCESSFUL when
+ *          the device is successfully written.
+ */
+rtems_device_driver termios_test_driver_write(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void                      *arg
+);
+
+/**
+ *  @brief Console IO Control Entry Point
+ *
+ *  This method performs an IO Control operation on a
+ *  specific device supported by the Termios Test device driver.
+ *
+ *  @param[in] major is the device driver major number
+ *  @param[in] minor is the device driver minor number
+ *  @param[in] arg is the parameters to this call
+ *
+ *  @return This method returns RTEMS_SUCCESSFUL when
+ *          the device driver IO control operation is
+ *          successfully performed.
+ */
+rtems_device_driver termios_test_driver_control(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void                      *arg
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */

diff -u /dev/null rtems/testsuites/libtests/termios03/termios_testdriver_polled.c:1.1
--- /dev/null	Fri Jun 25 12:33:19 2010
+++ rtems/testsuites/libtests/termios03/termios_testdriver_polled.c	Fri Jun 25 11:52:26 2010
@@ -0,0 +1,139 @@
+/*
+ *  This file contains a test fixture termios device driver
+ *
+ *  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 <rtems/libio.h>
+#include <stdlib.h>
+#include <termios.h>
+#include <rtems/termiostypes.h>
+#include "termios_testdriver_polled.h"
+#include <unistd.h>
+
+int termios_test_driver_inbyte_nonblocking( int port )
+{
+  return -1;
+}
+
+void termios_test_driver_outbyte_polled(
+  int  port,
+  char ch
+)
+{
+  write( 2, &ch, 1 );
+}
+
+ssize_t termios_test_driver_write_support (int minor, const char *buf, size_t len)
+{
+  size_t nwrite = 0;
+
+  while (nwrite < len) {
+    termios_test_driver_outbyte_polled( minor, *buf++ );
+    nwrite++;
+  }
+  return nwrite;
+}
+
+
+/*
+ *  Set Attributes Handler
+ */
+int termios_test_driver_set_attributes(
+  int                   minor,
+  const struct termios *t
+)
+{
+  return 0;
+}
+
+/*
+ *  Test Device Driver Entry Points
+ */
+rtems_device_driver termios_test_driver_initialize(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void                      *arg
+)
+{
+  rtems_termios_initialize();
+
+  /*
+   *  Register Device Names
+   */
+  (void) rtems_io_register_name( TERMIOS_TEST_DRIVER_DEVICE_NAME, major, 0 );
+
+  return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver termios_test_driver_open(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  rtems_status_code sc;
+  static const rtems_termios_callbacks Callbacks = {
+    NULL,                                    /* firstOpen */
+    NULL,                                    /* lastClose */
+    termios_test_driver_inbyte_nonblocking,  /* pollRead */
+    termios_test_driver_write_support,       /* write */
+    termios_test_driver_set_attributes,      /* setAttributes */
+    NULL,                                    /* stopRemoteTx */
+    NULL,                                    /* startRemoteTx */
+    0                                        /* outputUsesInterrupts */
+  };
+
+  if ( minor > 2 ) {
+    puts( "ERROR - Termios_testdriver - only 1 minor supported" );
+    rtems_test_exit(0);
+  }
+
+  sc = rtems_termios_open (major, minor, arg, &Callbacks);
+
+  return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver termios_test_driver_close(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  return rtems_termios_close (arg);
+}
+
+rtems_device_driver termios_test_driver_read(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  return rtems_termios_read (arg);
+}
+
+rtems_device_driver termios_test_driver_write(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  return rtems_termios_write (arg);
+}
+
+rtems_device_driver termios_test_driver_control(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  return rtems_termios_ioctl (arg);
+}


 *joel*:
2010-06-25	Joel Sherrill <joel.sherrilL at OARcorp.com>

	* support/src/tmtests_support.c: Fix warning.

M  1.168  testsuites/ChangeLog
M    1.2  testsuites/support/src/tmtests_support.c

diff -u rtems/testsuites/ChangeLog:1.167 rtems/testsuites/ChangeLog:1.168
--- rtems/testsuites/ChangeLog:1.167	Mon Jun 21 11:54:17 2010
+++ rtems/testsuites/ChangeLog	Fri Jun 25 11:58:59 2010
@@ -1,3 +1,7 @@
+2010-06-25	Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+	* support/src/tmtests_support.c: Fix warning.
+
 2010-06-21	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* support/include/test_support.h, support/src/tmtests_empty_function.c:

diff -u rtems/testsuites/support/src/tmtests_support.c:1.1 rtems/testsuites/support/src/tmtests_support.c:1.2
--- rtems/testsuites/support/src/tmtests_support.c:1.1	Mon Jun 21 11:54:17 2010
+++ rtems/testsuites/support/src/tmtests_support.c	Fri Jun 25 11:59:06 2010
@@ -27,9 +27,9 @@
   int                       overhead
 )
 {
-  int i;
-  int loop_overhead;
-  int end_time;
+  int  i;
+  long loop_overhead;
+  int  end_time;
 
   benchmark_timer_initialize();
     for (i=0 ; i<iterations ; i++ ) {



--

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/20100625/c3f338a5/attachment.html>


More information about the vc mailing list