From: nobuhiro <[email protected]> Sometimes we may get failed results that the measured time is 1 second longer than expected. As fixed by Craig Meier earlier, the sleeps may last slightly more than total_sec. Also considering the time() overhead, we should expect the sleeps to last between total_sec and (total_sec+1) seconds.
Signed-off-by: Nobuhiro Lin <[email protected]> --- testcases/kernel/syscalls/pselect/pselect01.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/pselect/pselect01.c b/testcases/kernel/syscalls/pselect/pselect01.c index 08d168f..1778dfe 100644 --- a/testcases/kernel/syscalls/pselect/pselect01.c +++ b/testcases/kernel/syscalls/pselect/pselect01.c @@ -108,7 +108,7 @@ int main() NULL); end = time(&t); - if (total_sec >= (end - start)) + if(((end - start) >= total_sec) && ((end - start) <= total_sec + 1)) tst_resm(TPASS, "Sleep time was correct"); else tst_resm(TFAIL, "Sleep time was incorrect:%d != %d", -- 1.6.3.1 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
