From ea7d86b2450f3d4587e13c21b900ad10211aed60 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 12 Nov 2009 00:21:51 +0000 Subject: 2009-11-11 Joel Sherrill PR 1466/tests * Makefile.am, configure.ac, psxclock/init.c, psxclock/psxclock.doc, psxclock/psxclock.scn, psxkey03/init.c, psxsignal02/init.c, psxsignal03/init.c, psxstack01/init.c: Remove usleep() from tests. Add test specifically to test it since it is deprecated as of POSIX.1-2008. * psxusleep/.cvsignore, psxusleep/Makefile.am, psxusleep/init.c, psxusleep/psxusleep.doc, psxusleep/psxusleep.scn: New files. --- testsuites/psxtests/psxsignal03/init.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'testsuites/psxtests/psxsignal03') diff --git a/testsuites/psxtests/psxsignal03/init.c b/testsuites/psxtests/psxsignal03/init.c index d6f2e8b4e7..38b69ce8dc 100644 --- a/testsuites/psxtests/psxsignal03/init.c +++ b/testsuites/psxtests/psxsignal03/init.c @@ -148,6 +148,7 @@ void *POSIX_Init( struct sigaction act; bool trueArg = true; bool falseArg = false; + struct timespec delay_request; puts( "\n\n*** POSIX TEST SIGNAL " TEST_NAME " ***" ); puts( "Init - Variation is: " TEST_STRING ); @@ -168,10 +169,14 @@ void *POSIX_Init( assert( !sc ); puts( "Init - sleep - let threads settle - OK" ); - usleep(500000); + delay_request.tv_sec = 0; + delay_request.tv_nsec = 5 * 100000000; + sc = nanosleep( &delay_request, NULL ); + assert( !sc ); puts( "Init - sleep - SignalBlocked thread settle - OK" ); - usleep(500000); + sc = nanosleep( &delay_request, NULL ); + assert( !sc ); printf( "Init - sending %s - deliver to one thread\n", signal_name(SIGNAL_TWO)); -- cgit v1.2.3