From: Subrata <sub...@us...> - 2009-03-23 14:45:59
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/gettimeofday In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14647/ltp/testcases/kernel/syscalls/gettimeofday Modified Files: gettimeofday01.c gettimeofday02.c Log Message: Coding Syle Cleanups. Signed-Off-By: <mic...@pe...>. Index: gettimeofday01.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gettimeofday01.c 19 Mar 2007 07:08:46 -0000 1.10 --- gettimeofday01.c 23 Mar 2009 13:35:45 -0000 1.11 *************** *** 91,95 **** ret = TEST_RETURN; if (ret != -1) { ! tst_resm(TFAIL, "call succeeded unexpectedly (got back %i, wanted -1)", ret); continue; } --- 91,97 ---- ret = TEST_RETURN; if (ret != -1) { ! tst_resm(TFAIL, ! "call succeeded unexpectedly (got back %i, wanted -1)", ! ret); continue; } *************** *** 97,104 **** TEST_ERROR_LOG(TEST_ERRNO); if (TEST_ERRNO == EFAULT) ! tst_resm(TPASS, "gettimeofday(2) set the errno EFAULT correctly"); else ! tst_resm(TFAIL, "gettimeofday(2) didn't set errno to EFAULT, errno=%i (%s)", ! errno, strerror(errno)); } cleanup(); --- 99,108 ---- TEST_ERROR_LOG(TEST_ERRNO); if (TEST_ERRNO == EFAULT) ! tst_resm(TPASS, ! "gettimeofday(2) set the errno EFAULT correctly"); else ! tst_resm(TFAIL, ! "gettimeofday(2) didn't set errno to EFAULT, errno=%i (%s)", ! errno, strerror(errno)); } cleanup(); Index: gettimeofday02.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gettimeofday02.c 19 Mar 2007 07:08:46 -0000 1.6 --- gettimeofday02.c 23 Mar 2009 13:35:45 -0000 1.7 *************** *** 93,111 **** TEST_PAUSE; ! tst_resm(TINFO, "checking if gettimeofday is monotonous, takes %ss", tlen); signal(SIGALRM, breakout); alarm(atoi(tlen)); if (gettimeofday(&tv1, NULL) != 0) ! tst_brkm(TBROK, cleanup, "first gettimeofday() failed: %s\n", strerror(errno)); while (!done) { if (gettimeofday(&tv2, NULL) != 0) ! tst_brkm(TBROK, cleanup, "loop gettimeofday() failed: %s\n", strerror(errno)); if (tv2.tv_sec < tv1.tv_sec || (tv2.tv_sec == tv1.tv_sec && tv2.tv_usec < tv1.tv_usec)) { tst_resm(TFAIL, ! "Time is going backwards: old %d.%d vs new %d.%d!", ! tv1.tv_sec, tv1.tv_usec, tv2.tv_sec, tv2.tv_usec); cleanup(); return 1; --- 93,116 ---- TEST_PAUSE; ! tst_resm(TINFO, "checking if gettimeofday is monotonous, takes %ss", ! tlen); signal(SIGALRM, breakout); alarm(atoi(tlen)); if (gettimeofday(&tv1, NULL) != 0) ! tst_brkm(TBROK, cleanup, "first gettimeofday() failed: %s\n", ! strerror(errno)); while (!done) { if (gettimeofday(&tv2, NULL) != 0) ! tst_brkm(TBROK, cleanup, ! "loop gettimeofday() failed: %s\n", ! strerror(errno)); if (tv2.tv_sec < tv1.tv_sec || (tv2.tv_sec == tv1.tv_sec && tv2.tv_usec < tv1.tv_usec)) { tst_resm(TFAIL, ! "Time is going backwards: old %d.%d vs new %d.%d!", ! tv1.tv_sec, tv1.tv_usec, tv2.tv_sec, ! tv2.tv_usec); cleanup(); return 1; |