qcore_unix.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qcore_unix.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static inline bool time_update(struct timespec *tv, const struct timespec &start,-
4 const struct timespec &timeout)-
5{-
6-
7-
8 struct timespec now = qt_gettime();-
9 *tv = timeout + start - now;-
10 return
executed 1564 times by 23 tests: return tv->tv_sec >= 0;
Executed by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDir
  • tst_QFont
  • tst_QMimeDatabase
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QUuid
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qdbusxml2cpp
  • tst_qmessagehandler
  • tst_qprocess - unknown status
  • tst_rcc
  • tst_uic
tv->tv_sec >= 0;
executed 1564 times by 23 tests: return tv->tv_sec >= 0;
Executed by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDir
  • tst_QFont
  • tst_QMimeDatabase
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QUuid
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qdbusxml2cpp
  • tst_qmessagehandler
  • tst_qprocess - unknown status
  • tst_rcc
  • tst_uic
1564
11}-
12-
13int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,-
14 const struct timespec *orig_timeout)-
15{-
16 if (!orig_timeout
!orig_timeoutDescription
TRUEevaluated 763 times by 13 tests
Evaluated by:
  • tst_QEventLoop
  • tst_QGuiEventLoop
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QProcess
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QUndoGroup
  • tst_QUndoStack
  • tst_QXmlSimpleReader
  • tst_qmake
  • tst_qmakelib
FALSEevaluated 301848 times by 51 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFont
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • ...
) {
763-301848
17-
18 int ret;-
19 do { ret = select(nfds, fdread, fdwrite, fdexcept, 0); }
executed 795 times by 13 tests: end of block
Executed by:
  • tst_QEventLoop
  • tst_QGuiEventLoop
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QProcess
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QUndoGroup
  • tst_QUndoStack
  • tst_QXmlSimpleReader
  • tst_qmake
  • tst_qmakelib
while (ret == -1
ret == -1Description
TRUEevaluated 32 times by 3 tests
Evaluated by:
  • tst_QProcess
  • tst_qmake
  • tst_qmakelib
FALSEevaluated 763 times by 13 tests
Evaluated by:
  • tst_QEventLoop
  • tst_QGuiEventLoop
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QProcess
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QUndoGroup
  • tst_QUndoStack
  • tst_QXmlSimpleReader
  • tst_qmake
  • tst_qmakelib
&& (*
(*__errno_location ()) == 4Description
TRUEevaluated 32 times by 3 tests
Evaluated by:
  • tst_QProcess
  • tst_qmake
  • tst_qmakelib
FALSEnever evaluated
__errno_location ()) == 4
(*__errno_location ()) == 4Description
TRUEevaluated 32 times by 3 tests
Evaluated by:
  • tst_QProcess
  • tst_qmake
  • tst_qmakelib
FALSEnever evaluated
);
0-795
20 return
executed 763 times by 13 tests: return ret;
Executed by:
  • tst_QEventLoop
  • tst_QGuiEventLoop
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QProcess
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QUndoGroup
  • tst_QUndoStack
  • tst_QXmlSimpleReader
  • tst_qmake
  • tst_qmakelib
ret;
executed 763 times by 13 tests: return ret;
Executed by:
  • tst_QEventLoop
  • tst_QGuiEventLoop
  • tst_QLockFile
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QProcess
  • tst_QSslSocket
  • tst_QTcpSocket
  • tst_QUndoGroup
  • tst_QUndoStack
  • tst_QXmlSimpleReader
  • tst_qmake
  • tst_qmakelib
763
21 }-
22-
23 timespec start = qt_gettime();-
24 timespec timeout = *orig_timeout;-
25-
26-
27 int ret;-
28 for(;;) {-
29-
30 ret = ::pselect(nfds, fdread, fdwrite, fdexcept, &timeout, 0);-
31-
32-
33-
34-
35-
36-
37 if (ret != -1
ret != -1Description
TRUEevaluated 301848 times by 52 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFont
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • ...
FALSEevaluated 1564 times by 23 tests
Evaluated by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDir
  • tst_QFont
  • tst_QMimeDatabase
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QUuid
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qdbusxml2cpp
  • tst_qmessagehandler
  • tst_qprocess - unknown status
  • tst_rcc
  • tst_uic
|| (*
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEevaluated 1564 times by 23 tests
Evaluated by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDir
  • tst_QFont
  • tst_QMimeDatabase
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QUuid
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qdbusxml2cpp
  • tst_qmessagehandler
  • tst_qprocess - unknown status
  • tst_rcc
  • tst_uic
__errno_location ()) != 4
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEevaluated 1564 times by 23 tests
Evaluated by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDir
  • tst_QFont
  • tst_QMimeDatabase
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QUuid
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qdbusxml2cpp
  • tst_qmessagehandler
  • tst_qprocess - unknown status
  • tst_rcc
  • tst_uic
)
0-301848
38 return
executed 301848 times by 52 tests: return ret;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFont
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • ...
ret;
executed 301848 times by 52 tests: return ret;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QEventLoop
  • tst_QFile
  • tst_QFont
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QLocalSocket
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • ...
301848
39-
40-
41 if (!time_update(&timeout, start, *orig_timeout)
!time_update(&...*orig_timeout)Description
TRUEnever evaluated
FALSEevaluated 1564 times by 23 tests
Evaluated by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDir
  • tst_QFont
  • tst_QMimeDatabase
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QUuid
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qdbusxml2cpp
  • tst_qmessagehandler
  • tst_qprocess - unknown status
  • tst_rcc
  • tst_uic
) {
0-1564
42-
43-
44 return
never executed: return 0;
0;
never executed: return 0;
0
45 }-
46 }
executed 1564 times by 23 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDir
  • tst_QFont
  • tst_QMimeDatabase
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QUuid
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qdbusxml2cpp
  • tst_qmessagehandler
  • tst_qprocess - unknown status
  • tst_rcc
  • tst_uic
1564
47}
never executed: end of block
0
48-
49int qt_select_msecs(int nfds, fd_set *fdread, fd_set *fdwrite, int timeout)-
50{-
51 if (timeout < 0
timeout < 0Description
TRUEevaluated 659 times by 6 tests
Evaluated by:
  • tst_QLockFile
  • tst_QProcess
  • tst_QUndoGroup
  • tst_QUndoStack
  • tst_qmake
  • tst_qmakelib
FALSEevaluated 41215 times by 34 tests
Evaluated by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QFile
  • tst_QFont
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QTextStream
  • ...
)
659-41215
52 return
executed 659 times by 6 tests: return qt_safe_select(nfds, fdread, fdwrite, 0, 0);
Executed by:
  • tst_QLockFile
  • tst_QProcess
  • tst_QUndoGroup
  • tst_QUndoStack
  • tst_qmake
  • tst_qmakelib
qt_safe_select(nfds, fdread, fdwrite, 0, 0);
executed 659 times by 6 tests: return qt_safe_select(nfds, fdread, fdwrite, 0, 0);
Executed by:
  • tst_QLockFile
  • tst_QProcess
  • tst_QUndoGroup
  • tst_QUndoStack
  • tst_qmake
  • tst_qmakelib
659
53-
54 struct timespec tv;-
55 tv.tv_sec = timeout / 1000;-
56 tv.tv_nsec = (timeout % 1000) * 1000 * 1000;-
57 return
executed 41215 times by 34 tests: return qt_safe_select(nfds, fdread, fdwrite, 0, &tv);
Executed by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QFile
  • tst_QFont
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QTextStream
  • ...
qt_safe_select(nfds, fdread, fdwrite, 0, &tv);
executed 41215 times by 34 tests: return qt_safe_select(nfds, fdread, fdwrite, 0, &tv);
Executed by:
  • tst_Lancelot
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDir
  • tst_QFile
  • tst_QFont
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QObject
  • tst_QProcess
  • tst_QProcess_and_GuiEventLoop
  • tst_QSharedMemory
  • tst_QSharedPointer
  • tst_QSystemSemaphore
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QTextStream
  • ...
41215
58}-
59-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9