Changeset ba959a4b in rtems


Ignore:
Timestamp:
Jul 14, 2010, 11:17:48 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
830c6ee
Parents:
fa126921
Message:

2010-07-14 Joel Sherrill <joel.sherrill@…>

  • spprintk/init.c, spprintk/spprintk.doc, spprintk/spprintk.scn: Clean up and add test of getchark().
Location:
testsuites/sptests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    rfa126921 rba959a4b  
     12010-07-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * spprintk/init.c, spprintk/spprintk.doc, spprintk/spprintk.scn: Clean
     4        up and add test of getchark().
     5
    162010-07-14      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • testsuites/sptests/spprintk/init.c

    rfa126921 rba959a4b  
    11/*
    2  *  Exercise Printk
     2 *  Exercise putk, printk, and getchark
    33 *
    4  *  COPYRIGHT (c) 1989-2009.
     4 *  COPYRIGHT (c) 1989-2010.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    1313
    1414#include <tmacros.h>
     15#include <rtems/bspIo.h>
    1516
    16 rtems_task Init(
    17   rtems_task_argument argument
    18 )
     17int test_getchar(void)
    1918{
    20   printk( "\n\n*** TEST PRINTK ***\n" );
     19  return 0x35;
     20}
    2121
    22   putk( "This is a test of putk\n" );
     22void do_getchark(void)
     23{
     24  int                                sc;
     25  BSP_polling_getchar_function_type  poll_char;
    2326
     27  poll_char = BSP_poll_char;
     28
     29  BSP_poll_char = NULL;
     30 
     31  putk( "getchark - NULL getchar method - return -1" );
     32  sc = getchark();
     33  rtems_test_assert( sc == -1 );
     34
     35  putk( "getchark - test getchar method - returns 0x35" );
     36  BSP_poll_char = test_getchar;
     37  sc = getchark();
     38  rtems_test_assert( sc == 0x35 );
     39
     40  BSP_poll_char = poll_char;
     41}
     42
     43void do_putk(void)
     44{
     45  putk( "This is a test of putk" );
     46}
     47
     48void do_printk(void)
     49{
    2450  printk( "bad format -- %%q in parentheses (%q)\n" );
    2551
     
    5379  printk( "%%-4s of joel -- (%-4s)\n", "joel" );
    5480  printk( "%%c of X -- (%c)\n", 'X' );
     81}
    5582
     83rtems_task Init(
     84  rtems_task_argument argument
     85)
     86{
     87  printk( "\n\n*** TEST PRINTK ***\n" );
     88
     89  do_putk();
     90  putk("");
     91
     92  do_printk();
     93  putk("");
     94
     95  do_getchark();
    5696
    5797  printk( "*** END OF TEST PRINTK ***\n" );
  • testsuites/sptests/spprintk/spprintk.scn

    rfa126921 rba959a4b  
    1 sparc-rtems4.10-run is /opt/rtems-4.10/bin/sparc-rtems4.10-run
    2 
    3 
    41*** TEST PRINTK ***
    52This is a test of putk
     
    2926%-4s of joel -- (joel)
    3027%c of X -- (X)
     28
     29getchark - NULL getchar method - return -1
     30getchark - test getchar method - returns 0x35
    3131*** END OF TEST PRINTK ***
Note: See TracChangeset for help on using the changeset viewer.