From: Subrata <sub...@us...> - 2007-07-26 12:02:45
|
Update of /cvsroot/ltp/ltp/testcases/open_posix_testsuite/conformance/behavior/timers In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv23217/ltp/testcases/open_posix_testsuite/conformance/behavior/timers Modified Files: 1-1.c 2-1.c Log Message: Upgrade to Posix Testsuite 1.5.2 Index: 1-1.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/open_posix_testsuite/conformance/behavior/timers/1-1.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 1-1.c 3 Jun 2005 16:29:51 -0000 1.3 --- 1-1.c 26 Jul 2007 12:02:11 -0000 1.4 *************** *** 14,17 **** --- 14,18 ---- #include <stdio.h> #include <limits.h> + #include <unistd.h> #include "posixtest.h" *************** *** 20,25 **** timer_t tid; int i; ! for (i=0; i<TIMER_MAX;i++) { if (timer_create(CLOCK_REALTIME, NULL, &tid) != 0) { perror("timer_create() did not return success\n"); --- 21,29 ---- timer_t tid; int i; + long scTIMER_MAX=0; ! scTIMER_MAX=sysconf(_SC_TIMER_MAX); ! ! for (i=0; i<scTIMER_MAX;i++) { if (timer_create(CLOCK_REALTIME, NULL, &tid) != 0) { perror("timer_create() did not return success\n"); Index: 2-1.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/open_posix_testsuite/conformance/behavior/timers/2-1.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 2-1.c 3 Jun 2005 16:29:51 -0000 1.3 --- 2-1.c 26 Jul 2007 12:02:11 -0000 1.4 *************** *** 14,28 **** #include <stdio.h> #include <limits.h> #include "posixtest.h" int main(int argc, char *argv[]) { #ifdef DEBUG printf("TIMER_MAX = %ld\n_POSIX_TIMER_MAX=%ld\n", ! (long) TIMER_MAX, (long) _POSIX_TIMER_MAX); #endif ! if (TIMER_MAX < _POSIX_TIMER_MAX) { ! printf("Test FAILED\n"); return PTS_FAIL; } --- 14,33 ---- #include <stdio.h> #include <limits.h> + #include <unistd.h> #include "posixtest.h" int main(int argc, char *argv[]) { + long scTIMER_MAX=0; + + scTIMER_MAX=sysconf(_SC_TIMER_MAX); + #ifdef DEBUG printf("TIMER_MAX = %ld\n_POSIX_TIMER_MAX=%ld\n", ! scTIMER_MAX, (long) _POSIX_TIMER_MAX); #endif ! if ((scTIMER_MAX != -1) && (scTIMER_MAX < _POSIX_TIMER_MAX)) { ! printf("Test FAILED (%ld < %ld)\n", scTIMER_MAX, (long)_POSIX_TIMER_MAX); return PTS_FAIL; } |