Review Request 108385: Reduce risk of timeout and race condition in KPtyProcessTest

Jon Severinsson jon at severinsson.net
Sun Jan 13 19:08:16 UTC 2013



> On Jan. 13, 2013, 6:45 p.m., Oswald Buddenhagen wrote:
> > and why exactly do you sleep instead of looping with waitforreadyread?

Because that would be an (almost) busy-loop (there are already *some* data, so waitForReadyRead could return before the timeout).


- Jon


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108385/#review25394
-----------------------------------------------------------


On Jan. 13, 2013, 1:03 p.m., Jon Severinsson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108385/
> -----------------------------------------------------------
> 
> (Updated Jan. 13, 2013, 1:03 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Description
> -------
> 
> Increase timeout, and sleep a while after waitForReadyRead() returns,
> as it only guarantees that *some* data is available to read, while
> the test assumes that a full line of data is available to read...
> 
> This reduces failure rate from 10% to 2% on my setup.
> 
> 
> Diffs
> -----
> 
>   kpty/tests/kptyprocesstest.cpp b95ae26 
> 
> Diff: http://git.reviewboard.kde.org/r/108385/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jon Severinsson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130113/80249051/attachment.html>


More information about the Kde-frameworks-devel mailing list