On Thu 30-07-15 14:57:03, Cyril Hrubis wrote: > Hi! > > + for (lc = 0; TEST_LOOPING(lc); lc++) { > > + pid = fork(); > > + if (pid == 0) { > > + while (1) { > > + for (i = 0; i < FILES; i++) { > > + fd = SAFE_OPEN(cleanup, names[i], > > + O_CREAT | O_RDWR, 0600); > > + SAFE_CLOSE(cleanup, fd); > > + } > > + for (i = 0; i < FILES; i++) > > + SAFE_UNLINK(cleanup, names[i]); > > + } > > + } else if (pid == -1) > > + tst_brkm(TBROK | TERRNO, cleanup, "fork() failed"); > > + > > + start = time(NULL); > > + while (time(NULL) - start < DURATION) { > > Using time() for measuring how long something has been executed is not a > good idea for several reasons. Can't we settle for large enough number > of iterations instead?
OK, I've changed that to a number of iterations. Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list