Hi! > >>According to POSIX, many historical implementations (including Version 7 > >>and System V) allow an alarm to occur up to a second early. Other > >>implementations allow alarms up to half a second or one clock tick early > >>or do not allow them to occur early at all. That means, the SIGALRM sent > >>by alarm() could arrive a little earlier. So, even if sem_wait() is > >>blocked, test could still fail. > >>Setting a range for time checking would be better. When sem_wait() is > >>block and then be interrupted by SIGALRM, if the time is in this range, > >>test is passed. > >Out of curiosity, what system is this? The signal seems to arrives after > >more than 1 second on all linux boxes that I have. > My box is like the following: > > OS: RHEL5.5 x86-64. > Memory: 2GB > CPU: Intel(R) Xeon(TM) CPU 3.00GHz (4 CPUs) > > > Sometimes it worked normally, but sometimes I got the following messages: > > Ts: 1300437153.432960442 -> 1300437154.432457949 > Test ../../../conformance/interfaces/sem_wait/13-1.c > FAILED: The sem_wait call did not block
Okay, I've did a little different fix. Now the alarm is set to wait for two seconds and we expects it to last at least one. -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
