Changeset 96b8762 in rtems


Ignore:
Timestamp:
Jul 25, 2009, 1:31:07 AM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
7467542
Parents:
eecb545
Message:

2009-07-24 Joel Sherrill <joel.sherrill@…>

  • sp40/Makefile.am, sp40/init.c, sp40/sp40.scn: Attempt to write test to catch two remaining uncovered cases in rtems_io_register_driver.
  • sp40/system.h: Removed.
Location:
testsuites/sptests
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    reecb545 r96b8762  
     12009-07-24      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * sp40/Makefile.am, sp40/init.c, sp40/sp40.scn: Attempt to write test
     4        to catch two remaining uncovered cases in rtems_io_register_driver.
     5        * sp40/system.h: Removed.
     6
    172009-07-24      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • testsuites/sptests/sp40/Makefile.am

    reecb545 r96b8762  
    66
    77rtems_tests_PROGRAMS = sp40
    8 sp40_SOURCES = init.c system.h
     8sp40_SOURCES = init.c
    99
    1010dist_rtems_tests_DATA = sp40.scn
  • testsuites/sptests/sp40/init.c

    reecb545 r96b8762  
    1212 */
    1313
    14 #define CONFIGURE_INIT
    15 #include "system.h"
     14#include <tmacros.h>
    1615
     16rtems_device_driver test_open(
     17     rtems_device_major_number  minor,
     18     rtems_device_minor_number  major,
     19     void                      *ignored
     20)
     21{
     22}
     23
     24rtems_driver_address_table test_driver = {
     25  NULL,                               /* initialization procedure */
     26  test_open,                          /* open request procedure */
     27  NULL,                               /* close request procedure */
     28  NULL,                               /* read request procedure */
     29  NULL,                               /* write request procedure */
     30  NULL,                               /* special functions procedure */
     31};
    1732rtems_task Init(
    1833  rtems_task_argument argument
    1934)
    2035{
     36  rtems_status_code         sc;
     37  rtems_device_major_number registered;
     38
    2139  puts( "\n\n*** TEST 40 ***" );
    2240
    23   puts( "TBD - Write test case matching this description" );
    24 
    2541  /*
    26    *  Register two drivers to fill up the table
     42   *  Register a driver with init == NULL and open != NULL
    2743   */
    2844
    29   /* add major = 4 */
     45  puts( "Init - rtems_io_register_driver - init == NULL, open != NULL OK" );
     46  sc = rtems_io_register_driver( 0, &test_driver, &registered );
     47  printf( "Init - Major slot returned = %d\n", (int) registered );
     48  directive_failed( sc, "rtems_io_register_driver" );
    3049
    31   /* add major = 3 */
    32 
    33   /*
    34    *  Unregister major = 3 to leave slot which is not at
    35    *  the end of the Driver Table.
    36    */
     50  puts( "Init - rtems_io_register_driver - used slot" );
     51  sc = rtems_io_register_driver( 1, &test_driver, &registered );
     52  fatal_directive_status(
     53    sc,
     54    RTEMS_RESOURCE_IN_USE,
     55    "rtems_io_register_driver slot in use"
     56  );
    3757
    3858  puts( "*** END OF TEST 40 ***" );
    3959  rtems_test_exit( 0 );
    4060}
     61
     62
     63/* functions */
     64
     65rtems_task Init(
     66  rtems_task_argument argument
     67);
     68
     69/* configuration information */
     70
     71#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
     72#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
     73
     74/* more one more driver slot than are statically configured */
     75#define CONFIGURE_MAXIMUM_DRIVERS 4
     76
     77#define CONFIGURE_MAXIMUM_TASKS  1
     78#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
     79
     80#define CONFIGURE_INIT
     81#include <rtems/confdefs.h>
     82
     83/* end of include file */
  • testsuites/sptests/sp40/sp40.scn

    reecb545 r96b8762  
    11*** TEST 40 ***
    2 TBD - Write test case matching this description
     2Init - rtems_io_register_driver - init == NULL, open != NULL OK
     3Init - Major slot returned = 3
     4Init - rtems_io_register_driver - used slot
    35*** END OF TEST 40 ***
Note: See TracChangeset for help on using the changeset viewer.