Review Request 108380: Fix race condition in KTcpSocketTest

Jon Severinsson jon at severinsson.net
Sun Jan 13 09:28:06 GMT 2013


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

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/42a62ab0/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