diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-20 12:25:27 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-20 14:03:38 (GMT) |
commit | 076a2a027b986684cd0c1a08e37256655409b41e (patch) | |
tree | b7689b999e683e9c37702bc53aac7f08212627e6 /tests/auto/qtcpsocket/tst_qtcpsocket.cpp | |
parent | ba87f8ecd38effd5a437865fc500f289f0fbe921 (diff) | |
download | Qt-076a2a027b986684cd0c1a08e37256655409b41e.zip Qt-076a2a027b986684cd0c1a08e37256655409b41e.tar.gz Qt-076a2a027b986684cd0c1a08e37256655409b41e.tar.bz2 |
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.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 <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); |