| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | | - |
| 28 | | - |
| 29 | | - |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | | - |
| 34 | | - |
| 35 | | - |
| 36 | #include "qnativesocketengine_p.h" | - |
| 37 | #include "private/qnet_unix_p.h" | - |
| 38 | #include "qiodevice.h" | - |
| 39 | #include "qhostaddress.h" | - |
| 40 | #include "qelapsedtimer.h" | - |
| 41 | #include "qvarlengtharray.h" | - |
| 42 | #include "qnetworkinterface.h" | - |
| 43 | #include <time.h> | - |
| 44 | #include <errno.h> | - |
| 45 | #include <fcntl.h> | - |
| 46 | #ifndef QT_NO_IPV6IFNAME | - |
| 47 | #include <net/if.h> | - |
| 48 | #endif | - |
| 49 | #ifdef QT_LINUXBASE | - |
| 50 | #include <arpa/inet.h> | - |
| 51 | #endif | - |
| 52 | #ifdef Q_OS_BSD4 | - |
| 53 | #include <net/if_dl.h> | - |
| 54 | #endif | - |
| 55 | | - |
| 56 | #if defined QNATIVESOCKETENGINE_DEBUG | - |
| 57 | #include <qstring.h> | - |
| 58 | #include <ctype.h> | - |
| 59 | #endif | - |
| 60 | | - |
| 61 | #include <netinet/tcp.h> | - |
| 62 | | - |
| 63 | QT_BEGIN_NAMESPACE | - |
| 64 | | - |
| 65 | #if defined QNATIVESOCKETENGINE_DEBUG | - |
| 66 | | - |
| 67 | | - |
| 68 | | - |
| 69 | | - |
| 70 | | - |
| 71 | static QByteArray qt_prettyDebug(const char *data, int len, int maxSize) | - |
| 72 | { | - |
| 73 | if (!data) return "(null)"; | - |
| 74 | QByteArray out; | - |
| 75 | for (int i = 0; i < len; ++i) { | - |
| 76 | char c = data[i]; | - |
| 77 | if (isprint(c)) { | - |
| 78 | out += c; | - |
| 79 | } else switch (c) { | - |
| 80 | case '\n': out += "\\n"; break; | - |
| 81 | case '\r': out += "\\r"; break; | - |
| 82 | case '\t': out += "\\t"; break; | - |
| 83 | default: | - |
| 84 | QString tmp; | - |
| 85 | tmp.sprintf("\\%o", c); | - |
| 86 | out += tmp.toLatin1(); | - |
| 87 | } | - |
| 88 | } | - |
| 89 | | - |
| 90 | if (len < maxSize) | - |
| 91 | out += "..."; | - |
| 92 | | - |
| 93 | return out; | - |
| 94 | } | - |
| 95 | #endif | - |
| 96 | | - |
| 97 | | - |
| 98 | | - |
| 99 | | - |
| 100 | | - |
| 101 | static inline void qt_socket_getPortAndAddress(const qt_sockaddr *s, quint16 *port, QHostAddress *addr) | - |
| 102 | { | - |
| 103 | if (s->a.sa_family == AF_INET6) {| TRUE | evaluated 1783 times by 14 testsEvaluated by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 8225 times by 31 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
|
| 1783-8225 |
| 104 | Q_IPV6ADDR tmp; | - |
| 105 | memcpy(&tmp, &s->a6.sin6_addr, sizeof(tmp)); | - |
| 106 | if (addr) {| TRUE | evaluated 1783 times by 14 testsEvaluated by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | never evaluated |
| 0-1783 |
| 107 | QHostAddress tmpAddress; | - |
| 108 | tmpAddress.setAddress(tmp); | - |
| 109 | *addr = tmpAddress; | - |
| 110 | if (s->a6.sin6_scope_id) {| TRUE | evaluated 30 times by 2 testsEvaluated by:- tst_QTcpServer
- tst_QUdpSocket
| | FALSE | evaluated 1753 times by 14 testsEvaluated by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 30-1753 |
| 111 | #ifndef QT_NO_IPV6IFNAME | - |
| 112 | char scopeid[IFNAMSIZ]; | - |
| 113 | if (::if_indextoname(s->a6.sin6_scope_id, scopeid)) {| TRUE | evaluated 30 times by 2 testsEvaluated by:- tst_QTcpServer
- tst_QUdpSocket
| | FALSE | never evaluated |
| 0-30 |
| 114 | addr->setScopeId(QLatin1String(scopeid)); | - |
| 115 | } elseexecuted 30 times by 2 tests: end of blockExecuted by:- tst_QTcpServer
- tst_QUdpSocket
| 30 |
| 116 | #endif | - |
| 117 | addr->setScopeId(QString::number(s->a6.sin6_scope_id)); never executed: addr->setScopeId(QString::number(s->a6.sin6_scope_id)); | 0 |
| 118 | } | - |
| 119 | }executed 1783 times by 14 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 1783 |
| 120 | if (port)| TRUE | evaluated 1783 times by 14 testsEvaluated by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | never evaluated |
| 0-1783 |
| 121 | *port = ntohs(s->a6.sin6_port);executed 1783 times by 14 tests: *port = ntohs(s->a6.sin6_port);Executed by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 1783 |
| 122 | return;executed 1783 times by 14 tests: return;Executed by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 1783 |
| 123 | } | - |
| 124 | | - |
| 125 | if (port)| TRUE | evaluated 8225 times by 31 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
| | FALSE | never evaluated |
| 0-8225 |
| 126 | *port = ntohs(s->a4.sin_port);executed 8225 times by 31 tests: *port = ntohs(s->a4.sin_port);Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
| 8225 |
| 127 | if (addr) {| TRUE | evaluated 8225 times by 31 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
| | FALSE | never evaluated |
| 0-8225 |
| 128 | QHostAddress tmpAddress; | - |
| 129 | tmpAddress.setAddress(ntohl(s->a4.sin_addr.s_addr)); | - |
| 130 | *addr = tmpAddress; | - |
| 131 | }executed 8225 times by 31 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
| 8225 |
| 132 | }executed 8225 times by 31 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
| 8225 |
| 133 | | - |
| 134 | | - |
| 135 | inline uint QNativeSocketEnginePrivate::scopeIdFromString(const QString &scopeid) | - |
| 136 | { | - |
| 137 | if (scopeid.isEmpty())| TRUE | evaluated 1773 times by 15 testsEvaluated by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 24 times by 2 testsEvaluated by:- tst_QTcpServer
- tst_QUdpSocket
|
| 24-1773 |
| 138 | return 0;executed 1773 times by 15 tests: return 0;Executed by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 1773 |
| 139 | | - |
| 140 | bool ok; | - |
| 141 | uint id = scopeid.toUInt(&ok); | - |
| 142 | #ifndef QT_NO_IPV6IFNAME | - |
| 143 | if (!ok)| TRUE | evaluated 24 times by 2 testsEvaluated by:- tst_QTcpServer
- tst_QUdpSocket
| | FALSE | never evaluated |
| 0-24 |
| 144 | id = ::if_nametoindex(scopeid.toLatin1());executed 24 times by 2 tests: id = ::if_nametoindex(scopeid.toLatin1());Executed by:- tst_QTcpServer
- tst_QUdpSocket
| 24 |
| 145 | #endif | - |
| 146 | return id;executed 24 times by 2 tests: return id;Executed by:- tst_QTcpServer
- tst_QUdpSocket
| 24 |
| 147 | } | - |
| 148 | | - |
| 149 | static void convertToLevelAndOption(QNativeSocketEngine::SocketOption opt, | - |
| 150 | QAbstractSocket::NetworkLayerProtocol socketProtocol, int &level, int &n) | - |
| 151 | { | - |
| 152 | n = -1; | - |
| 153 | level = SOL_SOCKET; | - |
| 154 | | - |
| 155 | switch (opt) { | - |
| 156 | case QNativeSocketEngine::NonBlockingSocketOption: never executed: case QNativeSocketEngine::NonBlockingSocketOption: | 0 |
| 157 | case QNativeSocketEngine::BindExclusively: never executed: case QNativeSocketEngine::BindExclusively: | 0 |
| 158 | Q_UNREACHABLE(); | - |
| 159 | | - |
| 160 | case QNativeSocketEngine::BroadcastSocketOption: code before this statement never executed: case QNativeSocketEngine::BroadcastSocketOption: executed 140 times by 4 tests: case QNativeSocketEngine::BroadcastSocketOption:Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 0-140 |
| 161 | n = SO_BROADCAST; | - |
| 162 | break;executed 140 times by 4 tests: break;Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 140 |
| 163 | case QNativeSocketEngine::ReceiveBufferSocketOption:executed 3 times by 1 test: case QNativeSocketEngine::ReceiveBufferSocketOption:Executed by:- tst_platformsocketengine - unknown status
| 3 |
| 164 | n = SO_RCVBUF; | - |
| 165 | break;executed 3 times by 1 test: break;Executed by:- tst_platformsocketengine - unknown status
| 3 |
| 166 | case QNativeSocketEngine::SendBufferSocketOption:executed 3 times by 1 test: case QNativeSocketEngine::SendBufferSocketOption:Executed by:- tst_platformsocketengine - unknown status
| 3 |
| 167 | n = SO_SNDBUF; | - |
| 168 | break;executed 3 times by 1 test: break;Executed by:- tst_platformsocketengine - unknown status
| 3 |
| 169 | case QNativeSocketEngine::AddressReusable:executed 742 times by 19 tests: case QNativeSocketEngine::AddressReusable:Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 742 |
| 170 | n = SO_REUSEADDR; | - |
| 171 | break;executed 742 times by 19 tests: break;Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 742 |
| 172 | case QNativeSocketEngine::ReceiveOutOfBandData:executed 70367 times by 30 tests: case QNativeSocketEngine::ReceiveOutOfBandData:Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 70367 |
| 173 | n = SO_OOBINLINE; | - |
| 174 | break;executed 70367 times by 30 tests: break;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 70367 |
| 175 | case QNativeSocketEngine::LowDelayOption:executed 645 times by 3 tests: case QNativeSocketEngine::LowDelayOption:Executed by:- tst_QFtp
- tst_QNetworkReply
- tst_qtcpsocket - unknown status
| 645 |
| 176 | level = IPPROTO_TCP; | - |
| 177 | n = TCP_NODELAY; | - |
| 178 | break;executed 645 times by 3 tests: break;Executed by:- tst_QFtp
- tst_QNetworkReply
- tst_qtcpsocket - unknown status
| 645 |
| 179 | case QNativeSocketEngine::KeepAliveOption:executed 790 times by 10 tests: case QNativeSocketEngine::KeepAliveOption:Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qnetworkreply - unknown status
- tst_qtcpsocket - unknown status
| 790 |
| 180 | n = SO_KEEPALIVE; | - |
| 181 | break;executed 790 times by 10 tests: break;Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qnetworkreply - unknown status
- tst_qtcpsocket - unknown status
| 790 |
| 182 | case QNativeSocketEngine::MulticastTtlOption:executed 24 times by 1 test: case QNativeSocketEngine::MulticastTtlOption: | 24 |
| 183 | if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) {| TRUE | evaluated 12 times by 1 test | | FALSE | evaluated 12 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 12 times by 1 test |
| 0-12 |
| 184 | level = IPPROTO_IPV6; | - |
| 185 | n = IPV6_MULTICAST_HOPS; | - |
| 186 | } elseexecuted 12 times by 1 test: end of block | 12 |
| 187 | { | - |
| 188 | level = IPPROTO_IP; | - |
| 189 | n = IP_MULTICAST_TTL; | - |
| 190 | }executed 12 times by 1 test: end of block | 12 |
| 191 | break;executed 24 times by 1 test: break; | 24 |
| 192 | case QNativeSocketEngine::MulticastLoopbackOption:executed 28 times by 1 test: case QNativeSocketEngine::MulticastLoopbackOption: | 28 |
| 193 | if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) {| TRUE | evaluated 14 times by 1 test | | FALSE | evaluated 14 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 14 times by 1 test |
| 0-14 |
| 194 | level = IPPROTO_IPV6; | - |
| 195 | n = IPV6_MULTICAST_LOOP; | - |
| 196 | } elseexecuted 14 times by 1 test: end of block | 14 |
| 197 | { | - |
| 198 | level = IPPROTO_IP; | - |
| 199 | n = IP_MULTICAST_LOOP; | - |
| 200 | }executed 14 times by 1 test: end of block | 14 |
| 201 | break;executed 28 times by 1 test: break; | 28 |
| 202 | case QNativeSocketEngine::TypeOfServiceOption:executed 4 times by 1 test: case QNativeSocketEngine::TypeOfServiceOption:Executed by:- tst_qtcpsocket - unknown status
| 4 |
| 203 | if (socketProtocol == QAbstractSocket::IPv4Protocol) {| TRUE | evaluated 4 times by 1 testEvaluated by:- tst_qtcpsocket - unknown status
| | FALSE | never evaluated |
| 0-4 |
| 204 | level = IPPROTO_IP; | - |
| 205 | n = IP_TOS; | - |
| 206 | }executed 4 times by 1 test: end of blockExecuted by:- tst_qtcpsocket - unknown status
| 4 |
| 207 | break;executed 4 times by 1 test: break;Executed by:- tst_qtcpsocket - unknown status
| 4 |
| 208 | case QNativeSocketEngine::ReceivePacketInformation:executed 140 times by 4 tests: case QNativeSocketEngine::ReceivePacketInformation:Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 140 |
| 209 | if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) {| TRUE | evaluated 42 times by 2 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
| | FALSE | evaluated 98 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| TRUE | evaluated 54 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | evaluated 44 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| 42-98 |
| 210 | level = IPPROTO_IPV6; | - |
| 211 | n = IPV6_RECVPKTINFO; | - |
| 212 | } else if (socketProtocol == QAbstractSocket::IPv4Protocol) {executed 96 times by 4 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| TRUE | evaluated 44 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | never evaluated |
| 0-96 |
| 213 | level = IPPROTO_IP; | - |
| 214 | #ifdef IP_PKTINFO | - |
| 215 | n = IP_PKTINFO; | - |
| 216 | #elif defined(IP_RECVDSTADDR) | - |
| 217 | | - |
| 218 | | - |
| 219 | n = IP_RECVDSTADDR; | - |
| 220 | #endif | - |
| 221 | }executed 44 times by 4 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 44 |
| 222 | break;executed 140 times by 4 tests: break;Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 140 |
| 223 | case QNativeSocketEngine::ReceiveHopLimit:executed 140 times by 4 tests: case QNativeSocketEngine::ReceiveHopLimit:Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 140 |
| 224 | if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) {| TRUE | evaluated 42 times by 2 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
| | FALSE | evaluated 98 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| TRUE | evaluated 54 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | evaluated 44 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| 42-98 |
| 225 | level = IPPROTO_IPV6; | - |
| 226 | n = IPV6_RECVHOPLIMIT; | - |
| 227 | } else if (socketProtocol == QAbstractSocket::IPv4Protocol) {executed 96 times by 4 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| TRUE | evaluated 44 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | never evaluated |
| 0-96 |
| 228 | #ifdef IP_RECVTTL // IP_RECVTTL is a non-standard extension supported on some OS | - |
| 229 | level = IPPROTO_IP; | - |
| 230 | n = IP_RECVTTL; | - |
| 231 | #endif | - |
| 232 | }executed 44 times by 4 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 44 |
| 233 | break;executed 140 times by 4 tests: break;Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 140 |
| 234 | } | - |
| 235 | }executed 73026 times by 30 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 73026 |
| 236 | | - |
| 237 | | - |
| 238 | | - |
| 239 | | - |
| 240 | | - |
| 241 | | - |
| 242 | bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType socketType, | - |
| 243 | QAbstractSocket::NetworkLayerProtocol &socketProtocol) | - |
| 244 | { | - |
| 245 | int protocol = (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) ? AF_INET6 : AF_INET;| TRUE | evaluated 745 times by 9 testsEvaluated by:- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qobject - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 69763 times by 29 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
|
| TRUE | evaluated 579 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 69184 times by 29 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
|
| 579-69763 |
| 246 | int type = (socketType == QAbstractSocket::UdpSocket) ? SOCK_DGRAM : SOCK_STREAM;| TRUE | evaluated 140 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | evaluated 70368 times by 30 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
|
| 140-70368 |
| 247 | | - |
| 248 | int socket = qt_safe_socket(protocol, type, 0, O_NONBLOCK); | - |
| 249 | if (socket < 0 && socketProtocol == QAbstractSocket::AnyIPProtocol && errno == EAFNOSUPPORT) {| TRUE | evaluated 1 time by 1 testEvaluated by:- tst_platformsocketengine - unknown status
| | FALSE | evaluated 70507 times by 30 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
|
| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 testEvaluated by:- tst_platformsocketengine - unknown status
|
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-70507 |
| 250 | protocol = AF_INET; | - |
| 251 | socket = qt_safe_socket(protocol, type, 0, O_NONBLOCK); | - |
| 252 | socketProtocol = QAbstractSocket::IPv4Protocol; | - |
| 253 | } never executed: end of block | 0 |
| 254 | | - |
| 255 | if (socket < 0) {| TRUE | evaluated 1 time by 1 testEvaluated by:- tst_platformsocketengine - unknown status
| | FALSE | evaluated 70507 times by 30 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
|
| 1-70507 |
| 256 | int ecopy = errno; | - |
| 257 | switch (ecopy) { | - |
| 258 | case EPROTONOSUPPORT: never executed: case 93: | 0 |
| 259 | case EAFNOSUPPORT: never executed: case 97: | 0 |
| 260 | case EINVAL: never executed: case 22: | 0 |
| 261 | setError(QAbstractSocket::UnsupportedSocketOperationError, ProtocolUnsupportedErrorString); | - |
| 262 | break; never executed: break; | 0 |
| 263 | case ENFILE: never executed: case 23: | 0 |
| 264 | case EMFILE:executed 1 time by 1 test: case 24:Executed by:- tst_platformsocketengine - unknown status
| 1 |
| 265 | case ENOBUFS: never executed: case 105: | 0 |
| 266 | case ENOMEM: never executed: case 12: | 0 |
| 267 | setError(QAbstractSocket::SocketResourceError, ResourceErrorString); | - |
| 268 | break;executed 1 time by 1 test: break;Executed by:- tst_platformsocketengine - unknown status
| 1 |
| 269 | case EACCES: never executed: case 13: | 0 |
| 270 | setError(QAbstractSocket::SocketAccessError, AccessErrorString); | - |
| 271 | break; never executed: break; | 0 |
| 272 | default: never executed: default: | 0 |
| 273 | break; never executed: break; | 0 |
| 274 | } | - |
| 275 | | - |
| 276 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 277 | qDebug("QNativeSocketEnginePrivate::createNewSocket(%d, %d) == false (%s)", | - |
| 278 | socketType, socketProtocol, | - |
| 279 | strerror(ecopy)); | - |
| 280 | #endif | - |
| 281 | | - |
| 282 | return false;executed 1 time by 1 test: return false;Executed by:- tst_platformsocketengine - unknown status
| 1 |
| 283 | } | - |
| 284 | | - |
| 285 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 286 | qDebug("QNativeSocketEnginePrivate::createNewSocket(%d, %d) == true", | - |
| 287 | socketType, socketProtocol); | - |
| 288 | #endif | - |
| 289 | | - |
| 290 | socketDescriptor = socket; | - |
| 291 | if (socket != -1) {| TRUE | evaluated 70507 times by 30 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| | FALSE | never evaluated |
| 0-70507 |
| 292 | this->socketProtocol = socketProtocol; | - |
| 293 | this->socketType = socketType; | - |
| 294 | }executed 70507 times by 30 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 70507 |
| 295 | return true;executed 70507 times by 30 tests: return true;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 70507 |
| 296 | } | - |
| 297 | | - |
| 298 | | - |
| 299 | | - |
| 300 | | - |
| 301 | int QNativeSocketEnginePrivate::option(QNativeSocketEngine::SocketOption opt) const | - |
| 302 | { | - |
| 303 | Q_Q(const QNativeSocketEngine); | - |
| 304 | if (!q->isValid())| TRUE | never evaluated | | FALSE | evaluated 41 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
|
| 0-41 |
| 305 | return -1; never executed: return -1; | 0 |
| 306 | | - |
| 307 | | - |
| 308 | if (opt == QNativeSocketEngine::BindExclusively || opt == QNativeSocketEngine::NonBlockingSocketOption| TRUE | never evaluated | | FALSE | evaluated 41 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
|
| TRUE | evaluated 1 time by 1 testEvaluated by:- tst_platformsocketengine - unknown status
| | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
|
| 0-41 |
| 309 | || opt == QNativeSocketEngine::BroadcastSocketOption)| TRUE | never evaluated | | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
|
| 0-40 |
| 310 | return -1;executed 1 time by 1 test: return -1;Executed by:- tst_platformsocketengine - unknown status
| 1 |
| 311 | | - |
| 312 | int n, level; | - |
| 313 | int v = -1; | - |
| 314 | QT_SOCKOPTLEN_T len = sizeof(v); | - |
| 315 | | - |
| 316 | convertToLevelAndOption(opt, socketProtocol, level, n); | - |
| 317 | if (n != -1 && ::getsockopt(socketDescriptor, level, n, (char *) &v, &len) != -1)| TRUE | evaluated 40 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | never evaluated |
| TRUE | evaluated 40 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | never evaluated |
| 0-40 |
| 318 | return v;executed 40 times by 3 tests: return v;Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| 40 |
| 319 | | - |
| 320 | return -1; never executed: return -1; | 0 |
| 321 | } | - |
| 322 | | - |
| 323 | | - |
| 324 | | - |
| 325 | | - |
| 326 | | - |
| 327 | bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt, int v) | - |
| 328 | { | - |
| 329 | Q_Q(QNativeSocketEngine); | - |
| 330 | if (!q->isValid())| TRUE | never evaluated | | FALSE | evaluated 73969 times by 32 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- ...
|
| 0-73969 |
| 331 | return false; never executed: return false; | 0 |
| 332 | | - |
| 333 | | - |
| 334 | switch (opt) { | - |
| 335 | case QNativeSocketEngine::NonBlockingSocketOption: {executed 983 times by 19 tests: case QNativeSocketEngine::NonBlockingSocketOption:Executed by:- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qlocalsocket - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 983 |
| 336 | | - |
| 337 | #if !defined(Q_OS_VXWORKS) | - |
| 338 | int flags = ::fcntl(socketDescriptor, F_GETFL, 0); | - |
| 339 | if (flags == -1) {| TRUE | never evaluated | | FALSE | evaluated 983 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qlocalsocket - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 0-983 |
| 340 | #ifdef QNATIVESOCKETENGINE_DEBUG | - |
| 341 | perror("QNativeSocketEnginePrivate::setOption(): fcntl(F_GETFL) failed"); | - |
| 342 | #endif | - |
| 343 | return false; never executed: return false; | 0 |
| 344 | } | - |
| 345 | if (::fcntl(socketDescriptor, F_SETFL, flags | O_NONBLOCK) == -1) {| TRUE | never evaluated | | FALSE | evaluated 983 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qlocalsocket - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 0-983 |
| 346 | #ifdef QNATIVESOCKETENGINE_DEBUG | - |
| 347 | perror("QNativeSocketEnginePrivate::setOption(): fcntl(F_SETFL) failed"); | - |
| 348 | #endif | - |
| 349 | return false; never executed: return false; | 0 |
| 350 | } | - |
| 351 | #else // Q_OS_VXWORKS | - |
| 352 | int onoff = 1; | - |
| 353 | | - |
| 354 | if (qt_safe_ioctl(socketDescriptor, FIONBIO, &onoff) < 0) { | - |
| 355 | | - |
| 356 | #ifdef QNATIVESOCKETENGINE_DEBUG | - |
| 357 | perror("QNativeSocketEnginePrivate::setOption(): ioctl(FIONBIO, 1) failed"); | - |
| 358 | #endif | - |
| 359 | return false; | - |
| 360 | } | - |
| 361 | #endif // Q_OS_VXWORKS | - |
| 362 | return true;executed 983 times by 19 tests: return true;Executed by:- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qlocalsocket - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 983 |
| 363 | } | - |
| 364 | case QNativeSocketEngine::BindExclusively: never executed: case QNativeSocketEngine::BindExclusively: | 0 |
| 365 | return true; never executed: return true; | 0 |
| 366 | | - |
| 367 | default:executed 72986 times by 30 tests: default:Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 72986 |
| 368 | break;executed 72986 times by 30 tests: break;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 72986 |
| 369 | } | - |
| 370 | | - |
| 371 | int n, level; | - |
| 372 | convertToLevelAndOption(opt, socketProtocol, level, n); | - |
| 373 | #if defined(SO_REUSEPORT) && !defined(Q_OS_LINUX) | - |
| 374 | if (opt == QNativeSocketEngine::AddressReusable) { | - |
| 375 | | - |
| 376 | | - |
| 377 | | - |
| 378 | if (socketType == QAbstractSocket::UdpSocket) | - |
| 379 | n = SO_REUSEPORT; | - |
| 380 | } | - |
| 381 | #endif | - |
| 382 | | - |
| 383 | return ::setsockopt(socketDescriptor, level, n, (char *) &v, sizeof(v)) == 0;executed 72986 times by 30 tests: return ::setsockopt(socketDescriptor, level, n, (char *) &v, sizeof(v)) == 0;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 72986 |
| 384 | } | - |
| 385 | | - |
| 386 | bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &addr, quint16 port) | - |
| 387 | { | - |
| 388 | #ifdef QNATIVESOCKETENGINE_DEBUG | - |
| 389 | qDebug() << "QNativeSocketEnginePrivate::nativeConnect() " << socketDescriptor; | - |
| 390 | #endif | - |
| 391 | | - |
| 392 | qt_sockaddr aa; | - |
| 393 | QT_SOCKLEN_T sockAddrSize; | - |
| 394 | setPortAndAddress(port, addr, &aa, &sockAddrSize); | - |
| 395 | | - |
| 396 | int connectResult = qt_safe_connect(socketDescriptor, &aa.a, sockAddrSize); | - |
| 397 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 398 | int ecopy = errno; | - |
| 399 | #endif | - |
| 400 | if (connectResult == -1) {| TRUE | evaluated 4374 times by 29 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| | FALSE | evaluated 3307 times by 29 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
|
| 3307-4374 |
| 401 | switch (errno) { | - |
| 402 | case EISCONN: never executed: case 106: | 0 |
| 403 | socketState = QAbstractSocket::ConnectedState; | - |
| 404 | break; never executed: break; | 0 |
| 405 | case ECONNREFUSED:executed 322 times by 9 tests: case 111:Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qtcpsocket - unknown status
| 322 |
| 406 | case EINVAL: never executed: case 22: | 0 |
| 407 | setError(QAbstractSocket::ConnectionRefusedError, ConnectionRefusedErrorString); | - |
| 408 | socketState = QAbstractSocket::UnconnectedState; | - |
| 409 | break;executed 322 times by 9 tests: break;Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qtcpsocket - unknown status
| 322 |
| 410 | case ETIMEDOUT: never executed: case 110: | 0 |
| 411 | setError(QAbstractSocket::NetworkError, ConnectionTimeOutErrorString); | - |
| 412 | break; never executed: break; | 0 |
| 413 | case EHOSTUNREACH: never executed: case 113: | 0 |
| 414 | setError(QAbstractSocket::NetworkError, HostUnreachableErrorString); | - |
| 415 | socketState = QAbstractSocket::UnconnectedState; | - |
| 416 | break; never executed: break; | 0 |
| 417 | case ENETUNREACH:executed 4 times by 2 tests: case 101:Executed by:- tst_QNetworkReply
- tst_qtcpsocket - unknown status
| 4 |
| 418 | setError(QAbstractSocket::NetworkError, NetworkUnreachableErrorString); | - |
| 419 | socketState = QAbstractSocket::UnconnectedState; | - |
| 420 | break;executed 4 times by 2 tests: break;Executed by:- tst_QNetworkReply
- tst_qtcpsocket - unknown status
| 4 |
| 421 | case EADDRINUSE: never executed: case 98: | 0 |
| 422 | setError(QAbstractSocket::NetworkError, AddressInuseErrorString); | - |
| 423 | break; never executed: break; | 0 |
| 424 | case EINPROGRESS:executed 4048 times by 29 tests: case 115:Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| 4048 |
| 425 | case EALREADY: never executed: case 114: | 0 |
| 426 | setError(QAbstractSocket::UnfinishedSocketOperationError, InvalidSocketErrorString); | - |
| 427 | socketState = QAbstractSocket::ConnectingState; | - |
| 428 | break;executed 4048 times by 29 tests: break;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| 4048 |
| 429 | case EAGAIN: never executed: case 11: | 0 |
| 430 | setError(QAbstractSocket::UnfinishedSocketOperationError, InvalidSocketErrorString); | - |
| 431 | break; never executed: break; | 0 |
| 432 | case EACCES: never executed: case 13: | 0 |
| 433 | case EPERM: never executed: case 1: | 0 |
| 434 | setError(QAbstractSocket::SocketAccessError, AccessErrorString); | - |
| 435 | socketState = QAbstractSocket::UnconnectedState; | - |
| 436 | break; never executed: break; | 0 |
| 437 | case EAFNOSUPPORT: never executed: case 97: | 0 |
| 438 | case EBADF: never executed: case 9: | 0 |
| 439 | case EFAULT: never executed: case 14: | 0 |
| 440 | case ENOTSOCK: never executed: case 88: | 0 |
| 441 | socketState = QAbstractSocket::UnconnectedState; | - |
| 442 | default: code before this statement never executed: default: never executed: default: | 0 |
| 443 | break; never executed: break; | 0 |
| 444 | } | - |
| 445 | | - |
| 446 | if (socketState != QAbstractSocket::ConnectedState) {| TRUE | evaluated 4374 times by 29 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| | FALSE | never evaluated |
| 0-4374 |
| 447 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 448 | qDebug("QNativeSocketEnginePrivate::nativeConnect(%s, %i) == false (%s)", | - |
| 449 | addr.toString().toLatin1().constData(), port, | - |
| 450 | socketState == QAbstractSocket::ConnectingState | - |
| 451 | ? "Connection in progress" : strerror(ecopy)); | - |
| 452 | #endif | - |
| 453 | return false;executed 4374 times by 29 tests: return false;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| 4374 |
| 454 | } | - |
| 455 | } never executed: end of block | 0 |
| 456 | | - |
| 457 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 458 | qDebug("QNativeSocketEnginePrivate::nativeConnect(%s, %i) == true", | - |
| 459 | addr.toString().toLatin1().constData(), port); | - |
| 460 | #endif | - |
| 461 | | - |
| 462 | socketState = QAbstractSocket::ConnectedState; | - |
| 463 | return true;executed 3307 times by 29 tests: return true;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| 3307 |
| 464 | } | - |
| 465 | | - |
| 466 | bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &address, quint16 port) | - |
| 467 | { | - |
| 468 | qt_sockaddr aa; | - |
| 469 | QT_SOCKLEN_T sockAddrSize; | - |
| 470 | setPortAndAddress(port, address, &aa, &sockAddrSize); | - |
| 471 | | - |
| 472 | #ifdef IPV6_V6ONLY | - |
| 473 | if (aa.a.sa_family == AF_INET6) {| TRUE | evaluated 661 times by 14 testsEvaluated by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 287 times by 14 testsEvaluated by:- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
|
| 287-661 |
| 474 | int ipv6only = 0; | - |
| 475 | if (address.protocol() == QAbstractSocket::IPv6Protocol)| TRUE | evaluated 80 times by 6 testsEvaluated by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 581 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 80-581 |
| 476 | ipv6only = 1;executed 80 times by 6 tests: ipv6only = 1;Executed by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| 80 |
| 477 | | - |
| 478 | ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) ); | - |
| 479 | }executed 661 times by 14 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 661 |
| 480 | #endif | - |
| 481 | | - |
| 482 | int bindResult = QT_SOCKET_BIND(socketDescriptor, &aa.a, sockAddrSize); | - |
| 483 | if (bindResult < 0 && errno == EAFNOSUPPORT && address.protocol() == QAbstractSocket::AnyIPProtocol) {| TRUE | evaluated 24 times by 4 testsEvaluated by:- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 924 times by 20 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| TRUE | never evaluated | | FALSE | evaluated 24 times by 4 testsEvaluated by:- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
|
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-924 |
| 484 | | - |
| 485 | aa.a4.sin_family = AF_INET; | - |
| 486 | aa.a4.sin_port = htons(port); | - |
| 487 | aa.a4.sin_addr.s_addr = htonl(address.toIPv4Address()); | - |
| 488 | sockAddrSize = sizeof(aa.a4); | - |
| 489 | bindResult = QT_SOCKET_BIND(socketDescriptor, &aa.a, sockAddrSize); | - |
| 490 | } never executed: end of block | 0 |
| 491 | | - |
| 492 | if (bindResult < 0) {| TRUE | evaluated 24 times by 4 testsEvaluated by:- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 924 times by 20 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 24-924 |
| 493 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 494 | int ecopy = errno; | - |
| 495 | #endif | - |
| 496 | switch(errno) { | - |
| 497 | case EADDRINUSE:executed 13 times by 3 tests: case 98:Executed by:- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
| 13 |
| 498 | setError(QAbstractSocket::AddressInUseError, AddressInuseErrorString); | - |
| 499 | break;executed 13 times by 3 tests: break;Executed by:- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
| 13 |
| 500 | case EACCES:executed 5 times by 2 tests: case 13:Executed by:- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| 5 |
| 501 | setError(QAbstractSocket::SocketAccessError, AddressProtectedErrorString); | - |
| 502 | break;executed 5 times by 2 tests: break;Executed by:- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| 5 |
| 503 | case EINVAL:executed 1 time by 1 test: case 22: | 1 |
| 504 | setError(QAbstractSocket::UnsupportedSocketOperationError, OperationUnsupportedErrorString); | - |
| 505 | break;executed 1 time by 1 test: break; | 1 |
| 506 | case EADDRNOTAVAIL:executed 5 times by 2 tests: case 99:Executed by:- tst_QTcpServer
- tst_qtcpsocket - unknown status
| 5 |
| 507 | setError(QAbstractSocket::SocketAddressNotAvailableError, AddressNotAvailableErrorString); | - |
| 508 | break;executed 5 times by 2 tests: break;Executed by:- tst_QTcpServer
- tst_qtcpsocket - unknown status
| 5 |
| 509 | default: never executed: default: | 0 |
| 510 | break; never executed: break; | 0 |
| 511 | } | - |
| 512 | | - |
| 513 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 514 | qDebug("QNativeSocketEnginePrivate::nativeBind(%s, %i) == false (%s)", | - |
| 515 | address.toString().toLatin1().constData(), port, strerror(ecopy)); | - |
| 516 | #endif | - |
| 517 | | - |
| 518 | return false;executed 24 times by 4 tests: return false;Executed by:- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
| 24 |
| 519 | } | - |
| 520 | | - |
| 521 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 522 | qDebug("QNativeSocketEnginePrivate::nativeBind(%s, %i) == true", | - |
| 523 | address.toString().toLatin1().constData(), port); | - |
| 524 | #endif | - |
| 525 | socketState = QAbstractSocket::BoundState; | - |
| 526 | return true;executed 924 times by 20 tests: return true;Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 924 |
| 527 | } | - |
| 528 | | - |
| 529 | bool QNativeSocketEnginePrivate::nativeListen(int backlog) | - |
| 530 | { | - |
| 531 | if (qt_safe_listen(socketDescriptor, backlog) < 0) {| TRUE | never evaluated | | FALSE | evaluated 732 times by 19 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 0-732 |
| 532 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 533 | int ecopy = errno; | - |
| 534 | #endif | - |
| 535 | switch (errno) { | - |
| 536 | case EADDRINUSE: never executed: case 98: | 0 |
| 537 | setError(QAbstractSocket::AddressInUseError, | - |
| 538 | PortInuseErrorString); | - |
| 539 | break; never executed: break; | 0 |
| 540 | default: never executed: default: | 0 |
| 541 | break; never executed: break; | 0 |
| 542 | } | - |
| 543 | | - |
| 544 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 545 | qDebug("QNativeSocketEnginePrivate::nativeListen(%i) == false (%s)", | - |
| 546 | backlog, strerror(ecopy)); | - |
| 547 | #endif | - |
| 548 | return false; never executed: return false; | 0 |
| 549 | } | - |
| 550 | | - |
| 551 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 552 | qDebug("QNativeSocketEnginePrivate::nativeListen(%i) == true", backlog); | - |
| 553 | #endif | - |
| 554 | | - |
| 555 | socketState = QAbstractSocket::ListeningState; | - |
| 556 | return true;executed 732 times by 19 tests: return true;Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 732 |
| 557 | } | - |
| 558 | | - |
| 559 | int QNativeSocketEnginePrivate::nativeAccept() | - |
| 560 | { | - |
| 561 | int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0); | - |
| 562 | if (acceptedDescriptor == -1) {| TRUE | evaluated 790 times by 15 testsEvaluated by:- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QXmlInputSource
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 821 times by 17 testsEvaluated by:- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 790-821 |
| 563 | switch (errno) { | - |
| 564 | case EBADF: never executed: case 9: | 0 |
| 565 | case EOPNOTSUPP: never executed: case 95: | 0 |
| 566 | setError(QAbstractSocket::UnsupportedSocketOperationError, InvalidSocketErrorString); | - |
| 567 | break; never executed: break; | 0 |
| 568 | case ECONNABORTED: never executed: case 103: | 0 |
| 569 | setError(QAbstractSocket::NetworkError, RemoteHostClosedErrorString); | - |
| 570 | break; never executed: break; | 0 |
| 571 | case EFAULT: never executed: case 14: | 0 |
| 572 | case ENOTSOCK: never executed: case 88: | 0 |
| 573 | setError(QAbstractSocket::SocketResourceError, NotSocketErrorString); | - |
| 574 | break; never executed: break; | 0 |
| 575 | case EPROTONOSUPPORT: never executed: case 93: | 0 |
| 576 | #if !defined(Q_OS_OPENBSD) | - |
| 577 | case EPROTO: never executed: case 71: | 0 |
| 578 | #endif | - |
| 579 | case EAFNOSUPPORT: never executed: case 97: | 0 |
| 580 | case EINVAL: never executed: case 22: | 0 |
| 581 | setError(QAbstractSocket::UnsupportedSocketOperationError, ProtocolUnsupportedErrorString); | - |
| 582 | break; never executed: break; | 0 |
| 583 | case ENFILE: never executed: case 23: | 0 |
| 584 | case EMFILE: never executed: case 24: | 0 |
| 585 | case ENOBUFS: never executed: case 105: | 0 |
| 586 | case ENOMEM: never executed: case 12: | 0 |
| 587 | setError(QAbstractSocket::SocketResourceError, ResourceErrorString); | - |
| 588 | break; never executed: break; | 0 |
| 589 | case EACCES: never executed: case 13: | 0 |
| 590 | case EPERM: never executed: case 1: | 0 |
| 591 | setError(QAbstractSocket::SocketAccessError, AccessErrorString); | - |
| 592 | break; never executed: break; | 0 |
| 593 | #if EAGAIN != EWOULDBLOCK | - |
| 594 | case EWOULDBLOCK: | - |
| 595 | #endif | - |
| 596 | case EAGAIN:executed 790 times by 15 tests: case 11:Executed by:- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QXmlInputSource
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 790 |
| 597 | setError(QAbstractSocket::TemporaryError, TemporaryErrorString); | - |
| 598 | break;executed 790 times by 15 tests: break;Executed by:- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QXmlInputSource
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 790 |
| 599 | default: never executed: default: | 0 |
| 600 | setError(QAbstractSocket::UnknownSocketError, UnknownSocketErrorString); | - |
| 601 | break; never executed: break; | 0 |
| 602 | } | - |
| 603 | } | - |
| 604 | | - |
| 605 | return acceptedDescriptor;executed 1611 times by 17 tests: return acceptedDescriptor;Executed by:- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 1611 |
| 606 | } | - |
| 607 | | - |
| 608 | #ifndef QT_NO_NETWORKINTERFACE | - |
| 609 | | - |
| 610 | static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d, | - |
| 611 | int how6, | - |
| 612 | int how4, | - |
| 613 | const QHostAddress &groupAddress, | - |
| 614 | const QNetworkInterface &interface) | - |
| 615 | { | - |
| 616 | int level = 0; | - |
| 617 | int sockOpt = 0; | - |
| 618 | void *sockArg; | - |
| 619 | int sockArgSize; | - |
| 620 | | - |
| 621 | ip_mreq mreq4; | - |
| 622 | ipv6_mreq mreq6; | - |
| 623 | | - |
| 624 | if (groupAddress.protocol() == QAbstractSocket::IPv6Protocol) {| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 6 times by 1 test |
| 6 |
| 625 | level = IPPROTO_IPV6; | - |
| 626 | sockOpt = how6; | - |
| 627 | sockArg = &mreq6; | - |
| 628 | sockArgSize = sizeof(mreq6); | - |
| 629 | memset(&mreq6, 0, sizeof(mreq6)); | - |
| 630 | Q_IPV6ADDR ip6 = groupAddress.toIPv6Address(); | - |
| 631 | memcpy(&mreq6.ipv6mr_multiaddr, &ip6, sizeof(ip6)); | - |
| 632 | mreq6.ipv6mr_interface = interface.index(); | - |
| 633 | } elseexecuted 6 times by 1 test: end of block | 6 |
| 634 | if (groupAddress.protocol() == QAbstractSocket::IPv4Protocol) {| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
| 0-6 |
| 635 | level = IPPROTO_IP; | - |
| 636 | sockOpt = how4; | - |
| 637 | sockArg = &mreq4; | - |
| 638 | sockArgSize = sizeof(mreq4); | - |
| 639 | memset(&mreq4, 0, sizeof(mreq4)); | - |
| 640 | mreq4.imr_multiaddr.s_addr = htonl(groupAddress.toIPv4Address()); | - |
| 641 | | - |
| 642 | if (interface.isValid()) {| TRUE | never evaluated | | FALSE | evaluated 6 times by 1 test |
| 0-6 |
| 643 | QList<QNetworkAddressEntry> addressEntries = interface.addressEntries(); | - |
| 644 | if (!addressEntries.isEmpty()) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 645 | QHostAddress firstIP = addressEntries.first().ip(); | - |
| 646 | mreq4.imr_interface.s_addr = htonl(firstIP.toIPv4Address()); | - |
| 647 | } else { never executed: end of block | 0 |
| 648 | d->setError(QAbstractSocket::NetworkError, | - |
| 649 | QNativeSocketEnginePrivate::NetworkUnreachableErrorString); | - |
| 650 | return false; never executed: return false; | 0 |
| 651 | } | - |
| 652 | } else { | - |
| 653 | mreq4.imr_interface.s_addr = INADDR_ANY; | - |
| 654 | }executed 6 times by 1 test: end of block | 6 |
| 655 | } else { | - |
| 656 | | - |
| 657 | d->setError(QAbstractSocket::UnsupportedSocketOperationError, | - |
| 658 | QNativeSocketEnginePrivate::ProtocolUnsupportedErrorString); | - |
| 659 | return false; never executed: return false; | 0 |
| 660 | } | - |
| 661 | | - |
| 662 | int res = setsockopt(d->socketDescriptor, level, sockOpt, sockArg, sockArgSize); | - |
| 663 | if (res == -1) {| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 10 times by 1 test |
| 2-10 |
| 664 | switch (errno) { | - |
| 665 | case ENOPROTOOPT: never executed: case 92: | 0 |
| 666 | d->setError(QAbstractSocket::UnsupportedSocketOperationError, | - |
| 667 | QNativeSocketEnginePrivate::OperationUnsupportedErrorString); | - |
| 668 | break; never executed: break; | 0 |
| 669 | case EADDRNOTAVAIL: never executed: case 99: | 0 |
| 670 | d->setError(QAbstractSocket::SocketAddressNotAvailableError, | - |
| 671 | QNativeSocketEnginePrivate::AddressNotAvailableErrorString); | - |
| 672 | break; never executed: break; | 0 |
| 673 | default:executed 2 times by 1 test: default: | 2 |
| 674 | d->setError(QAbstractSocket::UnknownSocketError, | - |
| 675 | QNativeSocketEnginePrivate::UnknownSocketErrorString); | - |
| 676 | break;executed 2 times by 1 test: break; | 2 |
| 677 | } | - |
| 678 | return false;executed 2 times by 1 test: return false; | 2 |
| 679 | } | - |
| 680 | return true;executed 10 times by 1 test: return true; | 10 |
| 681 | } | - |
| 682 | | - |
| 683 | bool QNativeSocketEnginePrivate::nativeJoinMulticastGroup(const QHostAddress &groupAddress, | - |
| 684 | const QNetworkInterface &interface) | - |
| 685 | { | - |
| 686 | return multicastMembershipHelper(this,executed 8 times by 1 test: return multicastMembershipHelper(this, 20, 35, groupAddress, interface); | 8 |
| 687 | IPV6_JOIN_GROUP,executed 8 times by 1 test: return multicastMembershipHelper(this, 20, 35, groupAddress, interface); | 8 |
| 688 | IP_ADD_MEMBERSHIP,executed 8 times by 1 test: return multicastMembershipHelper(this, 20, 35, groupAddress, interface); | 8 |
| 689 | groupAddress,executed 8 times by 1 test: return multicastMembershipHelper(this, 20, 35, groupAddress, interface); | 8 |
| 690 | interface);executed 8 times by 1 test: return multicastMembershipHelper(this, 20, 35, groupAddress, interface); | 8 |
| 691 | } | - |
| 692 | | - |
| 693 | bool QNativeSocketEnginePrivate::nativeLeaveMulticastGroup(const QHostAddress &groupAddress, | - |
| 694 | const QNetworkInterface &interface) | - |
| 695 | { | - |
| 696 | return multicastMembershipHelper(this,executed 4 times by 1 test: return multicastMembershipHelper(this, 21, 36, groupAddress, interface); | 4 |
| 697 | IPV6_LEAVE_GROUP,executed 4 times by 1 test: return multicastMembershipHelper(this, 21, 36, groupAddress, interface); | 4 |
| 698 | IP_DROP_MEMBERSHIP,executed 4 times by 1 test: return multicastMembershipHelper(this, 21, 36, groupAddress, interface); | 4 |
| 699 | groupAddress,executed 4 times by 1 test: return multicastMembershipHelper(this, 21, 36, groupAddress, interface); | 4 |
| 700 | interface);executed 4 times by 1 test: return multicastMembershipHelper(this, 21, 36, groupAddress, interface); | 4 |
| 701 | } | - |
| 702 | | - |
| 703 | QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const | - |
| 704 | { | - |
| 705 | if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) {| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 3 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
| 0-3 |
| 706 | uint v; | - |
| 707 | QT_SOCKOPTLEN_T sizeofv = sizeof(v); | - |
| 708 | if (::getsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_MULTICAST_IF, &v, &sizeofv) == -1)| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
| 0-3 |
| 709 | return QNetworkInterface(); never executed: return QNetworkInterface(); | 0 |
| 710 | return QNetworkInterface::interfaceFromIndex(v);executed 3 times by 1 test: return QNetworkInterface::interfaceFromIndex(v); | 3 |
| 711 | } | - |
| 712 | | - |
| 713 | struct in_addr v = { 0 }; | - |
| 714 | QT_SOCKOPTLEN_T sizeofv = sizeof(v); | - |
| 715 | if (::getsockopt(socketDescriptor, IPPROTO_IP, IP_MULTICAST_IF, &v, &sizeofv) == -1)| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
| 0-3 |
| 716 | return QNetworkInterface(); never executed: return QNetworkInterface(); | 0 |
| 717 | if (v.s_addr != 0 && sizeofv >= QT_SOCKOPTLEN_T(sizeof(v))) {| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
| 0-3 |
| 718 | QHostAddress ipv4(ntohl(v.s_addr)); | - |
| 719 | QList<QNetworkInterface> ifaces = QNetworkInterface::allInterfaces(); | - |
| 720 | for (int i = 0; i < ifaces.count(); ++i) {| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
| 0-6 |
| 721 | const QNetworkInterface &iface = ifaces.at(i); | - |
| 722 | QList<QNetworkAddressEntry> entries = iface.addressEntries(); | - |
| 723 | for (int j = 0; j < entries.count(); ++j) {| TRUE | evaluated 9 times by 1 test | | FALSE | evaluated 3 times by 1 test |
| 3-9 |
| 724 | const QNetworkAddressEntry &entry = entries.at(j); | - |
| 725 | if (entry.ip() == ipv4)| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 6 times by 1 test |
| 3-6 |
| 726 | return iface;executed 3 times by 1 test: return iface; | 3 |
| 727 | }executed 6 times by 1 test: end of block | 6 |
| 728 | }executed 3 times by 1 test: end of block | 3 |
| 729 | } never executed: end of block | 0 |
| 730 | return QNetworkInterface(); never executed: return QNetworkInterface(); | 0 |
| 731 | } | - |
| 732 | | - |
| 733 | bool QNativeSocketEnginePrivate::nativeSetMulticastInterface(const QNetworkInterface &iface) | - |
| 734 | { | - |
| 735 | if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) {| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 3 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
| 0-3 |
| 736 | uint v = iface.index(); | - |
| 737 | return (::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_MULTICAST_IF, &v, sizeof(v)) != -1);executed 3 times by 1 test: return (::setsockopt(socketDescriptor, IPPROTO_IPV6, 17, &v, sizeof(v)) != -1); | 3 |
| 738 | } | - |
| 739 | | - |
| 740 | struct in_addr v; | - |
| 741 | if (iface.isValid()) {| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
| 0-3 |
| 742 | QList<QNetworkAddressEntry> entries = iface.addressEntries(); | - |
| 743 | for (int i = 0; i < entries.count(); ++i) {| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
| 0-3 |
| 744 | const QNetworkAddressEntry &entry = entries.at(i); | - |
| 745 | const QHostAddress &ip = entry.ip(); | - |
| 746 | if (ip.protocol() == QAbstractSocket::IPv4Protocol) {| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
| 0-3 |
| 747 | v.s_addr = htonl(ip.toIPv4Address()); | - |
| 748 | int r = ::setsockopt(socketDescriptor, IPPROTO_IP, IP_MULTICAST_IF, &v, sizeof(v)); | - |
| 749 | if (r != -1)| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
| 0-3 |
| 750 | return true;executed 3 times by 1 test: return true; | 3 |
| 751 | } never executed: end of block | 0 |
| 752 | } never executed: end of block | 0 |
| 753 | return false; never executed: return false; | 0 |
| 754 | } | - |
| 755 | | - |
| 756 | v.s_addr = INADDR_ANY; | - |
| 757 | return (::setsockopt(socketDescriptor, IPPROTO_IP, IP_MULTICAST_IF, &v, sizeof(v)) != -1); never executed: return (::setsockopt(socketDescriptor, IPPROTO_IP, 32, &v, sizeof(v)) != -1); | 0 |
| 758 | } | - |
| 759 | | - |
| 760 | #endif // QT_NO_NETWORKINTERFACE | - |
| 761 | | - |
| 762 | qint64 QNativeSocketEnginePrivate::nativeBytesAvailable() const | - |
| 763 | { | - |
| 764 | int nbytes = 0; | - |
| 765 | | - |
| 766 | qint64 available = 0; | - |
| 767 | if (qt_safe_ioctl(socketDescriptor, FIONREAD, (char *) &nbytes) >= 0)| TRUE | evaluated 74305 times by 30 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| | FALSE | never evaluated |
| 0-74305 |
| 768 | available = (qint64) nbytes;executed 74305 times by 30 tests: available = (qint64) nbytes;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 74305 |
| 769 | | - |
| 770 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 771 | qDebug("QNativeSocketEnginePrivate::nativeBytesAvailable() == %lli", available); | - |
| 772 | #endif | - |
| 773 | return available;executed 74305 times by 30 tests: return available;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 74305 |
| 774 | } | - |
| 775 | | - |
| 776 | bool QNativeSocketEnginePrivate::nativeHasPendingDatagrams() const | - |
| 777 | { | - |
| 778 | | - |
| 779 | qt_sockaddr storage; | - |
| 780 | QT_SOCKLEN_T storageSize = sizeof(storage); | - |
| 781 | memset(&storage, 0, storageSize); | - |
| 782 | | - |
| 783 | | - |
| 784 | | - |
| 785 | ssize_t readBytes; | - |
| 786 | do { | - |
| 787 | char c; | - |
| 788 | readBytes = ::recvfrom(socketDescriptor, &c, 1, MSG_PEEK, &storage.a, &storageSize); | - |
| 789 | } while (readBytes == -1 && errno == EINTR);executed 1076896 times by 4 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| TRUE | evaluated 869022 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
| | FALSE | evaluated 207874 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| TRUE | never evaluated | | FALSE | evaluated 869022 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| 0-1076896 |
| 790 | | - |
| 791 | | - |
| 792 | | - |
| 793 | bool result = (readBytes != -1) || errno == EMSGSIZE;| TRUE | evaluated 207874 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | evaluated 869022 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| TRUE | never evaluated | | FALSE | evaluated 869022 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| 0-869022 |
| 794 | | - |
| 795 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 796 | qDebug("QNativeSocketEnginePrivate::nativeHasPendingDatagrams() == %s", | - |
| 797 | result ? "true" : "false"); | - |
| 798 | #endif | - |
| 799 | return result;executed 1076896 times by 4 tests: return result;Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 1076896 |
| 800 | } | - |
| 801 | | - |
| 802 | qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize() const | - |
| 803 | { | - |
| 804 | QVarLengthArray<char, 8192> udpMessagePeekBuffer(8192); | - |
| 805 | ssize_t recvResult = -1; | - |
| 806 | | - |
| 807 | for (;;) { | - |
| 808 | | - |
| 809 | | - |
| 810 | | - |
| 811 | recvResult = ::recv(socketDescriptor, udpMessagePeekBuffer.data(), | - |
| 812 | udpMessagePeekBuffer.size(), MSG_PEEK); | - |
| 813 | if (recvResult == -1 && errno == EINTR)| TRUE | never evaluated | | FALSE | evaluated 731 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-731 |
| 814 | continue; never executed: continue; | 0 |
| 815 | | - |
| 816 | if (recvResult != (ssize_t) udpMessagePeekBuffer.size())| TRUE | evaluated 595 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
| | FALSE | evaluated 136 times by 1 test |
| 136-595 |
| 817 | break;executed 595 times by 3 tests: break;Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
| 595 |
| 818 | | - |
| 819 | udpMessagePeekBuffer.resize(udpMessagePeekBuffer.size() * 2); | - |
| 820 | }executed 136 times by 1 test: end of block | 136 |
| 821 | | - |
| 822 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 823 | qDebug("QNativeSocketEnginePrivate::nativePendingDatagramSize() == %zd", recvResult); | - |
| 824 | #endif | - |
| 825 | | - |
| 826 | return qint64(recvResult);executed 595 times by 3 tests: return qint64(recvResult);Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
| 595 |
| 827 | } | - |
| 828 | | - |
| 829 | qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxSize, QIpPacketHeader *header, | - |
| 830 | QAbstractSocketEngine::PacketHeaderOptions options) | - |
| 831 | { | - |
| 832 | | - |
| 833 | quintptr cbuf[(CMSG_SPACE(sizeof(struct in6_pktinfo)) + CMSG_SPACE(sizeof(int)) | - |
| 834 | #if !defined(IP_PKTINFO) && defined(IP_RECVIF) && defined(Q_OS_BSD4) | - |
| 835 | + CMSG_SPACE(sizeof(sockaddr_dl)) | - |
| 836 | #endif | - |
| 837 | + sizeof(quintptr) - 1) / sizeof(quintptr)]; | - |
| 838 | | - |
| 839 | struct msghdr msg; | - |
| 840 | struct iovec vec; | - |
| 841 | qt_sockaddr aa; | - |
| 842 | char c; | - |
| 843 | memset(&msg, 0, sizeof(msg)); | - |
| 844 | memset(&aa, 0, sizeof(aa)); | - |
| 845 | | - |
| 846 | | - |
| 847 | vec.iov_base = maxSize ? data : &c;| TRUE | evaluated 869398 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
| | FALSE | evaluated 186 times by 2 testsEvaluated by:- tst_QUdpSocket
- tst_qsocks5socketengine - unknown status
|
| 186-869398 |
| 848 | vec.iov_len = maxSize ? maxSize : 1;| TRUE | evaluated 869398 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
| | FALSE | evaluated 186 times by 2 testsEvaluated by:- tst_QUdpSocket
- tst_qsocks5socketengine - unknown status
|
| 186-869398 |
| 849 | msg.msg_iov = &vec; | - |
| 850 | msg.msg_iovlen = 1; | - |
| 851 | if (options & QAbstractSocketEngine::WantDatagramSender) {| TRUE | evaluated 509 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | evaluated 869075 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| 509-869075 |
| 852 | msg.msg_name = &aa; | - |
| 853 | msg.msg_namelen = sizeof(aa); | - |
| 854 | }executed 509 times by 3 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocks5socketengine - unknown status
| 509 |
| 855 | if (options & (QAbstractSocketEngine::WantDatagramHopLimit | QAbstractSocketEngine::WantDatagramDestination)) {| TRUE | never evaluated | | FALSE | evaluated 869584 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| 0-869584 |
| 856 | msg.msg_control = cbuf; | - |
| 857 | msg.msg_controllen = sizeof(cbuf); | - |
| 858 | } never executed: end of block | 0 |
| 859 | | - |
| 860 | ssize_t recvResult = 0; | - |
| 861 | do { | - |
| 862 | recvResult = ::recvmsg(socketDescriptor, &msg, 0); | - |
| 863 | } while (recvResult == -1 && errno == EINTR);executed 869584 times by 4 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| TRUE | never evaluated | | FALSE | evaluated 869584 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-869584 |
| 864 | | - |
| 865 | if (recvResult == -1) {| TRUE | never evaluated | | FALSE | evaluated 869584 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| 0-869584 |
| 866 | setError(QAbstractSocket::NetworkError, ReceiveDatagramErrorString); | - |
| 867 | if (header)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 868 | header->clear(); never executed: header->clear(); | 0 |
| 869 | } else if (options != QAbstractSocketEngine::WantNone) { never executed: end of block | TRUE | evaluated 509 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | evaluated 869075 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| 0-869075 |
| 870 | Q_ASSERT(header); | - |
| 871 | qt_socket_getPortAndAddress(&aa, &header->senderPort, &header->senderAddress); | - |
| 872 | header->destinationPort = localPort; | - |
| 873 | | - |
| 874 | | - |
| 875 | struct cmsghdr *cmsgptr; | - |
| 876 | for (cmsgptr = CMSG_FIRSTHDR(&msg); cmsgptr != NULL;| TRUE | never evaluated | | FALSE | evaluated 509 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocks5socketengine - unknown status
|
| 0-509 |
| 877 | cmsgptr = CMSG_NXTHDR(&msg, cmsgptr)) { | - |
| 878 | if (cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_PKTINFO| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 879 | && cmsgptr->cmsg_len >= CMSG_LEN(sizeof(in6_pktinfo))) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 880 | in6_pktinfo *info = reinterpret_cast<in6_pktinfo *>(CMSG_DATA(cmsgptr)); | - |
| 881 | | - |
| 882 | header->destinationAddress.setAddress(reinterpret_cast<quint8 *>(&info->ipi6_addr)); | - |
| 883 | header->ifindex = info->ipi6_ifindex; | - |
| 884 | if (header->ifindex)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 885 | header->destinationAddress.setScopeId(QString::number(info->ipi6_ifindex)); never executed: header->destinationAddress.setScopeId(QString::number(info->ipi6_ifindex)); | 0 |
| 886 | } never executed: end of block | 0 |
| 887 | | - |
| 888 | #ifdef IP_PKTINFO | - |
| 889 | if (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_PKTINFO| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 890 | && cmsgptr->cmsg_len >= CMSG_LEN(sizeof(in_pktinfo))) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 891 | in_pktinfo *info = reinterpret_cast<in_pktinfo *>(CMSG_DATA(cmsgptr)); | - |
| 892 | | - |
| 893 | header->destinationAddress.setAddress(ntohl(info->ipi_addr.s_addr)); | - |
| 894 | header->ifindex = info->ipi_ifindex; | - |
| 895 | } never executed: end of block | 0 |
| 896 | #else | - |
| 897 | # ifdef IP_RECVDSTADDR | - |
| 898 | if (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_RECVDSTADDR | - |
| 899 | && cmsgptr->cmsg_len >= CMSG_LEN(sizeof(in_addr))) { | - |
| 900 | in_addr *addr = reinterpret_cast<in_addr *>(CMSG_DATA(cmsgptr)); | - |
| 901 | | - |
| 902 | header->destinationAddress.setAddress(ntohl(addr->s_addr)); | - |
| 903 | } | - |
| 904 | # endif | - |
| 905 | # if defined(IP_RECVIF) && defined(Q_OS_BSD4) | - |
| 906 | if (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_RECVIF | - |
| 907 | && cmsgptr->cmsg_len >= CMSG_LEN(sizeof(sockaddr_dl))) { | - |
| 908 | sockaddr_dl *sdl = reinterpret_cast<sockaddr_dl *>(CMSG_DATA(cmsgptr)); | - |
| 909 | header->ifindex = sdl->sdl_index; | - |
| 910 | } | - |
| 911 | # endif | - |
| 912 | #endif | - |
| 913 | | - |
| 914 | if (cmsgptr->cmsg_len == CMSG_LEN(sizeof(int))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 915 | && ((cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_HOPLIMIT)| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 916 | || (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_TTL))) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 917 | header->hopLimit = *reinterpret_cast<int *>(CMSG_DATA(cmsgptr)); | - |
| 918 | } never executed: end of block | 0 |
| 919 | } never executed: end of block | 0 |
| 920 | }executed 509 times by 3 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocks5socketengine - unknown status
| 509 |
| 921 | | - |
| 922 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 923 | qDebug("QNativeSocketEnginePrivate::nativeReceiveDatagram(%p \"%s\", %lli, %s, %i) == %lli", | - |
| 924 | data, qt_prettyDebug(data, qMin(recvResult, ssize_t(16)), recvResult).data(), maxSize, | - |
| 925 | (recvResult != -1 && options != QAbstractSocketEngine::WantNone) | - |
| 926 | ? header->senderAddress.toString().toLatin1().constData() : "(unknown)", | - |
| 927 | (recvResult != -1 && options != QAbstractSocketEngine::WantNone) | - |
| 928 | ? header->senderPort : 0, (qint64) recvResult); | - |
| 929 | #endif | - |
| 930 | | - |
| 931 | return qint64(maxSize ? recvResult : recvResult == -1 ? -1 : 0);executed 869584 times by 4 tests: return qint64(maxSize ? recvResult : recvResult == -1 ? -1 : 0);Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 869584 |
| 932 | } | - |
| 933 | | - |
| 934 | qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 len, const QIpPacketHeader &header) | - |
| 935 | { | - |
| 936 | | - |
| 937 | quintptr cbuf[(CMSG_SPACE(sizeof(struct in6_pktinfo)) + CMSG_SPACE(sizeof(int)) + sizeof(quintptr) - 1) / sizeof(quintptr)]; | - |
| 938 | | - |
| 939 | struct cmsghdr *cmsgptr = reinterpret_cast<struct cmsghdr *>(cbuf); | - |
| 940 | struct msghdr msg; | - |
| 941 | struct iovec vec; | - |
| 942 | qt_sockaddr aa; | - |
| 943 | | - |
| 944 | memset(&msg, 0, sizeof(msg)); | - |
| 945 | memset(&aa, 0, sizeof(aa)); | - |
| 946 | vec.iov_base = const_cast<char *>(data); | - |
| 947 | vec.iov_len = len; | - |
| 948 | msg.msg_iov = &vec; | - |
| 949 | msg.msg_iovlen = 1; | - |
| 950 | msg.msg_name = &aa.a; | - |
| 951 | msg.msg_control = &cbuf; | - |
| 952 | | - |
| 953 | setPortAndAddress(header.destinationPort, header.destinationAddress, &aa, &msg.msg_namelen); | - |
| 954 | | - |
| 955 | if (msg.msg_namelen == sizeof(aa.a6)) {| TRUE | evaluated 151 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
| | FALSE | evaluated 485 times by 2 testsEvaluated by:- tst_QUdpSocket
- tst_qsocks5socketengine - unknown status
|
| 151-485 |
| 956 | if (header.hopLimit != -1) {| TRUE | never evaluated | | FALSE | evaluated 151 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| 0-151 |
| 957 | msg.msg_controllen += CMSG_SPACE(sizeof(int)); | - |
| 958 | cmsgptr->cmsg_len = CMSG_LEN(sizeof(int)); | - |
| 959 | cmsgptr->cmsg_level = IPPROTO_IPV6; | - |
| 960 | cmsgptr->cmsg_type = IPV6_HOPLIMIT; | - |
| 961 | memcpy(CMSG_DATA(cmsgptr), &header.hopLimit, sizeof(int)); | - |
| 962 | cmsgptr = reinterpret_cast<cmsghdr *>(reinterpret_cast<char *>(cmsgptr) + CMSG_SPACE(sizeof(int))); | - |
| 963 | } never executed: end of block | 0 |
| 964 | if (header.ifindex != 0 || !header.senderAddress.isNull()) {| TRUE | never evaluated | | FALSE | evaluated 151 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| TRUE | never evaluated | | FALSE | evaluated 151 times by 3 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
|
| 0-151 |
| 965 | struct in6_pktinfo *data = reinterpret_cast<in6_pktinfo *>(CMSG_DATA(cmsgptr)); | - |
| 966 | memset(data, 0, sizeof(*data)); | - |
| 967 | msg.msg_controllen += CMSG_SPACE(sizeof(*data)); | - |
| 968 | cmsgptr->cmsg_len = CMSG_LEN(sizeof(*data)); | - |
| 969 | cmsgptr->cmsg_level = IPPROTO_IPV6; | - |
| 970 | cmsgptr->cmsg_type = IPV6_PKTINFO; | - |
| 971 | data->ipi6_ifindex = header.ifindex; | - |
| 972 | | - |
| 973 | QIPv6Address tmp = header.senderAddress.toIPv6Address(); | - |
| 974 | memcpy(&data->ipi6_addr, &tmp, sizeof(tmp)); | - |
| 975 | cmsgptr = reinterpret_cast<cmsghdr *>(reinterpret_cast<char *>(cmsgptr) + CMSG_SPACE(sizeof(*data))); | - |
| 976 | } never executed: end of block | 0 |
| 977 | } else {executed 151 times by 3 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
| 151 |
| 978 | if (header.hopLimit != -1) {| TRUE | never evaluated | | FALSE | evaluated 485 times by 2 testsEvaluated by:- tst_QUdpSocket
- tst_qsocks5socketengine - unknown status
|
| 0-485 |
| 979 | msg.msg_controllen += CMSG_SPACE(sizeof(int)); | - |
| 980 | cmsgptr->cmsg_len = CMSG_LEN(sizeof(int)); | - |
| 981 | cmsgptr->cmsg_level = IPPROTO_IP; | - |
| 982 | cmsgptr->cmsg_type = IP_TTL; | - |
| 983 | memcpy(CMSG_DATA(cmsgptr), &header.hopLimit, sizeof(int)); | - |
| 984 | cmsgptr = reinterpret_cast<cmsghdr *>(reinterpret_cast<char *>(cmsgptr) + CMSG_SPACE(sizeof(int))); | - |
| 985 | } never executed: end of block | 0 |
| 986 | | - |
| 987 | #if defined(IP_PKTINFO) || defined(IP_SENDSRCADDR) | - |
| 988 | if (header.ifindex != 0 || !header.senderAddress.isNull()) {| TRUE | never evaluated | | FALSE | evaluated 485 times by 2 testsEvaluated by:- tst_QUdpSocket
- tst_qsocks5socketengine - unknown status
|
| TRUE | never evaluated | | FALSE | evaluated 485 times by 2 testsEvaluated by:- tst_QUdpSocket
- tst_qsocks5socketengine - unknown status
|
| 0-485 |
| 989 | # ifdef IP_PKTINFO | - |
| 990 | struct in_pktinfo *data = reinterpret_cast<in_pktinfo *>(CMSG_DATA(cmsgptr)); | - |
| 991 | memset(data, 0, sizeof(*data)); | - |
| 992 | cmsgptr->cmsg_type = IP_PKTINFO; | - |
| 993 | data->ipi_ifindex = header.ifindex; | - |
| 994 | data->ipi_addr.s_addr = htonl(header.senderAddress.toIPv4Address()); | - |
| 995 | # elif defined(IP_SENDSRCADDR) | - |
| 996 | struct in_addr *data = reinterpret_cast<in_addr *>(CMSG_DATA(cmsgptr)); | - |
| 997 | cmsgptr->cmsg_type = IP_SENDSRCADDR; | - |
| 998 | data->s_addr = htonl(header.senderAddress.toIPv4Address()); | - |
| 999 | # endif | - |
| 1000 | cmsgptr->cmsg_level = IPPROTO_IP; | - |
| 1001 | msg.msg_controllen += CMSG_SPACE(sizeof(*data)); | - |
| 1002 | cmsgptr->cmsg_len = CMSG_LEN(sizeof(*data)); | - |
| 1003 | cmsgptr = reinterpret_cast<cmsghdr *>(reinterpret_cast<char *>(cmsgptr) + CMSG_SPACE(sizeof(*data))); | - |
| 1004 | } never executed: end of block | 0 |
| 1005 | #endif | - |
| 1006 | }executed 485 times by 2 tests: end of blockExecuted by:- tst_QUdpSocket
- tst_qsocks5socketengine - unknown status
| 485 |
| 1007 | | - |
| 1008 | if (msg.msg_controllen == 0)| TRUE | evaluated 636 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | never evaluated |
| 0-636 |
| 1009 | msg.msg_control = 0;executed 636 times by 4 tests: msg.msg_control = 0;Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 636 |
| 1010 | ssize_t sentBytes = qt_safe_sendmsg(socketDescriptor, &msg, 0); | - |
| 1011 | | - |
| 1012 | if (sentBytes < 0) {| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 635 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| 1-635 |
| 1013 | switch (errno) { | - |
| 1014 | case EMSGSIZE:executed 1 time by 1 test: case 90: | 1 |
| 1015 | setError(QAbstractSocket::DatagramTooLargeError, DatagramTooLargeErrorString); | - |
| 1016 | break;executed 1 time by 1 test: break; | 1 |
| 1017 | default: never executed: default: | 0 |
| 1018 | setError(QAbstractSocket::NetworkError, SendDatagramErrorString); | - |
| 1019 | } never executed: end of block | 0 |
| 1020 | } | - |
| 1021 | | - |
| 1022 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 1023 | qDebug("QNativeSocketEngine::sendDatagram(%p \"%s\", %lli, \"%s\", %i) == %lli", data, | - |
| 1024 | qt_prettyDebug(data, qMin<int>(len, 16), len).data(), len, | - |
| 1025 | header.destinationAddress.toString().toLatin1().constData(), | - |
| 1026 | header.destinationPort, (qint64) sentBytes); | - |
| 1027 | #endif | - |
| 1028 | | - |
| 1029 | return qint64(sentBytes);executed 636 times by 4 tests: return qint64(sentBytes);Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 636 |
| 1030 | } | - |
| 1031 | | - |
| 1032 | bool QNativeSocketEnginePrivate::fetchConnectionParameters() | - |
| 1033 | { | - |
| 1034 | localPort = 0; | - |
| 1035 | localAddress.clear(); | - |
| 1036 | peerPort = 0; | - |
| 1037 | peerAddress.clear(); | - |
| 1038 | | - |
| 1039 | if (socketDescriptor == -1)| TRUE | evaluated 1 time by 1 testEvaluated by:- tst_qlocalsocket - unknown status
| | FALSE | evaluated 5222 times by 32 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- ...
|
| 1-5222 |
| 1040 | return false;executed 1 time by 1 test: return false;Executed by:- tst_qlocalsocket - unknown status
| 1 |
| 1041 | | - |
| 1042 | qt_sockaddr sa; | - |
| 1043 | QT_SOCKLEN_T sockAddrSize = sizeof(sa); | - |
| 1044 | | - |
| 1045 | | - |
| 1046 | memset(&sa, 0, sizeof(sa)); | - |
| 1047 | if (::getsockname(socketDescriptor, &sa.a, &sockAddrSize) == 0) {| TRUE | evaluated 5214 times by 32 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- ...
| | FALSE | evaluated 8 times by 2 testsEvaluated by:- tst_QTcpServer
- tst_qtcpsocket - unknown status
|
| 8-5214 |
| 1048 | qt_socket_getPortAndAddress(&sa, &localPort, &localAddress); | - |
| 1049 | | - |
| 1050 | | - |
| 1051 | switch (sa.a.sa_family) { | - |
| 1052 | case AF_INET:executed 3853 times by 29 tests: case 2:Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| 3853 |
| 1053 | socketProtocol = QAbstractSocket::IPv4Protocol; | - |
| 1054 | break;executed 3853 times by 29 tests: break;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| 3853 |
| 1055 | case AF_INET6:executed 1203 times by 14 tests: case 10:Executed by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 1203 |
| 1056 | socketProtocol = QAbstractSocket::IPv6Protocol; | - |
| 1057 | break;executed 1203 times by 14 tests: break;Executed by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 1203 |
| 1058 | default:executed 158 times by 3 tests: default:Executed by:- tst_QNetworkReply
- tst_QNetworkSession
- tst_qlocalsocket - unknown status
| 158 |
| 1059 | socketProtocol = QAbstractSocket::UnknownNetworkLayerProtocol; | - |
| 1060 | break;executed 158 times by 3 tests: break;Executed by:- tst_QNetworkReply
- tst_QNetworkSession
- tst_qlocalsocket - unknown status
| 158 |
| 1061 | } | - |
| 1062 | | - |
| 1063 | } else if (errno == EBADF) {| TRUE | evaluated 8 times by 2 testsEvaluated by:- tst_QTcpServer
- tst_qtcpsocket - unknown status
| | FALSE | never evaluated |
| 0-8 |
| 1064 | setError(QAbstractSocket::UnsupportedSocketOperationError, InvalidSocketErrorString); | - |
| 1065 | return false;executed 8 times by 2 tests: return false;Executed by:- tst_QTcpServer
- tst_qtcpsocket - unknown status
| 8 |
| 1066 | } | - |
| 1067 | | - |
| 1068 | #if defined (IPV6_V6ONLY) | - |
| 1069 | | - |
| 1070 | | - |
| 1071 | | - |
| 1072 | | - |
| 1073 | int ipv6only = 0; | - |
| 1074 | socklen_t optlen = sizeof(ipv6only); | - |
| 1075 | if (socketProtocol == QAbstractSocket::IPv6Protocol| TRUE | evaluated 1203 times by 14 testsEvaluated by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 4011 times by 31 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
|
| 1203-4011 |
| 1076 | && (localAddress == QHostAddress::AnyIPv4 || localAddress == QHostAddress::AnyIPv6)| TRUE | never evaluated | | FALSE | evaluated 1203 times by 14 testsEvaluated by:- tst_NetworkSelfTest
- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| TRUE | evaluated 614 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 589 times by 12 testsEvaluated by:- tst_QHostInfo
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 0-1203 |
| 1077 | && !getsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, &optlen )) {| TRUE | evaluated 614 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | never evaluated |
| 0-614 |
| 1078 | if (optlen != sizeof(ipv6only))| TRUE | never evaluated | | FALSE | evaluated 614 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 0-614 |
| 1079 | qWarning("unexpected size of IPV6_V6ONLY socket option"); never executed: QMessageLogger(__FILE__, 1079, __PRETTY_FUNCTION__).warning("unexpected size of IPV6_V6ONLY socket option"); | 0 |
| 1080 | if (!ipv6only) {| TRUE | evaluated 578 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 36 times by 5 testsEvaluated by:- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qtcpsocket - unknown status
|
| 36-578 |
| 1081 | socketProtocol = QAbstractSocket::AnyIPProtocol; | - |
| 1082 | localAddress = QHostAddress::Any; | - |
| 1083 | }executed 578 times by 13 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 578 |
| 1084 | }executed 614 times by 13 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 614 |
| 1085 | #endif | - |
| 1086 | | - |
| 1087 | | - |
| 1088 | if (!::getpeername(socketDescriptor, &sa.a, &sockAddrSize))| TRUE | evaluated 4285 times by 31 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
| | FALSE | evaluated 929 times by 20 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
|
| 929-4285 |
| 1089 | qt_socket_getPortAndAddress(&sa, &peerPort, &peerAddress);executed 4285 times by 31 tests: qt_socket_getPortAndAddress(&sa, &peerPort, &peerAddress);Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- ...
| 4285 |
| 1090 | | - |
| 1091 | | - |
| 1092 | int value = 0; | - |
| 1093 | QT_SOCKOPTLEN_T valueSize = sizeof(int); | - |
| 1094 | if (::getsockopt(socketDescriptor, SOL_SOCKET, SO_TYPE, &value, &valueSize) == 0) {| TRUE | evaluated 5214 times by 32 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- ...
| | FALSE | never evaluated |
| 0-5214 |
| 1095 | if (value == SOCK_STREAM)| TRUE | evaluated 5074 times by 32 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- ...
| | FALSE | evaluated 140 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
|
| 140-5074 |
| 1096 | socketType = QAbstractSocket::TcpSocket;executed 5074 times by 32 tests: socketType = QAbstractSocket::TcpSocket;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- ...
| 5074 |
| 1097 | else if (value == SOCK_DGRAM)| TRUE | evaluated 140 times by 4 testsEvaluated by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| | FALSE | never evaluated |
| 0-140 |
| 1098 | socketType = QAbstractSocket::UdpSocket;executed 140 times by 4 tests: socketType = QAbstractSocket::UdpSocket;Executed by:- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
| 140 |
| 1099 | else | - |
| 1100 | socketType = QAbstractSocket::UnknownSocketType; never executed: socketType = QAbstractSocket::UnknownSocketType; | 0 |
| 1101 | } | - |
| 1102 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 1103 | QString socketProtocolStr = QStringLiteral("UnknownProtocol"); | - |
| 1104 | if (socketProtocol == QAbstractSocket::IPv4Protocol) socketProtocolStr = QStringLiteral("IPv4Protocol"); | - |
| 1105 | else if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) socketProtocolStr = QStringLiteral("IPv6Protocol"); | - |
| 1106 | | - |
| 1107 | QString socketTypeStr = QStringLiteral("UnknownSocketType"); | - |
| 1108 | if (socketType == QAbstractSocket::TcpSocket) socketTypeStr = QStringLiteral("TcpSocket"); | - |
| 1109 | else if (socketType == QAbstractSocket::UdpSocket) socketTypeStr = QStringLiteral("UdpSocket"); | - |
| 1110 | | - |
| 1111 | qDebug("QNativeSocketEnginePrivate::fetchConnectionParameters() local == %s:%i," | - |
| 1112 | " peer == %s:%i, socket == %s - %s", | - |
| 1113 | localAddress.toString().toLatin1().constData(), localPort, | - |
| 1114 | peerAddress.toString().toLatin1().constData(), peerPort,socketTypeStr.toLatin1().constData(), | - |
| 1115 | socketProtocolStr.toLatin1().constData()); | - |
| 1116 | #endif | - |
| 1117 | return true;executed 5214 times by 32 tests: return true;Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- ...
| 5214 |
| 1118 | } | - |
| 1119 | | - |
| 1120 | void QNativeSocketEnginePrivate::nativeClose() | - |
| 1121 | { | - |
| 1122 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 1123 | qDebug("QNativeSocketEngine::nativeClose()"); | - |
| 1124 | #endif | - |
| 1125 | | - |
| 1126 | qt_safe_close(socketDescriptor); | - |
| 1127 | }executed 71486 times by 33 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- ...
| 71486 |
| 1128 | | - |
| 1129 | qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len) | - |
| 1130 | { | - |
| 1131 | Q_Q(QNativeSocketEngine); | - |
| 1132 | | - |
| 1133 | ssize_t writtenBytes; | - |
| 1134 | writtenBytes = qt_safe_write_nosignal(socketDescriptor, data, len); | - |
| 1135 | | - |
| 1136 | if (writtenBytes < 0) {| TRUE | evaluated 131 times by 1 test | | FALSE | evaluated 929743 times by 28 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
|
| 131-929743 |
| 1137 | switch (errno) { | - |
| 1138 | case EPIPE: never executed: case 32: | 0 |
| 1139 | case ECONNRESET: never executed: case 104: | 0 |
| 1140 | writtenBytes = -1; | - |
| 1141 | setError(QAbstractSocket::RemoteHostClosedError, RemoteHostClosedErrorString); | - |
| 1142 | q->close(); | - |
| 1143 | break; never executed: break; | 0 |
| 1144 | case EAGAIN:executed 131 times by 1 test: case 11: | 131 |
| 1145 | writtenBytes = 0; | - |
| 1146 | break;executed 131 times by 1 test: break; | 131 |
| 1147 | case EMSGSIZE: never executed: case 90: | 0 |
| 1148 | setError(QAbstractSocket::DatagramTooLargeError, DatagramTooLargeErrorString); | - |
| 1149 | break; never executed: break; | 0 |
| 1150 | default: never executed: default: | 0 |
| 1151 | break; never executed: break; | 0 |
| 1152 | } | - |
| 1153 | } | - |
| 1154 | | - |
| 1155 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 1156 | qDebug("QNativeSocketEnginePrivate::nativeWrite(%p \"%s\", %llu) == %i", | - |
| 1157 | data, qt_prettyDebug(data, qMin((int) len, 16), | - |
| 1158 | (int) len).data(), len, (int) writtenBytes); | - |
| 1159 | #endif | - |
| 1160 | | - |
| 1161 | return qint64(writtenBytes);executed 929874 times by 28 tests: return qint64(writtenBytes);Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- ...
| 929874 |
| 1162 | } | - |
| 1163 | | - |
| 1164 | | - |
| 1165 | qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxSize) | - |
| 1166 | { | - |
| 1167 | Q_Q(QNativeSocketEngine); | - |
| 1168 | if (!q->isValid()) {| TRUE | never evaluated | | FALSE | evaluated 194717 times by 30 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
|
| 0-194717 |
| 1169 | qWarning("QNativeSocketEngine::nativeRead: Invalid socket"); | - |
| 1170 | return -1; never executed: return -1; | 0 |
| 1171 | } | - |
| 1172 | | - |
| 1173 | ssize_t r = 0; | - |
| 1174 | r = qt_safe_read(socketDescriptor, data, maxSize); | - |
| 1175 | | - |
| 1176 | if (r < 0) {| TRUE | evaluated 1158 times by 5 testsEvaluated by:- tst_NetworkSelfTest
- tst_QNetworkReply
- tst_platformsocketengine - unknown status
- tst_qsocketnotifier - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 193559 times by 30 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
|
| 1158-193559 |
| 1177 | r = -1; | - |
| 1178 | switch (errno) { | - |
| 1179 | #if EWOULDBLOCK-0 && EWOULDBLOCK != EAGAIN | - |
| 1180 | case EWOULDBLOCK: | - |
| 1181 | #endif | - |
| 1182 | case EAGAIN:executed 1136 times by 2 tests: case 11:Executed by:- tst_QNetworkReply
- tst_qsocketnotifier - unknown status
| 1136 |
| 1183 | | - |
| 1184 | r = -2; | - |
| 1185 | break;executed 1136 times by 2 tests: break;Executed by:- tst_QNetworkReply
- tst_qsocketnotifier - unknown status
| 1136 |
| 1186 | case EBADF:executed 1 time by 1 test: case 9:Executed by:- tst_platformsocketengine - unknown status
| 1 |
| 1187 | case EINVAL: never executed: case 22: | 0 |
| 1188 | case EIO: never executed: case 5: | 0 |
| 1189 | | - |
| 1190 | break;executed 1 time by 1 test: break;Executed by:- tst_platformsocketengine - unknown status
| 1 |
| 1191 | case ECONNRESET:executed 21 times by 3 tests: case 104:Executed by:- tst_NetworkSelfTest
- tst_QNetworkReply
- tst_qtcpsocket - unknown status
| 21 |
| 1192 | #if defined(Q_OS_VXWORKS) | - |
| 1193 | case ESHUTDOWN: | - |
| 1194 | #endif | - |
| 1195 | r = 0; | - |
| 1196 | break;executed 21 times by 3 tests: break;Executed by:- tst_NetworkSelfTest
- tst_QNetworkReply
- tst_qtcpsocket - unknown status
| 21 |
| 1197 | default: never executed: default: | 0 |
| 1198 | break; never executed: break; | 0 |
| 1199 | } | - |
| 1200 | } | - |
| 1201 | | - |
| 1202 | #if defined (QNATIVESOCKETENGINE_DEBUG) | - |
| 1203 | qDebug("QNativeSocketEnginePrivate::nativeRead(%p \"%s\", %llu) == %zd", | - |
| 1204 | data, qt_prettyDebug(data, qMin(r, ssize_t(16)), r).data(), | - |
| 1205 | maxSize, r); | - |
| 1206 | #endif | - |
| 1207 | | - |
| 1208 | return qint64(r);executed 194717 times by 30 tests: return qint64(r);Executed by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QFtp
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_QXmlInputSource
- tst_Spdy
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qimagereader - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qnetworkreply - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- ...
| 194717 |
| 1209 | } | - |
| 1210 | | - |
| 1211 | #ifdef Q_OS_BLACKBERRY | - |
| 1212 | int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) const | - |
| 1213 | { | - |
| 1214 | fd_set fds; | - |
| 1215 | FD_ZERO(&fds); | - |
| 1216 | FD_SET(socketDescriptor, &fds); | - |
| 1217 | | - |
| 1218 | int retval; | - |
| 1219 | QList<QSocketNotifier *> notifiers; | - |
| 1220 | if (selectForRead) { | - |
| 1221 | notifiers << readNotifier; | - |
| 1222 | retval = bb_select(notifiers, socketDescriptor + 1, &fds, 0, timeout); | - |
| 1223 | } else { | - |
| 1224 | notifiers << writeNotifier; | - |
| 1225 | retval = bb_select(notifiers, socketDescriptor + 1, 0, &fds, timeout); | - |
| 1226 | } | - |
| 1227 | | - |
| 1228 | return retval; | - |
| 1229 | } | - |
| 1230 | | - |
| 1231 | int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool checkWrite, | - |
| 1232 | bool *selectForRead, bool *selectForWrite) const | - |
| 1233 | { | - |
| 1234 | fd_set fdread; | - |
| 1235 | FD_ZERO(&fdread); | - |
| 1236 | if (checkRead) | - |
| 1237 | FD_SET(socketDescriptor, &fdread); | - |
| 1238 | | - |
| 1239 | fd_set fdwrite; | - |
| 1240 | FD_ZERO(&fdwrite); | - |
| 1241 | if (checkWrite) | - |
| 1242 | FD_SET(socketDescriptor, &fdwrite); | - |
| 1243 | | - |
| 1244 | QList<QSocketNotifier *> notifiers; | - |
| 1245 | notifiers << readNotifier << writeNotifier; | - |
| 1246 | int ret = bb_select(notifiers, socketDescriptor + 1, &fdread, &fdwrite, timeout); | - |
| 1247 | | - |
| 1248 | if (ret <= 0) | - |
| 1249 | return ret; | - |
| 1250 | *selectForRead = FD_ISSET(socketDescriptor, &fdread); | - |
| 1251 | *selectForWrite = FD_ISSET(socketDescriptor, &fdwrite); | - |
| 1252 | | - |
| 1253 | return ret; | - |
| 1254 | } | - |
| 1255 | | - |
| 1256 | #else // not Q_OS_BLACKBERRY: | - |
| 1257 | | - |
| 1258 | int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) const | - |
| 1259 | { | - |
| 1260 | fd_set fds; | - |
| 1261 | FD_ZERO(&fds); | - |
| 1262 | FD_SET(socketDescriptor, &fds); | - |
| 1263 | | - |
| 1264 | struct timespec tv; | - |
| 1265 | tv.tv_sec = timeout / 1000; | - |
| 1266 | tv.tv_nsec = (timeout % 1000) * 1000 * 1000; | - |
| 1267 | | - |
| 1268 | int retval; | - |
| 1269 | if (selectForRead)| TRUE | evaluated 245016 times by 8 testsEvaluated by:- tst_QNetworkReply
- tst_QTcpServer
- tst_platformsocketengine - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 1075 times by 20 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qtextstream - unknown status
- tst_qxmlsimplereader - unknown status
|
| 1075-245016 |
| 1270 | retval = qt_safe_select(socketDescriptor + 1, &fds, 0, 0, timeout < 0 ? 0 : &tv);executed 245016 times by 8 tests: retval = qt_safe_select(socketDescriptor + 1, &fds, 0, 0, timeout < 0 ? 0 : &tv);Executed by:- tst_QNetworkReply
- tst_QTcpServer
- tst_platformsocketengine - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 245016 |
| 1271 | else | - |
| 1272 | retval = qt_safe_select(socketDescriptor + 1, 0, &fds, 0, timeout < 0 ? 0 : &tv);executed 1075 times by 20 tests: retval = qt_safe_select(socketDescriptor + 1, 0, &fds, 0, timeout < 0 ? 0 : &tv);Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qtextstream - unknown status
- tst_qxmlsimplereader - unknown status
| 1075 |
| 1273 | | - |
| 1274 | return retval;executed 246091 times by 20 tests: return retval;Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_platformsocketengine - unknown status
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qobject - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qtextstream - unknown status
- tst_qxmlsimplereader - unknown status
| 246091 |
| 1275 | } | - |
| 1276 | | - |
| 1277 | int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool checkWrite, | - |
| 1278 | bool *selectForRead, bool *selectForWrite) const | - |
| 1279 | { | - |
| 1280 | fd_set fdread; | - |
| 1281 | FD_ZERO(&fdread); | - |
| 1282 | if (checkRead)| TRUE | evaluated 14546 times by 21 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qtextstream - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 21 times by 2 testsEvaluated by:- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
|
| 21-14546 |
| 1283 | FD_SET(socketDescriptor, &fdread);executed 14546 times by 21 tests: ((void) (((&fdread)->fds_bits)[((socketDescriptor) / (8 * (int) sizeof (__fd_mask)))] |= ((__fd_mask) 1 << ((socketDescriptor) % (8 * (int) sizeof (__fd_mask))))));Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qtextstream - unknown status
- tst_qxmlsimplereader - unknown status
| 14546 |
| 1284 | | - |
| 1285 | fd_set fdwrite; | - |
| 1286 | FD_ZERO(&fdwrite); | - |
| 1287 | if (checkWrite)| TRUE | evaluated 9788 times by 18 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QTcpServer
- tst_Spdy
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| | FALSE | evaluated 4779 times by 17 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qtextstream - unknown status
- tst_qxmlsimplereader - unknown status
|
| 4779-9788 |
| 1288 | FD_SET(socketDescriptor, &fdwrite);executed 9788 times by 18 tests: ((void) (((&fdwrite)->fds_bits)[((socketDescriptor) / (8 * (int) sizeof (__fd_mask)))] |= ((__fd_mask) 1 << ((socketDescriptor) % (8 * (int) sizeof (__fd_mask))))));Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QTcpServer
- tst_Spdy
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlsimplereader - unknown status
| 9788 |
| 1289 | | - |
| 1290 | struct timespec tv; | - |
| 1291 | tv.tv_sec = timeout / 1000; | - |
| 1292 | tv.tv_nsec = (timeout % 1000) * 1000 * 1000; | - |
| 1293 | | - |
| 1294 | int ret; | - |
| 1295 | ret = qt_safe_select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv); | - |
| 1296 | | - |
| 1297 | if (ret <= 0)| TRUE | evaluated 98 times by 9 testsEvaluated by:- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 14469 times by 21 testsEvaluated by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qtextstream - unknown status
- tst_qxmlsimplereader - unknown status
|
| 98-14469 |
| 1298 | return ret;executed 98 times by 9 tests: return ret;Executed by:- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 98 |
| 1299 | *selectForRead = FD_ISSET(socketDescriptor, &fdread); | - |
| 1300 | *selectForWrite = FD_ISSET(socketDescriptor, &fdwrite); | - |
| 1301 | | - |
| 1302 | return ret;executed 14469 times by 21 tests: return ret;Executed by:- tst_NetworkSelfTest
- tst_QFtp
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_qeventloop - unknown status
- tst_qguieventloop - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qiodevice - unknown status
- tst_qlocalsocket - unknown status
- tst_qsocketnotifier - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qtextstream - unknown status
- tst_qxmlsimplereader - unknown status
| 14469 |
| 1303 | } | - |
| 1304 | #endif // Q_OS_BLACKBERRY | - |
| 1305 | | - |
| 1306 | QT_END_NAMESPACE | - |
| | |