From 076a2a027b986684cd0c1a08e37256655409b41e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 20 Aug 2009 14:25:27 +0200 Subject: Autotest: this test is not passing: so show that. The problem is that this the test is running into a false positive. It thinks it's ok, but it isn't. So show the problem. --- tests/auto/qtcpsocket/tst_qtcpsocket.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index ebb62e1..6d0dc21 100644 --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp @@ -45,6 +45,8 @@ #else #include #include +#include +#include #define SOCKET int #define INVALID_SOCKET -1 #endif @@ -415,6 +417,11 @@ void tst_QTcpSocket::setSocketDescriptor() } #else SOCKET sock = ::socket(AF_INET, SOCK_STREAM, 0); + + // artificially increase the value of sock + SOCKET sock2 = ::fcntl(sock, F_DUPFD, sock + 50); + ::close(sock); + sock = sock2; #endif QVERIFY(sock != INVALID_SOCKET); -- cgit v0.12