[asterisk-dev] [Code Review] Fix time test on platforms without inotify

Tilghman Lesher tlesher at digium.com
Tue Mar 16 10:27:39 CDT 2010



> On 2010-03-16 10:23:34, Russell Bryant wrote:
> > /trunk/main/stdtime/localtime.c, lines 385-391
> > <https://reviewboard.asterisk.org/r/554/diff/1/?file=8578#file8578line385>
> >
> >     I'd like to see an implementation that guarantees that the intended side effect of this function has occurred.  It looks like this is supposed to cause read() to break out, but there is no guarantee that the loop is sleeping in read() at this point.  Also, usleep() doesn't guarantee anything here, either.

No, it's intended to hit the OTHER implementation, that is a nanosleep for 60 seconds.  I had to change the Linux implementation because breaking out of the read() previously caused it to wait 10 seconds, which made the test on Linux fail.


- Tilghman


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/554/#review1676
-----------------------------------------------------------


On 2010-03-15 16:50:08, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/554/
> -----------------------------------------------------------
> 
> (Updated 2010-03-15 16:50:08)
> 
> 
> Review request for Asterisk Developers and Russell Bryant.
> 
> 
> Summary
> -------
> 
> Time test currently fails on non-Linux platforms, such as Mac OS X.
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/localtime.h 252526 
>   /trunk/main/stdtime/localtime.c 252526 
>   /trunk/tests/test_time.c 252526 
> 
> Diff: https://reviewboard.asterisk.org/r/554/diff
> 
> 
> Testing
> -------
> 
> Verified to work correctly on both Linux and Mac OS X (competing implementations).
> 
> 
> Thanks,
> 
> Tilghman
> 
>




More information about the asterisk-dev mailing list