From: <ro...@us...> - 2003-07-26 11:55:45
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/fcntl In directory sc8-pr-cvs1:/tmp/cvs-serv14121 Modified Files: fcntl14.c Log Message: Applied patch from Ramesh Subramanian: =================== Here, the global "fail" is reset to 0 every time run_test is called. Without this change, tests that pass will sometimes be reported as failures. Also, the stdout is flushed before forking to avoid garbled output. =================== Index: fcntl14.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/fcntl/fcntl14.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fcntl14.c 25 Mar 2003 22:57:02 -0000 1.4 +++ fcntl14.c 25 Jul 2003 16:10:11 -0000 1.5 @@ -725,6 +725,9 @@ { extern long time(); + /* reset fail to 0 for each run_test call */ + fail = 0; + /* loop thru all test cases */ for (test = start; test < end; test++) { /* open a temp file to lock */ @@ -788,6 +791,9 @@ * Mask SIG_USR1 before forking child, to avoid race */ (void)sighold(SIGUSR1); + + /* flush the stdout to avoid garbled output */ + fflush(stdout); /* spawn a child process */ if ((child = fork()) == 0) { |