Ticket #2897: 0003-test-suites-are-updated-to-reflect-the-changes-made-.patch

File 0003-test-suites-are-updated-to-reflect-the-changes-made-.patch, 53.8 KB (added by Kevin Kirspel, on Feb 2, 2017 at 11:01:55 PM)

Testsuite Updates

  • testsuites/libtests/termios/init.c

    From 0956b6360e89b54780241cbe1a5b600dea402bee Mon Sep 17 00:00:00 2001
    From: Kevin Kirspel <kevin-kirspel@idexx.com>
    Date: Thu, 2 Feb 2017 14:20:45 -0500
    Subject: [PATCH 3/4] test suites are updated to reflect the changes made to
     termios
    
    ---
     testsuites/libtests/termios/init.c                 | 295 ++++++++++++---------
     testsuites/libtests/termios01/init.c               | 143 ++++++++--
     testsuites/libtests/termios01/termios01.scn        | 270 ++++++++++++++-----
     testsuites/libtests/termios01/termios_testdriver.c |   6 +-
     testsuites/libtests/termios02/termios02.scn        |   4 +-
     testsuites/libtests/termios03/termios03.scn        | 200 +++++++-------
     testsuites/libtests/termios04/termios04.scn        |   8 +-
     testsuites/libtests/termios05/termios05.scn        |   8 +-
     testsuites/libtests/termios06/init.c               |   8 +-
     testsuites/libtests/termios06/termios06.scn        |  24 +-
     testsuites/libtests/termios07/termios07.scn        |  21 +-
     testsuites/libtests/termios08/termios08.scn        |  19 +-
     12 files changed, 665 insertions(+), 341 deletions(-)
     mode change 100644 => 100755 testsuites/libtests/termios/init.c
     mode change 100644 => 100755 testsuites/libtests/termios01/init.c
     mode change 100644 => 100755 testsuites/libtests/termios01/termios01.scn
     mode change 100644 => 100755 testsuites/libtests/termios01/termios_testdriver.c
     mode change 100644 => 100755 testsuites/libtests/termios02/termios02.scn
     mode change 100644 => 100755 testsuites/libtests/termios03/termios03.scn
     mode change 100644 => 100755 testsuites/libtests/termios04/termios04.scn
     mode change 100644 => 100755 testsuites/libtests/termios05/termios05.scn
     mode change 100644 => 100755 testsuites/libtests/termios06/init.c
     mode change 100644 => 100755 testsuites/libtests/termios06/termios06.scn
     mode change 100644 => 100755 testsuites/libtests/termios07/termios07.scn
     mode change 100644 => 100755 testsuites/libtests/termios08/termios08.scn
    
    diff --git a/testsuites/libtests/termios/init.c b/testsuites/libtests/termios/init.c
    old mode 100644
    new mode 100755
    index fcb586b..8fefb5f
    a b void print_c_oflag(struct termios * tp); 
    4646void print_c_lflag(struct termios * tp);
    4747void print_c_cflag(struct termios * tp);
    4848void print_c_cc(struct termios * tp);
     49void print_baud(const char* name, speed_t spd);
    4950void print_termios(struct termios *tp);
    5051unsigned long get_baud_rate(void);
    5152unsigned long get_parity(void);
    void print_c_oflag( struct termios * tp ) 
    118119  if( tp->c_oflag & ONLCR )
    119120    printf( "ONLCR " );
    120121
     122  if( tp->c_oflag & ONOEOT )
     123    printf( "ONOEOT " );
     124
    121125  if( tp->c_oflag & OCRNL )
    122126    printf( "OCRNL " );
    123127
    void print_c_lflag( struct termios * tp ) 
    231235    "unknown",     /* 0020000 */
    232236    "PENDIN",      /* 0040000 */
    233237    "IEXTEN",      /* 0100000 */
    234     "unknown",     /* 0200000 */
    235     "unknown",     /* 0400000 */
    236     "unknown",     /* 1000000 */
     238    "ALTWERASE",   /* 0200000 */
     239    "EXTPROC",     /* 0400000 */
     240    "NOKERNINFO",  /* 1000000 */
    237241    "unknown",     /* 2000000 */
    238242    "unknown",     /* 4000000 */
    239243  };
    void print_c_lflag( struct termios * tp ) 
    246250
    247251void print_c_cflag( struct termios * tp )
    248252{
    249   unsigned int baud;
    250 
    251253  printf( "c_cflag = 0x%08x\n", tp->c_cflag );
    252254
    253   baud = (tp->c_cflag & CBAUD) ;
    254   if ( tp->c_cflag & CBAUDEX )
    255   switch( baud ) {
     255  switch( tp->c_cflag & CSIZE ) {
     256    case CS5:
     257      printf( "\tCSIZE =\tCS5\n" );
     258      break;
     259
     260    case CS6:
     261      printf( "\tCSIZE =\tCS6\n" );
     262      break;
     263
     264    case CS7:
     265      printf( "\tCSIZE =\tCS7\n" );
     266      break;
     267
     268    case CS8:
     269      printf( "\tCSIZE =\tCS8\n" );
     270      break;
     271  }
     272
     273  if( tp->c_cflag & CIGNORE )
     274    printf( "\tCIGNORE set: iqnore c_cflags enabled\n" );
     275  else
     276    printf( "\tCIGNORE clear: iqnore c_cflags disabled\n" );
     277
     278  if( tp->c_cflag & CSTOPB )
     279    printf( "\tCSTOPB set: send 2 stop bits\n" );
     280  else
     281    printf( "\tCSTOPB clear: send 1 stop bit\n" );
     282
     283  if( tp->c_cflag & PARENB )
     284    printf( "\tPARENB set: parity enabled\n" );
     285  else
     286    printf( "\tPARENB clear: parity disabled\n" );
     287
     288  if( tp->c_cflag & PARODD )
     289    printf( "\tPARODD set: parity odd\n" );
     290  else
     291    printf( "\tPARODD clear: parity even\n" );
     292
     293  if( tp->c_cflag & CREAD )
     294    printf( "\tCREAD set: receiver enabled\n" );
     295  else
     296    printf( "\tCREAD clear: treceiver disabled\n" );
     297
     298  if( tp->c_cflag & HUPCL )
     299    printf( "\tHUPCL set: enabled\n" );
     300  else
     301    printf( "\tHUPCL clear: disabled\n" );
     302
     303  if( tp->c_cflag & CLOCAL )
     304    printf( "\tCLOCAL set: ignore modem lines\n" );
     305  else
     306    printf( "\tCLOCAL clear: don't ignore modem lines\n" );
     307
     308  if( tp->c_cflag & CCTS_OFLOW )
     309    printf( "\tCCTS_OFLOW: hardware CTS output flow control enabled\n" );
     310  else
     311    printf( "\tCCTS_OFLOW: hardware CTS output flow control disabled\n" );
     312
     313  if( tp->c_cflag & CRTS_IFLOW )
     314    printf( "\tCRTS_IFLOW: hardware RTS input flow control enabled\n" );
     315  else
     316    printf( "\tCRTS_IFLOW: hardware RTS input flow control disabled\n" );
     317
     318  if(( tp->c_cflag & CRTSCTS ) == CRTSCTS)
     319    printf( "\tCRTSCTS: hardware flow control enabled\n" );
     320  else
     321    printf( "\tCRTSCTS: hardware flow control disabled\n" );
     322
     323  if( tp->c_cflag & CDSR_OFLOW )
     324    printf( "\tCDSR_OFLOW: hardware DSR output flow control enabled\n" );
     325  else
     326    printf( "\tCDSR_OFLOW: hardware DSR output flow control disabled\n" );
     327
     328  if( tp->c_cflag & CDTR_IFLOW )
     329    printf( "\tCDTR_IFLOW: hardware DTR input flow control enabled\n" );
     330  else
     331    printf( "\tCDTR_IFLOW: hardware DTR input flow control disabled\n" );
     332
     333  if( tp->c_cflag & CCAR_OFLOW )
     334    printf( "\tCCAR_OFLOW: hardware CD output flow control enabled\n" );
     335  else
     336    printf( "\tCCAR_OFLOW: hardware CD output flow control disabled\n" );
     337}
     338
     339
     340void print_c_cc( struct termios * tp )
     341{
     342  size_t i;
     343  char * cc_index_names [ /* NCCS */ ] = {
     344    "[VEOF]    ",   /* 0 */
     345    "[VEOL]    ",   /* 1 */
     346    "[VEOL2]   ",   /* 2 */
     347    "[VERASE]  ",   /* 3 */
     348    "[VWERASE] ",   /* 4 */
     349    "[VKILL]   ",   /* 5 */
     350    "[VREPRINT]",   /* 6 */
     351    "[VERASE2] ",   /* 7 */
     352    "[VINTR]   ",   /* 8 */
     353    "[VQUIT]   ",   /* 9 */
     354    "[VSUSP]   ",   /* 10 */
     355    "[VDSUSP]  ",   /* 11 */
     356    "[VSTART]  ",   /* 12 */
     357    "[VSTOP]   ",   /* 13 */
     358    "[VLNEXT]  ",   /* 14 */
     359    "[VDISCARD]",   /* 15 */
     360    "[VMIN]    ",   /* 16 */
     361    "[VTIME]   ",   /* 17 */
     362    "[VSTATUS] ",   /* 18 */
     363    "unknown   ",   /* 19 */
     364  };
     365
     366  for( i = 0; i < sizeof(cc_index_names)/sizeof(char*) ; i++ ) {
     367    printf( "c_cc%s = 0x%08x\n", cc_index_names[i], tp->c_cc[i] );
     368  }
     369}
     370
     371void print_baud( const char* name, speed_t spd )
     372{
     373  switch( spd ) {
    256374    case B0:
    257       printf( "\tCBAUD =\tB0\n" );
     375      printf( "%s = B0\n", name );
    258376      break;
    259377
    260378    case B50:
    261       printf( "\tCBAUD =\tB50\n" );
     379      printf( "%s = B50\n", name );
    262380      break;
    263381
    264382    case B75:
    265       printf( "\tCBAUD =\tB75\n" );
     383      printf( "%s = B75\n", name );
    266384      break;
    267385
    268386    case B110:
    269       printf( "\tCBAUD =\tB110\n" );
     387      printf( "%s = B110\n", name );
    270388      break;
    271389
    272390    case B134:
    273       printf( "\tCBAUD =\tB134\n" );
     391      printf( "%s = B134\n", name );
    274392      break;
    275393
    276394    case B150:
    277       printf( "\tCBAUD =\tB150\n" );
     395      printf( "%s = B150\n", name );
    278396      break;
    279397
    280398    case B200:
    281       printf( "\tCBAUD =\tB200\n" );
     399      printf( "%s = B200\n", name );
    282400      break;
    283401
    284402    case B300:
    285       printf( "\tCBAUD =\tB300\n" );
     403      printf( "%s = B300\n", name );
    286404      break;
    287405
    288406    case B600:
    289       printf( "\tCBAUD =\tB600\n" );
     407      printf( "%s = B600\n", name );
    290408      break;
    291409
    292410    case B1200:
    293       printf( "\tCBAUD =\tB1200\n" );
     411      printf( "%s = B1200\n", name );
    294412      break;
    295413
    296414    case B1800:
    297       printf( "\tCBAUD =\tB1800\n" );
     415      printf( "%s = B1800\n", name );
    298416      break;
    299417
    300418    case B2400:
    301       printf( "\tCBAUD =\tB2400\n" );
     419      printf( "%s = B2400\n", name );
    302420      break;
    303421
    304422    case B4800:
    305       printf( "\tCBAUD =\tB4800\n" );
     423      printf( "%s = B4800\n", name );
    306424      break;
    307425
    308426    case B9600:
    309       printf( "\tCBAUD =\tB9600\n" );
     427      printf( "%s = B9600\n", name );
    310428      break;
    311429
    312430    case B19200:
    313       printf( "\tCBAUD =\tB19200\n" );
     431      printf( "%s = B19200\n", name );
    314432      break;
    315433
    316434    case B38400:
    317       printf( "\tCBAUD =\tB38400\n" );
     435      printf( "%s = B38400\n", name );
    318436      break;
    319437
    320     case B57600:
    321       printf( "\tCBAUD =\tB57600\n" );
     438    case B7200:
     439      printf( "%s = B7200\n", name );
    322440      break;
    323441
    324     case B115200:
    325       printf( "\tCBAUD =\tB115200\n" );
     442    case B14400:
     443      printf( "%s = B14400\n", name );
    326444      break;
    327445
    328     case B230400:
    329       printf( "\tCBAUD =\tB230400\n" );
     446    case B28800:
     447      printf( "%s = B28800\n", name );
    330448      break;
    331449
    332     case B460800:
    333       printf( "\tCBAUD =\tB460800\n" );
     450    case B57600:
     451      printf( "%s = B57600\n", name );
    334452      break;
    335453
    336     default:
    337       printf( "\tCBAUD =\tunknown (0x%08x)\n", baud );
     454    case B76800:
     455      printf( "%s = B76800\n", name );
    338456      break;
    339     }
    340457
    341   switch( tp->c_cflag & CSIZE ) {
    342     case CS5:
    343       printf( "\tCSIZE =\tCS5\n" );
     458    case B115200:
     459      printf( "%s = B115200\n", name );
    344460      break;
    345461
    346     case CS6:
    347       printf( "\tCSIZE =\tCS6\n" );
     462    case B230400:
     463      printf( "%s = B230400\n", name );
    348464      break;
    349465
    350     case CS7:
    351       printf( "\tCSIZE =\tCS7\n" );
     466    case B460800:
     467      printf( "%s = B460800\n", name );
    352468      break;
    353469
    354     case CS8:
    355       printf( "\tCSIZE =\tCS8\n" );
     470    case B921600:
     471      printf( "%s = B921600\n", name );
    356472      break;
    357   }
    358 
    359   if( tp->c_cflag & CSTOPB )
    360     printf( "\tCSTOPB set: send 2 stop bits\n" );
    361   else
    362     printf( "\tCSTOPB clear: send 1 stop bit\n" );
    363 
    364   if( tp->c_cflag & PARENB )
    365     printf( "\tPARENB set: parity enabled\n" );
    366   else
    367     printf( "\tPARENB clear: parity disabled\n" );
    368 
    369   if( tp->c_cflag & PARODD )
    370     printf( "\tPARODD set: parity odd\n" );
    371   else
    372     printf( "\tPARODD clear: parity even\n" );
    373 
    374   if( tp->c_cflag & CREAD )
    375     printf( "\tCREAD set: receiver enabled\n" );
    376   else
    377     printf( "\tCREAD clear: treceiver disabled\n" );
    378473
    379   if( tp->c_cflag & HUPCL )
    380     printf( "\tHUPCL set: enabled\n" );
    381   else
    382     printf( "\tHUPCL clear: disabled\n" );
    383 
    384   if( tp->c_cflag & CLOCAL )
    385     printf( "\tCLOCAL set: ignore modem lines\n" );
    386   else
    387     printf( "\tCLOCAL clear: don't ignore modem lines\n" );
    388 
    389 #if defined(CBAUDEX)
    390   if( tp->c_cflag & CBAUDEX )
    391     printf( "\tCBAUDEX set: What does this do?\n" );
    392   else
    393     printf( "\tCBAUDEX clear: What does this do?\n" );
    394 #endif
    395 
    396   if( tp->c_cflag & CRTSCTS )
    397     printf( "\tCRTSCTS: harware flow control enabled?\n" );
    398   else
    399     printf( "\tCRTSCTS: hardware flow control disabled?\n" );
    400 }
    401 
    402 
    403 void print_c_cc( struct termios * tp )
    404 {
    405   size_t i;
    406   char * cc_index_names [ /* NCCS */ ] = {
    407     "[VINTR]   ",   /* 0 */
    408     "[VQUIT]   ",   /* 1 */
    409     "[VERASE]  ",   /* 2 */
    410     "[VKILL]   ",   /* 3 */
    411     "[VEOF]    ",   /* 4 */
    412     "[VTIME]   ",   /* 5 */
    413     "[VMIN]    ",   /* 6 */
    414     "[VSWTC    ",   /* 7 */
    415     "[VSTART]  ",   /* 8 */
    416     "[VSTOP]   ",   /* 9 */
    417     "[VSUSP]   ",   /* 10 */
    418     "[VEOL]    ",   /* 11 */
    419     "[VREPRINT]",   /* 12 */
    420     "[VDISCARD]",   /* 13 */
    421     "[VWERASE] ",   /* 14 */
    422     "[VLNEXT   ",   /* 15 */
    423     "[VEOL2]   ",   /* 16 */
    424     "unknown   ",   /* 17 */
    425     "unknown   ",   /* 18 */
    426   };
    427 
    428   for( i = 0; i < sizeof(cc_index_names)/sizeof(char*) ; i++ ) {
    429     printf( "c_cc%s = 0x%08x\n", cc_index_names[i], tp->c_cc[i] );
    430   }
     474    default:
     475      printf( "%s = unknown (0x%08x)\n", name, (unsigned int)spd );
     476      break;
     477    }
    431478}
    432479
    433480
    void print_termios( struct termios *tp ) 
    439486  print_c_cflag( tp );
    440487  print_c_lflag( tp );
    441488  print_c_cc( tp );
     489  print_baud( "c_ispeed", tp->c_ispeed );
     490  print_baud( "c_ospeed", tp->c_ospeed );
    442491  printf( "\n" );
    443492}
    444493
    unsigned long get_baud_rate(void) 
    450499  while( 1 ) {
    451500    printf( "Enter the numerical value for the new baud rate.\n" );
    452501    printf( "Choices are: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800\n" );
    453     printf( "2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800\n" );
     502    printf( "2400, 4800, 9600, 19200, 38400, 7200, 14400, 28800, 57600, 76800\n" );
     503    printf( "115200, 230400, 460800, 921600\n" );
    454504    printf( "\nYour choice: " );
    455505    scanf( "%lu", &baud_rate );
    456506    printf( "\n" );
    unsigned long get_baud_rate(void) 
    470520      case 9600:   return B9600;
    471521      case 19200:  return B19200;
    472522      case 38400:  return B38400;
     523      case 7200:   return B7200;
     524      case 14400:  return B14400;
     525      case 28800:  return B28800;
    473526      case 57600:  return B57600;
     527      case 76800:  return B76800;
    474528      case 115200: return B115200;
    475529      case 230400: return B230400;
    476530      case 460800: return B460800;
     531      case 921600: return B921600;
    477532
    478533      default:
    479534        printf( "%lu is not a valid choice. Try again.\n\n", baud_rate );
    void change_line_settings( struct termios *tp ) 
    589644
    590645  sleep( sleep_time );
    591646
    592   tp->c_cflag = CLOCAL | CREAD | parity | stop_bits | data_bits | baud_rate;
     647  tp->c_cflag = CLOCAL | CREAD | parity | stop_bits | data_bits;
     648  tp->c_ispeed = baud_rate;
     649  tp->c_ospeed = baud_rate;
    593650  if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
    594651    perror( "change_line_settings(): tcsetattr() failed" );
    595652    rtems_test_exit( 1 );
  • testsuites/libtests/termios01/init.c

    diff --git a/testsuites/libtests/termios01/init.c b/testsuites/libtests/termios01/init.c
    old mode 100644
    new mode 100755
    index 64c3bb2..727efe0
    a b  
    1212#endif
    1313
    1414#include "tmacros.h"
     15#define TTYDEFCHARS
    1516#include <termios.h>
    1617#include <rtems/libcsupport.h>
    1718#include <rtems/malloc.h>
    static const termios_baud_test_r baud_table[] = { 
    6667  { B9600,     9600 },
    6768  { B19200,   19200 },
    6869  { B38400,   38400 },
     70  { B7200,     7200 },
     71  { B14400,   14400 },
     72  { B28800,   28800 },
    6973  { B57600,   57600 },
     74  { B76800,   76800 },
    7075  { B115200, 115200 },
    7176  { B230400, 230400 },
    7277  { B460800, 460800 },
     78  { B921600, 921600 },
    7379  { INVALID_CONSTANT, INVALID_BAUD }
    7480};
    7581
    static void test_termios_set_baud( 
    233239
    234240  puts( "Test termios setting device baud rate..." );
    235241  for (i=0 ; baud_table[i].constant != INVALID_CONSTANT ; i++ ) {
    236     tcflag_t cbaud = CBAUD;
    237 
    238242    sc = tcgetattr( test, &attr );
    239243    if ( sc != 0 ) {
    240244      printf( "ERROR - return %d\n", sc );
    241245      rtems_test_exit(0);
    242246    }
    243247
    244     attr.c_cflag &= ~cbaud;
    245     attr.c_cflag |= baud_table[i].constant;
     248    attr.c_ispeed = baud_table[i].constant;
     249    attr.c_ospeed = baud_table[i].constant;
    246250
    247251    printf(
    248252      "tcsetattr(TCSANOW, B%" PRIdrtems_termios_baud_t ") - OK\n",
    static void test_termios_set_baud( 
    258262      "tcsetattr(TCSADRAIN, B%" PRIdrtems_termios_baud_t ") - OK\n",
    259263      baud_table[i].baud
    260264    );
    261     sc = tcsetattr( test, TCSANOW, &attr );
     265    sc = tcsetattr( test, TCSADRAIN, &attr );
     266    if ( sc != 0 ) {
     267      printf( "ERROR - return %d\n", sc );
     268      rtems_test_exit(0);
     269    }
     270
     271    printf(
     272      "tcsetattr(TCSAFLUSH, B%" PRIdrtems_termios_baud_t ") - OK\n",
     273      baud_table[i].baud
     274    );
     275    sc = tcsetattr( test, TCSAFLUSH, &attr );
    262276    if ( sc != 0 ) {
    263277      printf( "ERROR - return %d\n", sc );
    264278      rtems_test_exit(0);
    static void test_termios_set_charsize( 
    301315    }
    302316
    303317    printf( "tcsetattr(TCSADRAIN, CS%d) - OK\n", char_size_table[i].bits );
    304     sc = tcsetattr( test, TCSANOW, &attr );
     318    sc = tcsetattr( test, TCSADRAIN, &attr );
     319    if ( sc != 0 ) {
     320      printf( "ERROR - return %d\n", sc );
     321      rtems_test_exit(0);
     322    }
     323
     324    printf( "tcsetattr(TCSAFLUSH, CS%d) - OK\n", char_size_table[i].bits );
     325    sc = tcsetattr( test, TCSAFLUSH, &attr );
     326    if ( sc != 0 ) {
     327      printf( "ERROR - return %d\n", sc );
     328      rtems_test_exit(0);
     329    }
     330
     331    printf( "tcsetattr(TCSASOFT, CS%d) - OK\n", char_size_table[i].bits );
     332    sc = tcsetattr( test, TCSASOFT, &attr );
    305333    if ( sc != 0 ) {
    306334      printf( "ERROR - return %d\n", sc );
    307335      rtems_test_exit(0);
    static void test_termios_set_parity( 
    344372    }
    345373
    346374    printf( "tcsetattr(TCSADRAIN, %s) - OK\n", parity_table[i].parity );
    347     sc = tcsetattr( test, TCSANOW, &attr );
     375    sc = tcsetattr( test, TCSADRAIN, &attr );
     376    if ( sc != 0 ) {
     377      printf( "ERROR - return %d\n", sc );
     378      rtems_test_exit(0);
     379    }
     380
     381    printf( "tcsetattr(TCSAFLUSH, %s) - OK\n", parity_table[i].parity );
     382    sc = tcsetattr( test, TCSAFLUSH, &attr );
     383    if ( sc != 0 ) {
     384      printf( "ERROR - return %d\n", sc );
     385      rtems_test_exit(0);
     386    }
     387
     388    printf( "tcsetattr(TCSASOFT, %s) - OK\n", parity_table[i].parity );
     389    sc = tcsetattr( test, TCSASOFT, &attr );
    348390    if ( sc != 0 ) {
    349391      printf( "ERROR - return %d\n", sc );
    350392      rtems_test_exit(0);
    static void test_termios_set_stop_bits( 
    390432    }
    391433
    392434    printf( "tcsetattr(TCSADRAIN, %d bits) - OK\n", stop_bits_table[i].stop );
    393     sc = tcsetattr( test, TCSANOW, &attr );
     435    sc = tcsetattr( test, TCSADRAIN, &attr );
     436    if ( sc != 0 ) {
     437      printf( "ERROR - return %d\n", sc );
     438      rtems_test_exit(0);
     439    }
     440
     441    printf( "tcsetattr(TCSAFLUSH, %d bits) - OK\n", stop_bits_table[i].stop );
     442    sc = tcsetattr( test, TCSAFLUSH, &attr );
     443    if ( sc != 0 ) {
     444      printf( "ERROR - return %d\n", sc );
     445      rtems_test_exit(0);
     446    }
     447
     448    printf( "tcsetattr(TCSASOFT, %d bits) - OK\n", stop_bits_table[i].stop );
     449    sc = tcsetattr( test, TCSASOFT, &attr );
    394450    if ( sc != 0 ) {
    395451      printf( "ERROR - return %d\n", sc );
    396452      rtems_test_exit(0);
    static void test_termios_cfoutspeed(void) 
    404460  int sc;
    405461  speed_t speed;
    406462  struct termios term;
    407   tcflag_t        bad;
     463  speed_t        bad;
    408464
    409   bad = CBAUD << 1;
     465  bad = B921600 << 1;
    410466  memset( &term, '\0', sizeof(term) );
    411467  puts( "cfsetospeed(BAD BAUD) - EINVAL" );
    412468  sc = cfsetospeed( &term, bad );
    static void test_termios_cfinspeed(void) 
    436492  int             sc;
    437493  speed_t         speed;
    438494  struct termios  term;
    439   tcflag_t        bad;
     495  speed_t         bad;
    440496
    441   bad = CBAUD << 1;
     497  bad = B921600 << 1;
    442498  memset( &term, '\0', sizeof(term) );
    443499  puts( "cfsetispeed(BAD BAUD) - EINVAL" );
    444500  sc = cfsetispeed( &term, bad );
    static void test_termios_cfsetspeed(void) 
    469525  int             status;
    470526  speed_t         speed;
    471527  struct termios  term;
    472   tcflag_t        bad;
     528  speed_t         bad;
    473529
    474   bad = CBAUD << 1;
     530  bad = B921600 << 1;
    475531  memset( &term, '\0', sizeof(term) );
    476532  puts( "cfsetspeed(BAD BAUD) - EINVAL" );
    477533  status = cfsetspeed( &term, bad );
    static void test_termios_cfmakeraw(void) 
    508564  puts( "cfmakeraw - OK" );
    509565
    510566  /* Check that all of the flags were set correctly */
    511   rtems_test_assert( ~(term.c_iflag & (IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON)) );
     567  rtems_test_assert( ~(term.c_iflag & (IMAXBEL|IXOFF|INPCK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IGNPAR)) );
     568
     569  rtems_test_assert( term.c_iflag & (IGNBRK) );
    512570
    513571  rtems_test_assert( ~(term.c_oflag & OPOST) );
    514572
    515   rtems_test_assert( ~(term.c_lflag & (ECHO|ECHONL|ICANON|ISIG|IEXTEN)) );
     573  rtems_test_assert( ~(term.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ICANON|ISIG|IEXTEN|NOFLSH|TOSTOP|PENDIN)) );
    516574
    517575  rtems_test_assert( ~(term.c_cflag & (CSIZE|PARENB)) );
    518576
    519   rtems_test_assert( term.c_cflag & CS8 );
     577  rtems_test_assert( term.c_cflag & (CS8|CREAD) );
     578
     579  rtems_test_assert( term.c_cc[VMIN] == 1 );
     580
     581  rtems_test_assert( term.c_cc[VTIME] == 0 );
     582}
     583
     584static void test_termios_cfmakesane(void)
     585{
     586  struct termios  term;
     587
     588  memset( &term, '\0', sizeof(term) );
     589  cfmakesane( &term );
     590  puts( "cfmakesane - OK" );
     591
     592  /* Check that all of the flags were set correctly */
     593  rtems_test_assert( term.c_iflag == TTYDEF_IFLAG );
     594
     595  rtems_test_assert( term.c_oflag == TTYDEF_OFLAG );
     596
     597  rtems_test_assert( term.c_lflag == TTYDEF_LFLAG );
     598
     599  rtems_test_assert( term.c_cflag == TTYDEF_CFLAG );
     600
     601  rtems_test_assert( term.c_ispeed == TTYDEF_SPEED );
     602
     603  rtems_test_assert( term.c_ospeed == TTYDEF_SPEED );
     604
     605  rtems_test_assert( memcmp(&term.c_cc, ttydefchars, sizeof(term.c_cc)) == 0 );
    520606}
    521607
    522608typedef struct {
    static void test_set_attributes_error(void) 
    684770
    685771  rtems_test_assert( !ctx.done );
    686772  errno = 0;
    687   rv = ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, &term );
     773  rv = ioctl( fd, TIOCSETA, &term );
    688774  rtems_test_assert( rv == -1 );
    689775  rtems_test_assert( errno == EIO );
    690776  rtems_test_assert( ctx.done );
    static void test_set_best_baud(void) 
    702788{
    703789  static const struct {
    704790    uint32_t baud;
    705     tcflag_t cflag;
    706   } baud_to_cflag_table[] = {
     791    speed_t speed;
     792  } baud_to_speed_table[] = {
    707793    { 0,          B0 },
    708794    { 25,         B0 },
    709795    { 26,         B50 },
    static void test_set_best_baud(void) 
    731817    { 0xffffffff, B460800 }
    732818  };
    733819
    734   size_t n = RTEMS_ARRAY_SIZE(baud_to_cflag_table);
     820  size_t n = RTEMS_ARRAY_SIZE(baud_to_speed_table);
    735821  size_t i;
    736822
    737823  for ( i = 0; i < n; ++i ) {
    738824    struct termios term;
    739     tcflag_t cbaud_mask = CBAUD;
    740825
    741826    memset( &term, 0xff, sizeof( term ) );
    742     rtems_termios_set_best_baud( &term, baud_to_cflag_table[ i ].baud );
     827    rtems_termios_set_best_baud( &term, baud_to_speed_table[ i ].baud );
    743828
    744     rtems_test_assert(
    745       (term.c_cflag & cbaud_mask) == baud_to_cflag_table[ i ].cflag
    746     );
     829    rtems_test_assert( term.c_ispeed == baud_to_speed_table[ i ].speed );
     830    rtems_test_assert( term.c_ospeed == baud_to_speed_table[ i ].speed );
    747831  }
    748832}
    749833
    static rtems_task Init( 
    791875  /*
    792876   * tcsetattr - ERROR invalid operation
    793877   */
    794   puts( "tcsetattr - invalid operation - ENOTSUP" );
     878  puts( "tcsetattr - invalid operation - EINVAL" );
    795879  rc = tcsetattr( test, INT_MAX, &t );
    796880  rtems_test_assert( rc == -1 );
    797   rtems_test_assert( errno == ENOTSUP );
     881  rtems_test_assert( errno == EINVAL );
    798882
    799883  test_termios_cfmakeraw();
    800  
     884  test_termios_cfmakesane();
     885
    801886  /*
    802887   * tcsetattr - TCSADRAIN
    803888   */
  • testsuites/libtests/termios01/termios01.scn

    diff --git a/testsuites/libtests/termios01/termios01.scn b/testsuites/libtests/termios01/termios01.scn
    old mode 100644
    new mode 100755
    index c1c5470..36f1b8e
    a b  
    1 *** TEST TERMIOS 01 ***
     1*** BEGIN OF TEST TERMIOS 1 ***
    22Test termios_baud2index...
    33termios_baud_to_index(-2) - NOT OK
    44termios_baud_to_index(B0) - OK
    termios_baud_to_index(B4800) - OK 
    1717termios_baud_to_index(B9600) - OK
    1818termios_baud_to_index(B19200) - OK
    1919termios_baud_to_index(B38400) - OK
     20termios_baud_to_index(B7200) - OK
     21termios_baud_to_index(B14400) - OK
     22termios_baud_to_index(B28800) - OK
    2023termios_baud_to_index(B57600) - OK
     24termios_baud_to_index(B76800) - OK
    2125termios_baud_to_index(B115200) - OK
    2226termios_baud_to_index(B230400) - OK
    2327termios_baud_to_index(B460800) - OK
     28termios_baud_to_index(B921600) - OK
    2429
    2530Test termios_baud2number...
    2631termios_baud_to_number(-2) - NOT OK
    termios_baud_to_number(B4800) - OK 
    4045termios_baud_to_number(B9600) - OK
    4146termios_baud_to_number(B19200) - OK
    4247termios_baud_to_number(B38400) - OK
     48termios_baud_to_number(B7200) - OK
     49termios_baud_to_number(B14400) - OK
     50termios_baud_to_number(B28800) - OK
    4351termios_baud_to_number(B57600) - OK
     52termios_baud_to_number(B76800) - OK
    4453termios_baud_to_number(B115200) - OK
    4554termios_baud_to_number(B230400) - OK
    4655termios_baud_to_number(B460800) - OK
     56termios_baud_to_number(B921600) - OK
    4757
    4858Test termios_number_to_baud...
    4959termios_number_to_baud(-2) - NOT OK
    termios_number_to_baud(B4800) - OK 
    6373termios_number_to_baud(B9600) - OK
    6474termios_number_to_baud(B19200) - OK
    6575termios_number_to_baud(B38400) - OK
     76termios_number_to_baud(B7200) - OK
     77termios_number_to_baud(B14400) - OK
     78termios_number_to_baud(B28800) - OK
    6679termios_number_to_baud(B57600) - OK
     80termios_number_to_baud(B76800) - OK
    6781termios_number_to_baud(B115200) - OK
    6882termios_number_to_baud(B230400) - OK
    6983termios_number_to_baud(B460800) - OK
     84termios_number_to_baud(B921600) - OK
    7085
    7186Init - rtems_io_register_driver - Termios Test Driver - OK
    7287Termios_test_driver - rtems_io_register /dev/test - OK
    73 Init - Major slot returned = 2
     88Init - Major slot returned = 3
    7489Init - open - /dev/test - OK
    7590Termios_test_driver - rtems_set_initial_baud - bad baud - OK
    7691Termios_test_driver - rtems_set_initial_baud - 38400 - OK
    77 tcsetattr - invalid operation - ENOTSUP
     92tcsetattr - invalid operation - EINVAL
    7893cfmakeraw - OK
     94cfmakesane - OK
    7995
    8096tcsetattr - drain - OK
    81 set_attributes - B0 5-NONE-1
     97set_attributes - B0 8-NONE-2
    8298Test termios setting device baud rate...
    8399tcsetattr(TCSANOW, B0) - OK
    84 set_attributes - B0 5-NONE-1
     100set_attributes - B0 8-NONE-2
    85101tcsetattr(TCSADRAIN, B0) - OK
    86 set_attributes - B0 5-NONE-1
     102set_attributes - B0 8-NONE-2
     103tcsetattr(TCSAFLUSH, B0) - OK
     104set_attributes - B0 8-NONE-2
    87105tcsetattr(TCSANOW, B50) - OK
    88 set_attributes - B50 5-NONE-1
     106set_attributes - B50 8-NONE-2
    89107tcsetattr(TCSADRAIN, B50) - OK
    90 set_attributes - B50 5-NONE-1
     108set_attributes - B50 8-NONE-2
     109tcsetattr(TCSAFLUSH, B50) - OK
     110set_attributes - B50 8-NONE-2
    91111tcsetattr(TCSANOW, B75) - OK
    92 set_attributes - B75 5-NONE-1
     112set_attributes - B75 8-NONE-2
    93113tcsetattr(TCSADRAIN, B75) - OK
    94 set_attributes - B75 5-NONE-1
     114set_attributes - B75 8-NONE-2
     115tcsetattr(TCSAFLUSH, B75) - OK
     116set_attributes - B75 8-NONE-2
    95117tcsetattr(TCSANOW, B110) - OK
    96 set_attributes - B110 5-NONE-1
     118set_attributes - B110 8-NONE-2
    97119tcsetattr(TCSADRAIN, B110) - OK
    98 set_attributes - B110 5-NONE-1
     120set_attributes - B110 8-NONE-2
     121tcsetattr(TCSAFLUSH, B110) - OK
     122set_attributes - B110 8-NONE-2
    99123tcsetattr(TCSANOW, B134) - OK
    100 set_attributes - B134 5-NONE-1
     124set_attributes - B134 8-NONE-2
    101125tcsetattr(TCSADRAIN, B134) - OK
    102 set_attributes - B134 5-NONE-1
     126set_attributes - B134 8-NONE-2
     127tcsetattr(TCSAFLUSH, B134) - OK
     128set_attributes - B134 8-NONE-2
    103129tcsetattr(TCSANOW, B150) - OK
    104 set_attributes - B150 5-NONE-1
     130set_attributes - B150 8-NONE-2
    105131tcsetattr(TCSADRAIN, B150) - OK
    106 set_attributes - B150 5-NONE-1
     132set_attributes - B150 8-NONE-2
     133tcsetattr(TCSAFLUSH, B150) - OK
     134set_attributes - B150 8-NONE-2
    107135tcsetattr(TCSANOW, B200) - OK
    108 set_attributes - B200 5-NONE-1
     136set_attributes - B200 8-NONE-2
    109137tcsetattr(TCSADRAIN, B200) - OK
    110 set_attributes - B200 5-NONE-1
     138set_attributes - B200 8-NONE-2
     139tcsetattr(TCSAFLUSH, B200) - OK
     140set_attributes - B200 8-NONE-2
    111141tcsetattr(TCSANOW, B300) - OK
    112 set_attributes - B300 5-NONE-1
     142set_attributes - B300 8-NONE-2
    113143tcsetattr(TCSADRAIN, B300) - OK
    114 set_attributes - B300 5-NONE-1
     144set_attributes - B300 8-NONE-2
     145tcsetattr(TCSAFLUSH, B300) - OK
     146set_attributes - B300 8-NONE-2
    115147tcsetattr(TCSANOW, B600) - OK
    116 set_attributes - B600 5-NONE-1
     148set_attributes - B600 8-NONE-2
    117149tcsetattr(TCSADRAIN, B600) - OK
    118 set_attributes - B600 5-NONE-1
     150set_attributes - B600 8-NONE-2
     151tcsetattr(TCSAFLUSH, B600) - OK
     152set_attributes - B600 8-NONE-2
    119153tcsetattr(TCSANOW, B1200) - OK
    120 set_attributes - B1200 5-NONE-1
     154set_attributes - B1200 8-NONE-2
    121155tcsetattr(TCSADRAIN, B1200) - OK
    122 set_attributes - B1200 5-NONE-1
     156set_attributes - B1200 8-NONE-2
     157tcsetattr(TCSAFLUSH, B1200) - OK
     158set_attributes - B1200 8-NONE-2
    123159tcsetattr(TCSANOW, B1800) - OK
    124 set_attributes - B1800 5-NONE-1
     160set_attributes - B1800 8-NONE-2
    125161tcsetattr(TCSADRAIN, B1800) - OK
    126 set_attributes - B1800 5-NONE-1
     162set_attributes - B1800 8-NONE-2
     163tcsetattr(TCSAFLUSH, B1800) - OK
     164set_attributes - B1800 8-NONE-2
    127165tcsetattr(TCSANOW, B2400) - OK
    128 set_attributes - B2400 5-NONE-1
     166set_attributes - B2400 8-NONE-2
    129167tcsetattr(TCSADRAIN, B2400) - OK
    130 set_attributes - B2400 5-NONE-1
     168set_attributes - B2400 8-NONE-2
     169tcsetattr(TCSAFLUSH, B2400) - OK
     170set_attributes - B2400 8-NONE-2
    131171tcsetattr(TCSANOW, B4800) - OK
    132 set_attributes - B4800 5-NONE-1
     172set_attributes - B4800 8-NONE-2
    133173tcsetattr(TCSADRAIN, B4800) - OK
    134 set_attributes - B4800 5-NONE-1
     174set_attributes - B4800 8-NONE-2
     175tcsetattr(TCSAFLUSH, B4800) - OK
     176set_attributes - B4800 8-NONE-2
    135177tcsetattr(TCSANOW, B9600) - OK
    136 set_attributes - B9600 5-NONE-1
     178set_attributes - B9600 8-NONE-2
    137179tcsetattr(TCSADRAIN, B9600) - OK
    138 set_attributes - B9600 5-NONE-1
     180set_attributes - B9600 8-NONE-2
     181tcsetattr(TCSAFLUSH, B9600) - OK
     182set_attributes - B9600 8-NONE-2
    139183tcsetattr(TCSANOW, B19200) - OK
    140 set_attributes - B19200 5-NONE-1
     184set_attributes - B19200 8-NONE-2
    141185tcsetattr(TCSADRAIN, B19200) - OK
    142 set_attributes - B19200 5-NONE-1
     186set_attributes - B19200 8-NONE-2
     187tcsetattr(TCSAFLUSH, B19200) - OK
     188set_attributes - B19200 8-NONE-2
    143189tcsetattr(TCSANOW, B38400) - OK
    144 set_attributes - B38400 5-NONE-1
     190set_attributes - B38400 8-NONE-2
    145191tcsetattr(TCSADRAIN, B38400) - OK
    146 set_attributes - B38400 5-NONE-1
     192set_attributes - B38400 8-NONE-2
     193tcsetattr(TCSAFLUSH, B38400) - OK
     194set_attributes - B38400 8-NONE-2
     195tcsetattr(TCSANOW, B7200) - OK
     196set_attributes - B7200 8-NONE-2
     197tcsetattr(TCSADRAIN, B7200) - OK
     198set_attributes - B7200 8-NONE-2
     199tcsetattr(TCSAFLUSH, B7200) - OK
     200set_attributes - B7200 8-NONE-2
     201tcsetattr(TCSANOW, B14400) - OK
     202set_attributes - B14400 8-NONE-2
     203tcsetattr(TCSADRAIN, B14400) - OK
     204set_attributes - B14400 8-NONE-2
     205tcsetattr(TCSAFLUSH, B14400) - OK
     206set_attributes - B14400 8-NONE-2
     207tcsetattr(TCSANOW, B28800) - OK
     208set_attributes - B28800 8-NONE-2
     209tcsetattr(TCSADRAIN, B28800) - OK
     210set_attributes - B28800 8-NONE-2
     211tcsetattr(TCSAFLUSH, B28800) - OK
     212set_attributes - B28800 8-NONE-2
    147213tcsetattr(TCSANOW, B57600) - OK
    148 set_attributes - B57600 5-NONE-1
     214set_attributes - B57600 8-NONE-2
    149215tcsetattr(TCSADRAIN, B57600) - OK
    150 set_attributes - B57600 5-NONE-1
     216set_attributes - B57600 8-NONE-2
     217tcsetattr(TCSAFLUSH, B57600) - OK
     218set_attributes - B57600 8-NONE-2
     219tcsetattr(TCSANOW, B76800) - OK
     220set_attributes - B76800 8-NONE-2
     221tcsetattr(TCSADRAIN, B76800) - OK
     222set_attributes - B76800 8-NONE-2
     223tcsetattr(TCSAFLUSH, B76800) - OK
     224set_attributes - B76800 8-NONE-2
    151225tcsetattr(TCSANOW, B115200) - OK
    152 set_attributes - B115200 5-NONE-1
     226set_attributes - B115200 8-NONE-2
    153227tcsetattr(TCSADRAIN, B115200) - OK
    154 set_attributes - B115200 5-NONE-1
     228set_attributes - B115200 8-NONE-2
     229tcsetattr(TCSAFLUSH, B115200) - OK
     230set_attributes - B115200 8-NONE-2
    155231tcsetattr(TCSANOW, B230400) - OK
    156 set_attributes - B230400 5-NONE-1
     232set_attributes - B230400 8-NONE-2
    157233tcsetattr(TCSADRAIN, B230400) - OK
    158 set_attributes - B230400 5-NONE-1
     234set_attributes - B230400 8-NONE-2
     235tcsetattr(TCSAFLUSH, B230400) - OK
     236set_attributes - B230400 8-NONE-2
    159237tcsetattr(TCSANOW, B460800) - OK
    160 set_attributes - B460800 5-NONE-1
     238set_attributes - B460800 8-NONE-2
    161239tcsetattr(TCSADRAIN, B460800) - OK
    162 set_attributes - B460800 5-NONE-1
     240set_attributes - B460800 8-NONE-2
     241tcsetattr(TCSAFLUSH, B460800) - OK
     242set_attributes - B460800 8-NONE-2
     243tcsetattr(TCSANOW, B921600) - OK
     244set_attributes - B921600 8-NONE-2
     245tcsetattr(TCSADRAIN, B921600) - OK
     246set_attributes - B921600 8-NONE-2
     247tcsetattr(TCSAFLUSH, B921600) - OK
     248set_attributes - B921600 8-NONE-2
    163249Init - close - /dev/test - OK
    164250
    165251Init - open - /dev/test - OK
    Termios_test_driver - rtems_set_initial_baud - 38400 - OK 
    168254
    169255Test termios setting device character size ...
    170256tcsetattr(TCSANOW, CS5) - OK
    171 set_attributes - B38400 5-NONE-1
     257set_attributes - B38400 5-NONE-2
    172258tcsetattr(TCSADRAIN, CS5) - OK
    173 set_attributes - B38400 5-NONE-1
     259set_attributes - B38400 5-NONE-2
     260tcsetattr(TCSAFLUSH, CS5) - OK
     261set_attributes - B38400 5-NONE-2
     262tcsetattr(TCSASOFT, CS5) - OK
     263set_attributes - B38400 5-NONE-2
    174264tcsetattr(TCSANOW, CS6) - OK
    175 set_attributes - B38400 6-NONE-1
     265set_attributes - B38400 6-NONE-2
    176266tcsetattr(TCSADRAIN, CS6) - OK
    177 set_attributes - B38400 6-NONE-1
     267set_attributes - B38400 6-NONE-2
     268tcsetattr(TCSAFLUSH, CS6) - OK
     269set_attributes - B38400 6-NONE-2
     270tcsetattr(TCSASOFT, CS6) - OK
     271set_attributes - B38400 6-NONE-2
    178272tcsetattr(TCSANOW, CS7) - OK
    179 set_attributes - B38400 7-NONE-1
     273set_attributes - B38400 7-NONE-2
    180274tcsetattr(TCSADRAIN, CS7) - OK
    181 set_attributes - B38400 7-NONE-1
     275set_attributes - B38400 7-NONE-2
     276tcsetattr(TCSAFLUSH, CS7) - OK
     277set_attributes - B38400 7-NONE-2
     278tcsetattr(TCSASOFT, CS7) - OK
     279set_attributes - B38400 7-NONE-2
    182280tcsetattr(TCSANOW, CS8) - OK
    183 set_attributes - B38400 8-NONE-1
     281set_attributes - B38400 8-NONE-2
    184282tcsetattr(TCSADRAIN, CS8) - OK
    185 set_attributes - B38400 8-NONE-1
     283set_attributes - B38400 8-NONE-2
     284tcsetattr(TCSAFLUSH, CS8) - OK
     285set_attributes - B38400 8-NONE-2
     286tcsetattr(TCSASOFT, CS8) - OK
     287set_attributes - B38400 8-NONE-2
    186288Init - close - /dev/test - OK
    187289
    188290Init - open - /dev/test - OK
    Termios_test_driver - rtems_set_initial_baud - 38400 - OK 
    191293
    192294Test termios setting device parity ...
    193295tcsetattr(TCSANOW, none) - OK
    194 set_attributes - B38400 8-NONE-1
     296set_attributes - B38400 8-NONE-2
    195297tcsetattr(TCSADRAIN, none) - OK
    196 set_attributes - B38400 8-NONE-1
     298set_attributes - B38400 8-NONE-2
     299tcsetattr(TCSAFLUSH, none) - OK
     300set_attributes - B38400 8-NONE-2
     301tcsetattr(TCSASOFT, none) - OK
     302set_attributes - B38400 8-NONE-2
    197303tcsetattr(TCSANOW, even) - OK
    198 set_attributes - B38400 8-ODD-1
     304set_attributes - B38400 8-ODD-2
    199305tcsetattr(TCSADRAIN, even) - OK
    200 set_attributes - B38400 8-ODD-1
     306set_attributes - B38400 8-ODD-2
     307tcsetattr(TCSAFLUSH, even) - OK
     308set_attributes - B38400 8-ODD-2
     309tcsetattr(TCSASOFT, even) - OK
     310set_attributes - B38400 8-ODD-2
    201311tcsetattr(TCSANOW, odd) - OK
    202 set_attributes - B38400 8-EVEN-1
     312set_attributes - B38400 8-EVEN-2
    203313tcsetattr(TCSADRAIN, odd) - OK
    204 set_attributes - B38400 8-EVEN-1
     314set_attributes - B38400 8-EVEN-2
     315tcsetattr(TCSAFLUSH, odd) - OK
     316set_attributes - B38400 8-EVEN-2
     317tcsetattr(TCSASOFT, odd) - OK
     318set_attributes - B38400 8-EVEN-2
    205319Init - close - /dev/test - OK
    206320
    207321Init - open - /dev/test - OK
    tcsetattr(TCSANOW, 1 bit) - OK 
    213327set_attributes - B38400 8-NONE-1
    214328tcsetattr(TCSADRAIN, 1 bits) - OK
    215329set_attributes - B38400 8-NONE-1
     330tcsetattr(TCSAFLUSH, 1 bits) - OK
     331set_attributes - B38400 8-NONE-1
     332tcsetattr(TCSASOFT, 1 bits) - OK
     333set_attributes - B38400 8-NONE-1
    216334tcsetattr(TCSANOW, 2 bits) - OK
    217335set_attributes - B38400 8-NONE-2
    218336tcsetattr(TCSADRAIN, 2 bits) - OK
    219337set_attributes - B38400 8-NONE-2
     338tcsetattr(TCSAFLUSH, 2 bits) - OK
     339set_attributes - B38400 8-NONE-2
     340tcsetattr(TCSASOFT, 2 bits) - OK
     341set_attributes - B38400 8-NONE-2
    220342cfsetospeed(BAD BAUD) - EINVAL
    221343cfsetospeed(B0) - OK
    222344cfgetospeed(B0) - OK
    cfsetospeed(B19200) - OK 
    250372cfgetospeed(B19200) - OK
    251373cfsetospeed(B38400) - OK
    252374cfgetospeed(B38400) - OK
     375cfsetospeed(B7200) - OK
     376cfgetospeed(B7200) - OK
     377cfsetospeed(B14400) - OK
     378cfgetospeed(B14400) - OK
     379cfsetospeed(B28800) - OK
     380cfgetospeed(B28800) - OK
    253381cfsetospeed(B57600) - OK
    254382cfgetospeed(B57600) - OK
     383cfsetospeed(B76800) - OK
     384cfgetospeed(B76800) - OK
    255385cfsetospeed(B115200) - OK
    256386cfgetospeed(B115200) - OK
    257387cfsetospeed(B230400) - OK
    258388cfgetospeed(B230400) - OK
    259389cfsetospeed(B460800) - OK
    260390cfgetospeed(B460800) - OK
     391cfsetospeed(B921600) - OK
     392cfgetospeed(B921600) - OK
    261393cfsetispeed(BAD BAUD) - EINVAL
    262394cfsetispeed(B0) - OK
    263395cfgetispeed(B0) - OK
    cfsetispeed(B19200) - OK 
    291423cfgetispeed(B19200) - OK
    292424cfsetispeed(B38400) - OK
    293425cfgetispeed(B38400) - OK
     426cfsetispeed(B7200) - OK
     427cfgetispeed(B7200) - OK
     428cfsetispeed(B14400) - OK
     429cfgetispeed(B14400) - OK
     430cfsetispeed(B28800) - OK
     431cfgetispeed(B28800) - OK
    294432cfsetispeed(B57600) - OK
    295433cfgetispeed(B57600) - OK
     434cfsetispeed(B76800) - OK
     435cfgetispeed(B76800) - OK
    296436cfsetispeed(B115200) - OK
    297437cfgetispeed(B115200) - OK
    298438cfsetispeed(B230400) - OK
    299439cfgetispeed(B230400) - OK
    300440cfsetispeed(B460800) - OK
    301441cfgetispeed(B460800) - OK
     442cfsetispeed(B921600) - OK
     443cfgetispeed(B921600) - OK
    302444cfsetspeed(BAD BAUD) - EINVAL
    303445cfsetspeed(B0) - OK
    304446cfgetspeed(B0) - checking both inspeed and outspeed - OK
    cfsetspeed(B19200) - OK 
    332474cfgetspeed(B19200) - checking both inspeed and outspeed - OK
    333475cfsetspeed(B38400) - OK
    334476cfgetspeed(B38400) - checking both inspeed and outspeed - OK
     477cfsetspeed(B7200) - OK
     478cfgetspeed(B7200) - checking both inspeed and outspeed - OK
     479cfsetspeed(B14400) - OK
     480cfgetspeed(B14400) - checking both inspeed and outspeed - OK
     481cfsetspeed(B28800) - OK
     482cfgetspeed(B28800) - checking both inspeed and outspeed - OK
    335483cfsetspeed(B57600) - OK
    336484cfgetspeed(B57600) - checking both inspeed and outspeed - OK
     485cfsetspeed(B76800) - OK
     486cfgetspeed(B76800) - checking both inspeed and outspeed - OK
    337487cfsetspeed(B115200) - OK
    338488cfgetspeed(B115200) - checking both inspeed and outspeed - OK
    339489cfsetspeed(B230400) - OK
    340490cfgetspeed(B230400) - checking both inspeed and outspeed - OK
    341491cfsetspeed(B460800) - OK
    342492cfgetspeed(B460800) - checking both inspeed and outspeed - OK
     493cfsetspeed(B921600) - OK
     494cfgetspeed(B921600) - checking both inspeed and outspeed - OK
    343495Init - close - /dev/test - OK
    344496Multiple open of the device
    345497Termios_test_driver - rtems_set_initial_baud - bad baud - OK
    Termios_test_driver - rtems_set_initial_baud - 38400 - OK 
    395547Termios_test_driver - rtems_set_initial_baud - bad baud - OK
    396548Termios_test_driver - rtems_set_initial_baud - 38400 - OK
    397549
    398 *** END OF TEST TERMIOS 01 ***
     550*** END OF TEST TERMIOS 1 ***
  • testsuites/libtests/termios01/termios_testdriver.c

    diff --git a/testsuites/libtests/termios01/termios_testdriver.c b/testsuites/libtests/termios01/termios_testdriver.c
    old mode 100644
    new mode 100755
    index 43aeccd..bd5c7a1
    a b int termios_test_driver_set_attributes( 
    8585  const char            *char_size = "5";
    8686  const char            *stop = "NONE";
    8787
    88   baud_requested = t->c_cflag & CBAUD;
     88  baud_requested = t->c_ispeed;
    8989
    9090  number = rtems_termios_baud_to_number( baud_requested );
    9191
    rtems_device_driver termios_test_driver_open( 
    164164  int               rc;
    165165  rtems_libio_open_close_args_t *args = arg;
    166166  static bool firstCall = true;
    167  
     167
    168168  static const rtems_termios_callbacks Callbacks = {
    169169    NULL,                                    /* firstOpen */
    170170    NULL,                                    /* lastClose */
    rtems_device_driver termios_test_driver_open( 
    192192    size_t i;
    193193
    194194    firstCall = false;
    195    
     195
    196196    for (i = 0; i < sizeof( allocSizes ) / sizeof( allocSizes [0] ); ++i) {
    197197      void *opaque = rtems_heap_greedy_allocate( allocSizes, i );
    198198
  • testsuites/libtests/termios02/termios02.scn

    diff --git a/testsuites/libtests/termios02/termios02.scn b/testsuites/libtests/termios02/termios02.scn
    old mode 100644
    new mode 100755
    index 9b38d69..be46893
    a b  
    1 *** TERMIOS 02 TEST ***
     1*** BEGIN OF TEST TERMIOS 2 ***
    22tcdrain(12) - EBADF
    33tcdrain(stdin) - OK
    44tcdrain(stdout) - OK
    ctermid( NULL ) - OK 
    2424ctermid ==> /dev/console
    2525ctermid( term_name ) - OK
    2626ctermid ==> /dev/console
    27 *** END OF TERMIOS 02 TEST ***
     27*** END OF TEST TERMIOS 2 ***
  • testsuites/libtests/termios03/termios03.scn

    diff --git a/testsuites/libtests/termios03/termios03.scn b/testsuites/libtests/termios03/termios03.scn
    old mode 100644
    new mode 100755
    index 17802fe..e18c0af
    a b  
    1 *** TEST TERMIOS03 ***
    2 open(/dev/test) - OK
    3 Writing: This is test output.
    4 Transmitted 22 characters
    5 54 68 69 73 20 69 73 20 74 65 73 74 20 6f 75 74 |This is test out|
    6 70 75 74 2e 0d 0a                               |put...          |
    7 
    8 Reading (expected):
    9 54 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
    10 69 73 2e                                        |is.             |
    11 Read 20 bytes from read(2)
    12 54 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
    13 69 73 2e 0a                                     |is..            |
    14 Echoed 21 characters
    15 54 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
    16 69 73 2e 0d 0a                                  |is...           |
    17 
    18 Reading (expected):
    19 31 32 33 35 08 34 35 36 2e                      |1235.456.       |
    20 Read 10 bytes from read(2)
    21 31 32 33 35 08 34 35 36 2e 0a                   |1235.456..      |
    22 Echoed 12 characters
    23 31 32 33 35 5e 48 34 35 36 2e 0d 0a             |1235^H456...    |
    24 
    25 Reading (expected):
    26 74 61 62 09 74 61 62 2e                         |tab.tab.        |
    27 Read 9 bytes from read(2)
    28 74 61 62 09 74 61 62 2e 0a                      |tab.tab..       |
    29 Echoed 14 characters
    30 74 61 62 20 20 20 20 20 74 61 62 2e 0d 0a       |tab     tab...  |
    31 
    32 Reading (expected):
    33 63 72 0d                                        |cr.             |
    34 Read 3 bytes from read(2)
    35 63 72 0a                                        |cr.             |
    36 Echoed 4 characters
    37 63 72 0d 0a                                     |cr..            |
    38 
    39 Reading (expected):
    40 61 42 63 44 65 46 67 48 2e                      |aBcDeFgH.       |
    41 Read 10 bytes from read(2)
    42 61 42 63 44 65 46 67 48 2e 0a                   |aBcDeFgH..      |
    43 Echoed 11 characters
    44 61 42 63 44 65 46 67 48 2e 0d 0a                |aBcDeFgH...     |
    45 Changing c_iflag to: Enable to lower case mapping on input
    46 
    47 Reading (expected):
    48 61 42 63 44 65 46 67 48 2e                      |aBcDeFgH.       |
    49 Read 10 bytes from read(2)
    50 61 62 63 64 65 66 67 68 2e 0a                   |abcdefgh..      |
    51 Echoed 11 characters
    52 61 62 63 64 65 66 67 68 2e 0d 0a                |abcdefgh...     |
    53 Changing c_iflag to: Disable to lower case mapping on input
    54 
    55 Reading (expected):
    56 54 65 73 74 69 6e 67 20 56 45 52 41 53 45 7f 2e |Testing VERASE..|
    57 Read 15 bytes from read(2)
    58 54 65 73 74 69 6e 67 20 56 45 52 41 53 2e 0a    |Testing VERAS.. |
    59 Echoed 20 characters
    60 54 65 73 74 69 6e 67 20 56 45 52 41 53 45 08 20 |Testing VERASE. |
    61 08 2e 0d 0a                                     |....            |
    62 
    63 Reading (expected):
    64 54 65 73 74 69 6e 67 20 56 4b 49 4c 4c 15 2e    |Testing VKILL.. |
    65 Read 2 bytes from read(2)
    66 2e 0a                                           |..              |
    67 Echoed 55 characters
    68 54 65 73 74 69 6e 67 20 56 4b 49 4c 4c 08 20 08 |Testing VKILL. .|
    69 08 20 08 08 20 08 08 20 08 08 20 08 08 20 08 08 |. .. .. .. .. ..|
    70 20 08 08 20 08 08 20 08 08 20 08 08 20 08 08 20 | .. .. .. .. .. |
    71 08 08 20 08 2e 0d 0a
    72 
    73 Reading (expected):
    74 7f 54 65 73 74 69 6e 67 20 56 45 52 41 53 45 20 |.Testing VERASE |
    75 69 6e 20 63 6f 6c 75 6d 6e 20 31 2e             |in column 1.    |
    76 Read 28 bytes from read(2)
    77 54 65 73 74 69 6e 67 20 56 45 52 41 53 45 20 69 |Testing VERASE i|
    78 6e 20 63 6f 6c 75 6d 6e 20 31 2e 0a             |n column 1..    |
    79 Echoed 29 characters
    80 54 65 73 74 69 6e 67 20 56 45 52 41 53 45 20 69 |Testing VERASE i|
    81 6e 20 63 6f 6c 75 6d 6e 20 31 2e 0d 0a          |n column 1...   |
    82 
    83 Reading (expected):
    84 09 20 74 61 62 20 09 54 65 73 74 69 6e 67 20 56 |. tab .Testing V|
    85 4b 49 4c 4c 20 61 66 74 65 72 20 74 61 62 2e 15 |KILL after tab..|
    86 Read 1 bytes from read(2)
    87 0a                                              |.               |
    88 Echoed 140 characters
    89 20 20 20 20 20 20 20 20 20 74 61 62 20 20 20 20 |         tab    |
    90 54 65 73 74 69 6e 67 20 56 4b 49 4c 4c 20 61 66 |Testing VKILL af|
    91 74 65 72 20 74 61 62 2e 08 20 08 08 20 08 08 20 |ter tab.. .. .. |
    92 08 08 20 08 08 20 08 08 20 08 08 20 08 08 20 08 |.. .. .. .. .. .|
    93 08 20 08 08 20 08 08 20 08 08 20 08 08 20 08 08 |. .. .. .. .. ..|
    94 20 08 08 20 08 08 20 08 08 20 08 08 20 08 08 20 | .. .. .. .. .. |
    95 08 08 20 08 08 20 08 08 20 08 08 20 08 08 20 08 |.. .. .. .. .. .|
    96 08 08 08 08 20 08 08 20 08 08 20 08 08 20 08 08 |.... .. .. .. ..|
    97 20 08 08 08 08 08 08 08 08 08 0d 0a             | ...........    |
    98 
    99 close(/dev/test) - OK
    100 *** END OF TEST TERMIOS03 ***
     1*** BEGIN OF TEST TERMIOS 3 ***
     2open(/dev/test) - OK
     3Writing: This is test output.
     4Transmitted 22 characters
     554 68 69 73 20 69 73 20 74 65 73 74 20 6f 75 74 |This is test out|
     670 75 74 2e 0d 0a                               |put...          |
     7
     8Reading (expected):
     954 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
     1069 73 2e                                        |is.             |
     11Read 20 bytes from read(2)
     1254 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
     1369 73 2e 0a                                     |is..            |
     14Echoed 21 characters
     1554 65 73 74 20 69 6e 70 75 74 20 74 68 69 73 20 |Test input this |
     1669 73 2e 0d 0a                                  |is...           |
     17
     18Reading (expected):
     1931 32 33 35 08 34 35 36 2e                      |1235.456.       |
     20Read 10 bytes from read(2)
     2131 32 33 35 08 34 35 36 2e 0a                   |1235.456..      |
     22Echoed 12 characters
     2331 32 33 35 5e 48 34 35 36 2e 0d 0a             |1235^H456...    |
     24
     25Reading (expected):
     2674 61 62 09 74 61 62 2e                         |tab.tab.        |
     27Read 9 bytes from read(2)
     2874 61 62 09 74 61 62 2e 0a                      |tab.tab..       |
     29Echoed 14 characters
     3074 61 62 20 20 20 20 20 74 61 62 2e 0d 0a       |tab     tab...  |
     31
     32Reading (expected):
     3363 72 0d                                        |cr.             |
     34Read 3 bytes from read(2)
     3563 72 0a                                        |cr.             |
     36Echoed 4 characters
     3763 72 0d 0a                                     |cr..            |
     38
     39Reading (expected):
     4061 42 63 44 65 46 67 48 2e                      |aBcDeFgH.       |
     41Read 10 bytes from read(2)
     4261 42 63 44 65 46 67 48 2e 0a                   |aBcDeFgH..      |
     43Echoed 11 characters
     4461 42 63 44 65 46 67 48 2e 0d 0a                |aBcDeFgH...     |
     45Changing c_iflag to: Enable to lower case mapping on input
     46
     47Reading (expected):
     4861 42 63 44 65 46 67 48 2e                      |aBcDeFgH.       |
     49Read 10 bytes from read(2)
     5061 62 63 64 65 66 67 68 2e 0a                   |abcdefgh..      |
     51Echoed 11 characters
     5261 62 63 64 65 66 67 68 2e 0d 0a                |abcdefgh...     |
     53Changing c_iflag to: Disable to lower case mapping on input
     54
     55Reading (expected):
     5654 65 73 74 69 6e 67 20 56 45 52 41 53 45 7f 2e |Testing VERASE..|
     57Read 15 bytes from read(2)
     5854 65 73 74 69 6e 67 20 56 45 52 41 53 2e 0a    |Testing VERAS.. |
     59Echoed 20 characters
     6054 65 73 74 69 6e 67 20 56 45 52 41 53 45 08 20 |Testing VERASE. |
     6108 2e 0d 0a                                     |....            |
     62
     63Reading (expected):
     6454 65 73 74 69 6e 67 20 56 4b 49 4c 4c 15 2e    |Testing VKILL.. |
     65Read 2 bytes from read(2)
     662e 0a                                           |..              |
     67Echoed 55 characters
     6854 65 73 74 69 6e 67 20 56 4b 49 4c 4c 08 20 08 |Testing VKILL. .|
     6908 20 08 08 20 08 08 20 08 08 20 08 08 20 08 08 |. .. .. .. .. ..|
     7020 08 08 20 08 08 20 08 08 20 08 08 20 08 08 20 | .. .. .. .. .. |
     7108 08 20 08 2e 0d 0a                            |.. ....         |
     72
     73Reading (expected):
     747f 54 65 73 74 69 6e 67 20 56 45 52 41 53 45 20 |.Testing VERASE |
     7569 6e 20 63 6f 6c 75 6d 6e 20 31 2e             |in column 1.    |
     76Read 28 bytes from read(2)
     7754 65 73 74 69 6e 67 20 56 45 52 41 53 45 20 69 |Testing VERASE i|
     786e 20 63 6f 6c 75 6d 6e 20 31 2e 0a             |n column 1..    |
     79Echoed 29 characters
     8054 65 73 74 69 6e 67 20 56 45 52 41 53 45 20 69 |Testing VERASE i|
     816e 20 63 6f 6c 75 6d 6e 20 31 2e 0d 0a          |n column 1...   |
     82
     83Reading (expected):
     8409 20 74 61 62 20 09 54 65 73 74 69 6e 67 20 56 |. tab .Testing V|
     854b 49 4c 4c 20 61 66 74 65 72 20 74 61 62 2e 15 |KILL after tab..|
     86Read 1 bytes from read(2)
     870a                                              |.               |
     88Echoed 140 characters
     8920 20 20 20 20 20 20 20 20 74 61 62 20 20 20 20 |         tab    |
     9054 65 73 74 69 6e 67 20 56 4b 49 4c 4c 20 61 66 |Testing VKILL af|
     9174 65 72 20 74 61 62 2e 08 20 08 08 20 08 08 20 |ter tab.. .. .. |
     9208 08 20 08 08 20 08 08 20 08 08 20 08 08 20 08 |.. .. .. .. .. .|
     9308 20 08 08 20 08 08 20 08 08 20 08 08 20 08 08 |. .. .. .. .. ..|
     9420 08 08 20 08 08 20 08 08 20 08 08 20 08 08 20 | .. .. .. .. .. |
     9508 08 20 08 08 20 08 08 20 08 08 20 08 08 20 08 |.. .. .. .. .. .|
     9608 08 08 08 20 08 08 20 08 08 20 08 08 20 08 08 |.... .. .. .. ..|
     9720 08 08 08 08 08 08 08 08 08 0d 0a             | ...........    |
     98
     99close(/dev/test) - OK
     100*** END OF TEST TERMIOS 3 ***
  • testsuites/libtests/termios04/termios04.scn

    diff --git a/testsuites/libtests/termios04/termios04.scn b/testsuites/libtests/termios04/termios04.scn
    old mode 100644
    new mode 100755
    index 99b8eb0..812369a
    a b  
    1 *** TEST TERMIOS04 ***
    2 open(/dev/test) - OK 
     1*** BEGIN OF TEST TERMIOS 4 ***
     2open(/dev/test) - OK
    33Writing: This is interrupt driven test output.
    44Transmitted 39 characters
    5554 68 69 73 20 69 73 20 69 6e 74 65 72 72 75 70 |This is interrup|
    As Read 37 characters 
    29294e 6f 6e 2d 42 6c 6f 63 6b 69 6e 67 20 69 6e 74 |Non-Blocking int|
    303065 72 72 75 70 74 20 64 72 69 76 65 6e 20 72 65 |errupt driven re|
    313161 64 2e 0d 0a                                  |ad...           |
    32 close(/dev/test) - OK 
    33 *** END OF TEST TERMIOS04 ***
     32close(/dev/test) - OK
     33*** END OF TEST TERMIOS 4 ***
  • testsuites/libtests/termios05/termios05.scn

    diff --git a/testsuites/libtests/termios05/termios05.scn b/testsuites/libtests/termios05/termios05.scn
    old mode 100644
    new mode 100755
    index 4d2988f..e30a243
    a b  
    1 *** TEST TERMIOS05 ***
    2 open(/dev/test) - OK 
     1*** BEGIN OF TEST TERMIOS 5 ***
     2open(/dev/test) - OK
    33Writing: This is test output.
    44Transmitted 20 characters
    5554 68 69 73 20 69 73 20 74 65 73 74 20 6f 75 74 |This is test out|
    Read 10 bytes from read(2) 
    5555Echoed 12 characters
    56560a 61 62 63 64 65 66 67 68 2e 0d 0a             |.abcdefgh...    |
    5757Changing c_iflag to: Disable to lower case mapping on input
    58 close(/dev/test) - OK 
    59 *** END OF TEST TERMIOS05 ***
     58close(/dev/test) - OK
     59*** END OF TEST TERMIOS 5 ***
  • testsuites/libtests/termios06/init.c

    diff --git a/testsuites/libtests/termios06/init.c b/testsuites/libtests/termios06/init.c
    old mode 100644
    new mode 100755
    index 759b444..16748d0
    a b void set_wakeups(void) 
    7575{
    7676  int sc;
    7777
    78   puts( "ioctl - RTEMS_IO_SNDWAKEUP - OK" );
    79   sc = ioctl( Test_fd, RTEMS_IO_SNDWAKEUP, &TxWake );
     78  puts( "ioctl - TIOCSNDWU - OK" );
     79  sc = ioctl( Test_fd, TIOCSNDWU, &TxWake );
    8080  rtems_test_assert( sc == 0 );
    8181
    82   puts( "ioctl - RTEMS_IO_RCVWAKEUP - OK" );
    83   sc = ioctl( Test_fd, RTEMS_IO_RCVWAKEUP, &RxWake );
     82  puts( "ioctl - TIOCRCVWU - OK" );
     83  sc = ioctl( Test_fd, TIOCRCVWU, &RxWake );
    8484  rtems_test_assert( sc == 0 );
    8585
    8686}
  • testsuites/libtests/termios06/termios06.scn

    diff --git a/testsuites/libtests/termios06/termios06.scn b/testsuites/libtests/termios06/termios06.scn
    old mode 100644
    new mode 100755
    index b558077..91dc4de
    a b  
    1 
    2 
    3 *** TEST TERMIOS06 ***
    4 open(/dev/test) - OK
    5 ioctl - RTEMS_IO_SNDWAKEUP - OK
    6 ioctl - RTEMS_IO_RCVWAKEUP - OK
     1*** BEGIN OF TEST TERMIOS 6 ***
     2open(/dev/test) - OK
     3ioctl - TIOCSNDWU - OK
     4ioctl - TIOCRCVWU - OK
    75ioctl - TIOCGETD - OK
    86ioctl - TIOCSETD - OK
    97pppopen called
    108ioctl - TIOCSETD - OK
    119pppclose called
    1210pppopen called
    13 write(PPPD TEST) - OK 
     11write(PPPD TEST) - OK
    1412pppwrite called - 10 bytes
    151350 50 50 44 20 54 45 53 54 00                   |PPPD TEST.      |
    16 
    1714pppstart called
    18 ioctl(/dev/test) - OK 
     15ioctl(/dev/test) - OK
    1916pppioctl called
    20 tcgetattr(/dev/test) - OK 
     17tcgetattr(/dev/test) - OK
    2118Turn on flow control on output - OK
    2219Turn off flow control on output - OK
    2320Turn on flow control on input - OK
    Turn off flow control on input - OK 
    2522
    2623Reading (expected):
    272454 68 69 73 20 69 73 20 74 65 73 74 20 50 50 50 |This is test PPP|
    28 
    292520 69 6e 70 75 74                               | input          |
    30 
    3126pppread called
    3227pppinput called - with (T)
    3328pppinput called - with (h)
    pppinput called - with (u) 
    5348pppinput called - with (t)
    5449pppinput called - with (.)
    5550Rx_Wake - invoked
    56 
    5751Read 0 bytes from read(2)
    58 close(/dev/test) - OK
     52Error: length must be greater than zero.close(/dev/test) - OK
    5953pppclose called
    60 *** END OF TEST TERMIOS06 ***
     54*** END OF TEST TERMIOS 6 ***
  • testsuites/libtests/termios07/termios07.scn

    diff --git a/testsuites/libtests/termios07/termios07.scn b/testsuites/libtests/termios07/termios07.scn
    old mode 100644
    new mode 100755
    index a636120..e5630db
    a b  
    1 XXX fill in with test output
     1*** BEGIN OF TEST TERMIOS 7 ***
     2rtems_termios_bufsize( 64, 64, 64 ) - OK
     3open(/dev/test) - OK
     4Changing c_iflag to: Set XON/XOFF
     5Writing: 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789Transmitted 200 characters
     630 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 |0123456789012345|
     736 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 |6789012345678901|
     832 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 |2345678901234567|
     938 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 |8901234567890123|
     1034 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 |4567890123456789|
     1130 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 |0123456789012345|
     1236 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 |6789012345678901|
     1332 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 |2345678901234567|
     1438 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 |8901234567890123|
     1534 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 |4567890123456789|
     1630 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 |0123456789012345|
     1736 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 |6789012345678901|
     1832 33 34 35 36 37 38 39                         |23456789        |
     19close(/dev/test) - OK
     20*** END OF TEST TERMIOS 7 ***
  • testsuites/libtests/termios08/termios08.scn

    diff --git a/testsuites/libtests/termios08/termios08.scn b/testsuites/libtests/termios08/termios08.scn
    old mode 100644
    new mode 100755
    index a636120..469d537
    a b  
    1 XXX fill in with test output
     1*** BEGIN OF TEST TERMIOS 8 ***
     2open(/dev/test) - OK
     3Changing c_lflag to: non-canonical
     4Changing to polling - VMIN=0 VTIME=0
     5read - 0 expected
     6Changing to half-second timeout - VMIN=0 VTIME=5
     7read - 0 expected
     8Changing to half-second timeout - VMIN=5 VTIME=3
     9Enqueue 2 characters
     10read - 2 expected
     11Changing to half-second timeout - VMIN=5 VTIME=3
     12Enqueue 1 character
     13read - 1 expected
     14Enqueue 7 characters
     15read - 5 expected
     16read - 2 expected
     17close(/dev/test) - OK
     18*** END OF TEST TERMIOS 8 ***