Ignore:
Timestamp:
11/16/99 16:15:05 (23 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().

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.