summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-20 14:25:27 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-20 16:03:38 +0200
commit076a2a027b986684cd0c1a08e37256655409b41e (patch)
treeb7689b999e683e9c37702bc53aac7f08212627e6 /tests/auto/qtcpsocket/tst_qtcpsocket.cpp
parentba87f8ecd38effd5a437865fc500f289f0fbe921 (diff)
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.
Diffstat (limited to 'tests/auto/qtcpsocket/tst_qtcpsocket.cpp')
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index ebb62e127e..6d0dc2193b 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -45,6 +45,8 @@
#else
#include <sys/types.h>
#include <sys/socket.h>
+#include <fcntl.h>
+#include <unistd.h>
#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);