Changeset a20190a4 in rtems


Ignore:
Timestamp:
11/16/99 16:15:05 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
72d4b1d9
Parents:
65a38bc
Message:

Added test cases for uname().

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/psxtests/psx01/init.c

    r65a38bc ra20190a4  
    1414#include "system.h"
    1515#include <sched.h>
     16#include <sys/utsname.h>
    1617
    1718void *POSIX_Init(
     
    2829  time_t          remaining;
    2930  struct tm       tm;
     31  struct utsname  uts;
    3032
    3133  puts( "\n\n*** POSIX TEST 1 ***" );
     
    3335  build_time( &tm, TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
    3436
     37  /* print some system information */
     38
     39  puts( "Init: uname - EFAULT (invalid uts pointer argument)" );
     40  status = uname( NULL );
     41  assert( status == -1 );
     42  assert( errno == EFAULT );
     43   
     44  status = uname( &uts );
     45  assert( !status );
     46  printf( "Init: uts.sysname: %s\n", uts.sysname );
     47  printf( "Init: uts.nodename: %s\n", uts.nodename );
     48  printf( "Init: uts.release: %s\n", uts.release );
     49  printf( "Init: uts.version: %s\n", uts.version );
     50  printf( "Init: uts.machine: %s\n", uts.machine );
     51  puts("");
     52   
    3553  /* error cases in clock_gettime and clock_settime */
    3654
  • c/src/tests/psxtests/psx01/psx01.scn

    r65a38bc ra20190a4  
    11*** POSIX TEST 1 ***
     2Init: uname - EFAULT (invalid uts pointer argument)
     3Init: uts.sysname: RTEMS
     4Init: uts.nodename: Node 1
     5Init: uts.release: rtems-19991105
     6Init: uts.version:
     7Init: uts.machine: SPARC/erc32
     8
    29Init: clock_gettime - EINVAL (invalid clockid)
    310Init: clock_settime - EINVAL (invalid clockid)
  • testsuites/psxtests/psx01/init.c

    r65a38bc ra20190a4  
    1414#include "system.h"
    1515#include <sched.h>
     16#include <sys/utsname.h>
    1617
    1718void *POSIX_Init(
     
    2829  time_t          remaining;
    2930  struct tm       tm;
     31  struct utsname  uts;
    3032
    3133  puts( "\n\n*** POSIX TEST 1 ***" );
     
    3335  build_time( &tm, TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
    3436
     37  /* print some system information */
     38
     39  puts( "Init: uname - EFAULT (invalid uts pointer argument)" );
     40  status = uname( NULL );
     41  assert( status == -1 );
     42  assert( errno == EFAULT );
     43   
     44  status = uname( &uts );
     45  assert( !status );
     46  printf( "Init: uts.sysname: %s\n", uts.sysname );
     47  printf( "Init: uts.nodename: %s\n", uts.nodename );
     48  printf( "Init: uts.release: %s\n", uts.release );
     49  printf( "Init: uts.version: %s\n", uts.version );
     50  printf( "Init: uts.machine: %s\n", uts.machine );
     51  puts("");
     52   
    3553  /* error cases in clock_gettime and clock_settime */
    3654
  • testsuites/psxtests/psx01/psx01.scn

    r65a38bc ra20190a4  
    11*** POSIX TEST 1 ***
     2Init: uname - EFAULT (invalid uts pointer argument)
     3Init: uts.sysname: RTEMS
     4Init: uts.nodename: Node 1
     5Init: uts.release: rtems-19991105
     6Init: uts.version:
     7Init: uts.machine: SPARC/erc32
     8
    29Init: clock_gettime - EINVAL (invalid clockid)
    310Init: clock_settime - EINVAL (invalid clockid)
Note: See TracChangeset for help on using the changeset viewer.