Changeset 95cf41e in rtems for testsuites/psxtests


Ignore:
Timestamp:
Jul 5, 2010, 9:32:48 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
7a595e8a
Parents:
c00b80c1
Message:

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

  • psxid01/init.c, psxid01/psxid01.doc, psxid01/psxid01.scn: Add test cases.
Location:
testsuites/psxtests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/ChangeLog

    rc00b80c1 r95cf41e  
     12010-07-05      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * psxid01/init.c, psxid01/psxid01.doc, psxid01/psxid01.scn: Add test
     4        cases.
     5
    162010-07-02      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • testsuites/psxtests/psxid01/init.c

    rc00b80c1 r95cf41e  
    9191  sc = issetugid();
    9292  rtems_test_assert( sc == 0 );
     93
     94  puts( "getpgrp - return local node - OK" );
     95  pid = getpgrp();
     96  printf( "getpgrp returned %d\n", pid );
     97
     98  puts( "getgroups - return 0 - OK" );
     99  sc = getgroups( 0, NULL );
     100  rtems_test_assert( sc == 0 );
     101 
     102}
     103
     104void test_getlogin(void)
     105{
     106  int sc;
     107  char ch;
     108
     109  printf( "getlogin() -- %s\n", getlogin() );
     110
     111  puts( "getlogin_r(NULL, LOGIN_NAME_MAX) -- EFAULT" );
     112  sc = getlogin_r( NULL, LOGIN_NAME_MAX );
     113  rtems_test_assert( sc == EFAULT );
     114
     115  puts( "getlogin_r(buffer, 0) -- ERANGE" );
     116  sc = getlogin_r( &ch, 0 );
     117  rtems_test_assert( sc == ERANGE );
     118
     119 
    93120}
    94121
     
    107134  test_pid();
    108135  puts( "" );
     136
     137  test_getlogin();
    109138
    110139  puts( "*** END OF TEST ID 01 ***" );
  • testsuites/psxtests/psxid01/psxid01.scn

    rc00b80c1 r95cf41e  
    1717getppid = 0
    1818setsid - EPERM
     19getpgrp - return local node - OK
     20getpgrp returned 1
     21getgroups - return 0 - OK
    1922
     23getlogin() --
     24getlogin_r(NULL, LOGIN_NAME_MAX) -- EFAULT
     25getlogin_r(buffer, 0) -- ERANGE
    2026*** END OF TEST ID 01 ***
Note: See TracChangeset for help on using the changeset viewer.