Review Request 108380: Fix race condition in KTcpSocketTest

David Faure faure at kde.org
Sun Jan 13 12:04:04 GMT 2013


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



kdecore/tests/ktcpsockettest.cpp
<http://git.reviewboard.kde.org/r/108380/#comment19355>

    I think this means the purpose of (the second half of) this test was to test write+waitForReadyRead without an explicit call to waitForBytesWritten in between, like the first half of the test does.
    
    Removing the test doesn't seem like the right fix...


- David Faure


On Jan. 13, 2013, 11:54 a.m., Jon Severinsson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108380/
> -----------------------------------------------------------
> 
> (Updated Jan. 13, 2013, 11:54 a.m.)
> 
> 
> Review request for KDE Frameworks and kdelibs.
> 
> 
> Description
> -------
> 
> In some cases, only part of the first response had arrived when the second
> s->write(HTTPREQUEST) was executed. Thus the second s->waitForReadyRead()
> would return when the rest of the first response arrived, which in some
> cases would be before the second request had left the write buffer
> That in turn meant that s->close() would be run with a non-empty write
> buffer, thus only putting the socket in ClosingState rather than
> UnconnectedState as the test expected.
> 
> Only tested on the frameworks branch, but it might be applicable to master as well.
> 
> 
> Diffs
> -----
> 
>   kdecore/tests/ktcpsockettest.cpp bfc4212 
> 
> Diff: http://git.reviewboard.kde.org/r/108380/diff/
> 
> 
> Testing
> -------
> 
> Run the test 100 times in a loop without any failures.
> 
> 
> Thanks,
> 
> Jon Severinsson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130113/16d73b22/attachment.htm>
-------------- next part --------------
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel at kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


More information about the kde-core-devel mailing list