2 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
33 /**********************************************************
35 * OS Testing - Silicon Graphics, Inc.
37 * FUNCTION NAME : parse_opts
39 * FUNCTION TITLE : parse standard & user options for system call tests
42 * #include "usctest.h"
44 * char *parse_opts(ac, av, user_optarr, uhf)
47 * option_t user_optarr[];
50 * AUTHOR : William Roske/Richard Logan
52 * INITIAL RELEASE : UNICOS 7.0
55 * The parse_opts library routine takes that argc and argv parameters
56 * recevied by main() and an array of structures defining user options.
57 * It parses the command line setting flag and argument locations
58 * associated with the options. It uses getopt to do the actual cmd line
59 * parsing. uhf() is a function to print user define help
61 * This module contains the functions usc_global_setup_hook and
62 * usc_test_looping, which are called by marcos defined in usctest.h.
65 * parse_opts returns a pointer to an error message if an error occurs.
66 * This pointer is (char *)NULL if parsing is successful.
68 *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
72 #include <sys/param.h>
73 #include <sys/signal.h>
74 #include <sys/types.h>
81 #endif /* UNIT_TEST */
84 #define _USC_LIB_ 1 /* indicates we are the library to the usctest.h include */
88 #define USC_COPIES "USC_COPIES"
99 /* The timing information block. */
100 struct tblock tblock
={0,((long) -1)>>1,0,0};
103 /* Define flags and args for standard options */
104 int STD_FUNCTIONAL_TEST
=1, /* flag indicating to do functional testing code */
105 STD_TIMING_ON
=0, /* flag indicating to print timing stats */
106 STD_PAUSE
=0, /* flag indicating to pause before actual start, */
107 /* for contention mode */
108 STD_INFINITE
=0, /* flag indciating to loop forever */
109 STD_LOOP_COUNT
=1, /* number of iterations */
110 STD_COPIES
=1, /* number of copies */
111 STD_ERRNO_LOG
=0; /* flag indicating to do errno logging */
113 float STD_LOOP_DURATION
=0.0, /* duration value in fractional seconds */
114 STD_LOOP_DELAY
=0.0; /* loop delay value in fractional seconds */
117 char **STD_opt_arr
= NULL
; /* array of option strings */
118 int STD_nopts
=0, /* number of elements in STD_opt_arr */
119 STD_argind
=1; /* argv index to next argv element */
120 /* (first argument) */
121 /* To getopt users, it is like optind */
124 * The following variables are to support system testing additions.
126 static int STD_TP_barrier
=0; /* flag to do barrier in TEST_PAUSE */
127 /* 2 - wait_barrier(), 3 - set_barrier(), * - barrier() */
128 static int STD_LP_barrier
=0; /* flag to do barrier in TEST_LOOPING */
129 /* 2 - wait_barrier(), 3 - set_barrier(), * - barrier() */
130 static int STD_TP_shmem_sz
=0; /* shmalloc this many words per pe in TEST_PAUSE */
131 static int STD_LD_shmem
=0; /* flag to do shmem_puts and shmem_gets during delay */
132 static int STD_LP_shmem
=0; /* flag to do shmem_puts and gets during TEST_LOOPING */
133 static int STD_LD_recfun
=0; /* do recressive function calls in loop delay */
134 static int STD_LP_recfun
=0; /* do recressive function calls in TEST_LOOPING */
135 static int STD_TP_sbrk
=0; /* do sbrk in TEST_PAUSE */
136 static int STD_LP_sbrk
=0; /* do sbrk in TEST_LOOPING */
137 static char *STD_start_break
=0; /* original sbrk size */
140 struct std_option_t
{
146 { "c:", " -c n Run n copies concurrently\n", NULL
, NULL
},
147 { "e" , " -e Turn on errno logging\n", NULL
, NULL
},
148 { "f" , " -f Turn off functional testing\n", NULL
, NULL
},
149 { "h" , " -h Show this help screen\n", NULL
, NULL
},
150 { "i:", " -i n Execute test n times\n", NULL
, NULL
},
151 { "I:", " -I x Execute test for x seconds\n", NULL
, NULL
},
152 { "p" , " -p Pause for SIGUSR1 before starting\n", NULL
, NULL
},
153 { "P:", " -P x Pause for x seconds between iterations\n", NULL
, NULL
},
154 { "t" , " -t Turn on syscall timing\n", NULL
, NULL
},
156 { "C:", " -C ARG Run the child process with arguments ARG (for internal use)\n",
159 {NULL
, NULL
, NULL
, NULL
}};
161 void print_help(void (*user_help
)(void));
164 * Structure for usc_recressive_func argument
166 struct usc_bigstack_t
{
170 static struct usc_bigstack_t
*STD_bigstack
=NULL
;
173 * Counter of errnos returned (-e option). Indexed by errno.
174 * Make the array USC_MAX_ERRNO long. That is the first Fortran
175 * Lib errno. No syscall should return an errno that high.
177 int STD_ERRNO_LIST
[USC_MAX_ERRNO
];
179 /* define the string length for Mesg and Mesg2 strings */
182 static char Mesg2
[STRLEN
]; /* holds possible return string */
183 static void usc_recressive_func(int, int, struct usc_bigstack_t
*);
186 * Define bits for options that might have env variable default
188 #define OPT_iteration 01
189 #define OPT_nofunccheck 02
190 #define OPT_duration 04
191 #define OPT_delay 010
192 #define OPT_copies 020
195 /* Allocated and used in self_exec.c: */
196 extern char *child_args
; /* Arguments to child when -C is used */
199 /**********************************************************************
201 **********************************************************************/
203 parse_opts(int ac
, char **av
, option_t
*user_optarr
, void (*uhf
)(void))
205 int found
; /* flag to indicate that an option specified was */
206 /* found in the user's list */
207 int k
; /* scratch integer for returns and short time usage */
208 float ftmp
; /* tmp float for parsing env variables */
209 char *ptr
; /* used in getting env variables */
210 int options
=0; /* no options specified */
213 int opt
; /* return of getopt */
216 * If not the first time this function is called, release the old STD_opt_arr
220 if ( STD_opt_arr
!= NULL
) {
224 /* Calculate how much space we need for the option string */
226 for (i
= 0; std_options
[i
].optstr
; ++i
)
227 optstrlen
+= strlen(std_options
[i
].optstr
);
229 for (i
= 0; user_optarr
[i
].option
; ++i
) {
230 if (strlen(user_optarr
[i
].option
) > 2)
231 return "parse_opts: ERROR - Only short options are allowed";
232 optstrlen
+= strlen(user_optarr
[i
].option
);
236 /* Create the option string for getopt */
237 optionstr
= (char *)malloc(optstrlen
);
239 return "parse_opts: ERROR - Could not allocate memory for optionstr";
243 for (i
= 0; std_options
[i
].optstr
; ++i
)
244 strcat(optionstr
, std_options
[i
].optstr
);
246 for (i
= 0; user_optarr
[i
].option
; ++i
)
247 /* only add the option if it wasn't there already */
248 if (strchr(optionstr
, user_optarr
[i
].option
[0]) == NULL
)
249 strcat(optionstr
, user_optarr
[i
].option
);
252 printf("STD_nopts = %d\n", STD_nopts
);
256 * Loop through av parsing options.
258 while ( (opt
= getopt(ac
, av
, optionstr
)) > 0) {
262 printf("parse_opts: getopt returned '%c'\n", opt
);
266 case '?': /* Unknown option */
267 return "Unknown option";
269 case ':': /* Missing Arg */
270 return "Missing argument";
272 case 'i': /* Iterations */
273 options
|= OPT_iteration
;
274 STD_LOOP_COUNT
= atoi(optarg
);
275 if (STD_LOOP_COUNT
== 0) STD_INFINITE
= 1;
277 case 'P': /* Delay between iterations */
278 options
|= OPT_delay
;
279 STD_LOOP_DELAY
= atof(optarg
);
281 case 'I': /* Time duration */
282 options
|= OPT_duration
;
283 STD_LOOP_DURATION
= atof(optarg
);
284 if ( STD_LOOP_DURATION
== 0.0 ) STD_INFINITE
=1;
286 case 'c': /* Copies */
287 options
|= OPT_copies
;
288 STD_COPIES
= atoi(optarg
);
290 case 'f': /* Functional testing */
291 STD_FUNCTIONAL_TEST
= 0;
293 case 'p': /* Pause for SIGUSR1 */
296 case 't': /* syscall timing */
299 case 'e': /* errno loggin */
307 case 'C': /* Run child */
313 /* Check all the user specified options */
315 for(i
= 0; user_optarr
[i
].option
; ++i
) {
317 if (opt
== user_optarr
[i
].option
[0]) {
318 /* Yup, This is a user option, set the flag and look for argument */
319 if ( user_optarr
[i
].flag
) {
320 *user_optarr
[i
].flag
=1;
324 /* save the argument at the user's location */
325 if ( user_optarr
[i
].option
[strlen(user_optarr
[i
].option
)-1] == ':' ) {
326 *user_optarr
[i
].arg
=optarg
;
328 break; /* option found - break out of the for loop */
331 /* This condition "should never happen". SO CHECK FOR IT!!!! */
334 "parse_opts: ERROR - option:\"%c\" NOT FOUND... INTERNAL ERROR", opt
);
347 if ( (ptr
=getenv("USC_DEBUG")) != NULL
) {
349 printf("env USC_DEBUG is defined, turning on debug\n");
351 if ( (ptr
=getenv("USC_VERBOSE")) != NULL
) {
353 printf("env USC_VERBOSE is defined, turning on debug\n");
357 * If the USC_ITERATION_ENV environmental variable is set to
358 * a number, use that number as iteration count (same as -c option).
359 * The -c option with arg will be used even if this env var is set.
361 if ( !(options
& OPT_iteration
) && (ptr
=getenv(USC_ITERATION_ENV
)) != NULL
) {
362 if ( sscanf(ptr
, "%i", &k
) == 1) {
363 if ( k
== 0 ) { /* if arg is 0, set infinite loop flag */
366 printf("Using env %s, set STD_INFINITE to 1\n",
368 } else { /* else, set the loop count to the arguement */
371 printf("Using env %s, set STD_LOOP_COUNT to %d\n",
372 USC_ITERATION_ENV
, k
);
378 * If the USC_NO_FUNC_CHECK environmental variable is set, we'll
379 * unset the STD_FUNCTIONAL_TEST variable.
381 if ( !(options
& OPT_nofunccheck
) && (ptr
=getenv(USC_NO_FUNC_CHECK
)) != NULL
) {
382 STD_FUNCTIONAL_TEST
=0; /* Turn off functional testing */
384 printf("Using env %s, set STD_FUNCTIONAL_TEST to 0\n",
389 * If the USC_LOOP_WALLTIME environmental variable is set,
390 * use that number as duration (same as -I option).
391 * The -I option with arg will be used even if this env var is set.
394 if ( !(options
& OPT_duration
) && (ptr
=getenv(USC_LOOP_WALLTIME
)) != NULL
) {
395 if ( sscanf(ptr
, "%f", &ftmp
) == 1 && ftmp
>= 0.0 ) {
396 STD_LOOP_DURATION
=ftmp
;
398 printf("Using env %s, set STD_LOOP_DURATION to %f\n",
399 USC_LOOP_WALLTIME
, ftmp
);
400 if ( STD_LOOP_DURATION
== 0.0 ) { /* if arg is 0, set infinite loop flag */
403 printf("Using env %s, set STD_INFINITE to 1\n", USC_LOOP_WALLTIME
);
407 if ( !(options
& OPT_duration
) && (ptr
=getenv("USC_DURATION")) != NULL
) {
408 if ( sscanf(ptr
, "%f", &ftmp
) == 1 && ftmp
>= 0.0 ) {
409 STD_LOOP_DURATION
=ftmp
;
411 printf("Using env USC_DURATION, set STD_LOOP_DURATION to %f\n", ftmp
);
412 if ( STD_LOOP_DURATION
== 0.0 ) { /* if arg is 0, set infinite loop flag */
415 printf("Using env USC_DURATION, set STD_INFINITE to 1\n");
420 * If the USC_LOOP_DELAY environmental variable is set,
421 * use that number as delay in factional seconds (same as -P option).
422 * The -P option with arg will be used even if this env var is set.
424 if ( !(options
& OPT_delay
) && (ptr
=getenv(USC_LOOP_DELAY
)) != NULL
) {
425 if ( sscanf(ptr
, "%f", &ftmp
) == 1 && ftmp
>= 0.0 ) {
428 printf("Using env %s, set STD_LOOP_DELAY = %f\n",
429 USC_LOOP_DELAY
, ftmp
);
434 * If the USC_COPIES environmental variable is set,
435 * use that number as copies (same as -c option).
436 * The -c option with arg will be used even if this env var is set.
438 if ( !(options
& OPT_copies
) && (ptr
=getenv(USC_COPIES
)) != NULL
) {
439 if ( sscanf(ptr
, "%d", &STD_COPIES
) == 1 && STD_COPIES
>= 0 ) {
441 printf("Using env %s, set STD_COPIES = %d\n",
442 USC_COPIES
, STD_COPIES
);
447 * The following are special system testing envs to turn on special
450 if ( (ptr
=getenv("USC_TP_BARRIER")) != NULL
) {
451 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
457 printf("using env USC_TP_BARRIER, Set STD_TP_barrier to %d\n",
461 if ( (ptr
=getenv("USC_LP_BARRIER")) != NULL
) {
462 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
468 printf("using env USC_LP_BARRIER, Set STD_LP_barrier to %d\n",
472 if ( (ptr
=getenv("USC_TP_SHMEM")) != NULL
) {
473 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
476 printf("Using env USC_TP_SHMEM, Set STD_TP_shmem_sz to %d\n",
481 if ( (ptr
=getenv("USC_LP_SHMEM")) != NULL
) {
482 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
485 printf("Using env USC_LP_SHMEM, Set STD_LP_shmem to %d\n",
490 if ( (ptr
=getenv("USC_LD_SHMEM")) != NULL
) {
491 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
494 printf("Using env USC_LD_SHMEM, Set STD_LD_shmem to %d\n",
499 if ( (ptr
=getenv("USC_TP_SBRK")) != NULL
) {
500 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
503 printf("Using env USC_TP_SBRK, Set STD_TP_sbrk to %d\n",
508 #if !defined(UCLINUX)
509 if ( (ptr
=getenv("USC_LP_SBRK")) != NULL
) {
510 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
513 printf("Using env USC_LP_SBRK, Set STD_LP_sbrk to %d\n",
517 #endif /* if !defined(UCLINUX) */
519 if ( (ptr
=getenv("USC_LP_RECFUN")) != NULL
) {
520 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
522 if ( STD_bigstack
!= (struct usc_bigstack_t
*)NULL
)
523 STD_bigstack
=(struct usc_bigstack_t
*)
524 malloc(sizeof(struct usc_bigstack_t
));
526 printf("Using env USC_LP_RECFUN, Set STD_LP_recfun to %d\n",
531 if ( (ptr
=getenv("USC_LD_RECFUN")) != NULL
) {
532 if ( sscanf(ptr
, "%i", &k
) == 1 && k
>= 0 ) {
534 if ( STD_bigstack
!= (struct usc_bigstack_t
*)NULL
)
535 STD_bigstack
=(struct usc_bigstack_t
*)
536 malloc(sizeof(struct usc_bigstack_t
));
538 printf("Using env USC_LD_RECFUN, Set STD_LD_recfun to %d\n",
544 printf("The following variables after option and env parsing:\n");
545 printf("STD_FUNCTIONAL_TEST = %d\n", STD_FUNCTIONAL_TEST
);
546 printf("STD_LOOP_DURATION = %f\n", STD_LOOP_DURATION
);
547 printf("STD_LOOP_DELAY = %f\n", STD_LOOP_DELAY
);
548 printf("STD_COPIES = %d\n", STD_COPIES
);
549 printf("STD_LOOP_COUNT = %d\n", STD_LOOP_COUNT
);
550 printf("STD_INFINITE = %d\n", STD_INFINITE
);
551 printf("STD_TIMING_ON = %d\n", STD_TIMING_ON
);
552 printf("STD_ERRNO_LOG = %d\n", STD_ERRNO_LOG
);
553 printf("STD_PAUSE = %d\n", STD_PAUSE
);
556 return((char *) NULL
);
558 } /* end of parse_opts */
560 /*********************************************************************
561 * print_help() - print help message and user help message
562 *********************************************************************/
563 void print_help(void (*user_help
)(void))
567 if (user_help
) user_help();
570 /*********************************************************************
571 * STD_opts_help() - return a help string for the STD_OPTIONS.
572 *********************************************************************/
578 for(i
= 0; std_options
[i
].optstr
; ++i
) {
579 if (std_options
[i
].help
)
580 fputs(std_options
[i
].help
, stdout
);
585 * routine to goto when we get the SIGUSR1 for STD_PAUSE
592 /***********************************************************************
593 * This function will do desired end of global setup test
595 * Currently it will only do a pause waiting for sigusr1 if
598 ***********************************************************************/
600 usc_global_setup_hook(void)
604 /* temp variable to store old signal action to be restored after pause */
605 int (*_TMP_FUNC
)(void);
608 * Fork STD_COPIES-1 copies.
610 for(cnt
=1;cnt
<STD_COPIES
;cnt
++) {
613 fprintf(stderr
, "%s: fork() failed, errno:%d %s\n",
614 __FILE__
, errno
, strerror(errno
));
617 cnt
=STD_COPIES
; /* to stop the forking */
620 default: /* parent */
626 * pause waiting for sigusr1.
629 _TMP_FUNC
= (int (*)(void))signal(SIGUSR1
, STD_go
);
631 signal(SIGUSR1
, (void (*)(int))_TMP_FUNC
);
634 #if !defined(UCLINUX)
636 if ( STD_TP_sbrk
|| STD_LP_sbrk
) {
637 STD_start_break
=sbrk(0); /* get original sbreak size */
643 printf("after sbrk(%d)\n", STD_TP_sbrk
);
646 #endif /* if !defined(UCLINUX) */
651 #define USECS_PER_SEC 1000000 /* microseconds per second */
653 /***********************************************************************
654 * This function returns the number of get_current_time()'s return
656 ***********************************************************************/
661 return USECS_PER_SEC
; /* microseconds per second */
665 /***********************************************************************
666 * this function will get current time in microseconds since 1970.
667 ***********************************************************************/
669 get_current_time(void)
671 struct timeval curtime
;
673 gettimeofday(&curtime
, NULL
);
675 /* microseconds since 1970 */
676 return (curtime
.tv_sec
*USECS_PER_SEC
) + curtime
.tv_usec
;
681 /***********************************************************************
683 * This function will determine if test should continue iterating
684 * If the STD_INFINITE flag is set, return 1.
685 * If the STD_LOOP_COUNT variable is set, compare it against
687 * If the STD_LOOP_DURATION variable is set, compare current time against
688 * calculated stop_time.
689 * This function will return 1 until all desired looping methods
692 * counter integer is supplied by the user program.
693 ***********************************************************************/
695 usc_test_looping(counter
)
698 static int first_time
= 1;
699 static int stop_time
= 0; /* stop time in rtc or usecs */
700 static int delay
; /* delay in clocks or usecs */
701 int hertz
=0; /* clocks per second or usecs per second */
702 int ct
, end
; /* current time, end delay time */
703 int keepgoing
=0; /* used to determine return value */
706 * If this is the first iteration and we are looping for
707 * duration of STD_LOOP_DURATION seconds (fractional) or
708 * doing loop delays, get the clocks per second.
713 if ( STD_LOOP_DELAY
|| STD_LOOP_DURATION
) {
714 hertz
= get_timepersec();
718 * If looping for duration, calculate stop time in
722 if ( STD_LOOP_DURATION
) {
723 ct
=get_current_time();
724 stop_time
=(int)((float)hertz
* STD_LOOP_DURATION
) + ct
;
728 * If doing delay each iteration, calcuate the number
729 * of clocks for each delay.
731 if ( STD_LOOP_DELAY
) {
732 delay
=(int)((float)hertz
* STD_LOOP_DELAY
);
738 * if delay each iteration, loop for delay clocks.
739 * This will not be done on first iteration.
740 * The delay will happen before determining if
741 * there will be another iteration.
743 else if ( STD_LOOP_DELAY
) {
744 ct
=get_current_time();
748 * The following are special test hooks in the delay loop.
750 if ( STD_LD_recfun
) {
752 printf("calling usc_recressive_func(0, %d, STD_bigstack)\n",
754 usc_recressive_func(0, STD_LD_recfun
, STD_bigstack
);
757 ct
=get_current_time();
761 if ( STD_INFINITE
) {
765 if ( STD_LOOP_COUNT
&& counter
< STD_LOOP_COUNT
) {
769 if ( STD_LOOP_DURATION
!= 0.0 && get_current_time() < stop_time
) {
773 if ( keepgoing
== 0 )
777 * The following code allows special system testing hooks.
780 if ( STD_LP_recfun
) {
782 printf("calling usc_recressive_func(0, %d, STD_bigstack)\n",
784 usc_recressive_func(0, STD_LP_recfun
, STD_bigstack
);
787 #if !defined(UCLINUX)
791 printf("about to do sbrk(%d)\n", STD_LP_sbrk
);
800 return 0; /* done - stop iterating */
805 * This function recressively calls itself max times.
808 usc_recressive_func(cnt
, max
, bstack
)
811 struct usc_bigstack_t
*bstack
;
814 usc_recressive_func(cnt
+1, max
, bstack
);
819 /******************************************************************************
823 * this following code is provide so that unit testing can
824 * be done fairly easily.
825 ******************************************************************************/
832 * Code from usctest.h that not part of this file since we are the library.
835 struct usc_errno_t TEST_VALID_ENO
[USC_MAX_ERRNO
];
837 /***********************************************************************
838 * Globals for returning the return code and errno from the system call
840 ***********************************************************************/
844 /***********************************************************************
845 * temporary variables for determining max and min times in TEST macro
846 ***********************************************************************/
847 long btime
, etime
, tmptime
;
851 /* for test specific parse_opts options */
852 option_t Options
[] = {
853 { "help", &Help2
, NULL
}, /* -help option */
854 { "h", &Help
, NULL
}, /* -h option */
855 { TIMING
, NULL
, NULL
}, /* disable -timing option */
857 #if INVALID_TEST_CASES
858 { "missingflag", NULL
, &ptr
}, /* error */
859 { "missingarg:", &Help
, NULL
}, /* error */
860 #endif /* INVALID_TEST_CASES */
875 if ( (msg
=parse_opts(argc
, argv
,
876 (option_t
*) Options
)) != (char *) NULL
) {
877 printf("ERROR : %s\n", msg
);
883 for (lc
=0; TEST_LOOPING(lc
); lc
++) {
885 TEST( gettimeofday(&t
, NULL
) );
886 printf("iter=%d: sec:%d, usec:%6.6d %s", lc
+1, t
.tv_sec
,
887 t
.tv_usec
, ctime(&t
.tv_sec
));
896 #endif /* UNIT_TEST */