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 | #include "qdebug.h" | - |
36 | | - |
37 | #ifndef QT_NO_PROCESS | - |
38 | | - |
39 | #if defined QPROCESS_DEBUG | - |
40 | #include "private/qtools_p.h" | - |
41 | #include <ctype.h> | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | QT_BEGIN_NAMESPACE | - |
48 | static QByteArray qt_prettyDebug(const char *data, int len, int maxSize) | - |
49 | { | - |
50 | if (!data) return "(null)"; | - |
51 | QByteArray out; | - |
52 | for (int i = 0; i < len; ++i) { | - |
53 | char c = data[i]; | - |
54 | if (isprint(c)) { | - |
55 | out += c; | - |
56 | } else switch (c) { | - |
57 | case '\n': out += "\\n"; break; | - |
58 | case '\r': out += "\\r"; break; | - |
59 | case '\t': out += "\\t"; break; | - |
60 | default: { | - |
61 | const char buf[] = { | - |
62 | '\\', | - |
63 | QtMiscUtils::toOct(uchar(c) / 64), | - |
64 | QtMiscUtils::toOct(uchar(c) % 64 / 8), | - |
65 | QtMiscUtils::toOct(uchar(c) % 8), | - |
66 | 0 | - |
67 | }; | - |
68 | out += buf; | - |
69 | } | - |
70 | } | - |
71 | } | - |
72 | | - |
73 | if (len < maxSize) | - |
74 | out += "..."; | - |
75 | | - |
76 | return out; | - |
77 | } | - |
78 | QT_END_NAMESPACE | - |
79 | #endif | - |
80 | | - |
81 | #include "qplatformdefs.h" | - |
82 | | - |
83 | #include "qprocess.h" | - |
84 | #include "qprocess_p.h" | - |
85 | #include "private/qcore_unix_p.h" | - |
86 | | - |
87 | #ifdef Q_OS_MAC | - |
88 | #include <private/qcore_mac_p.h> | - |
89 | #endif | - |
90 | | - |
91 | #include <private/qcoreapplication_p.h> | - |
92 | #include <private/qthread_p.h> | - |
93 | #include <qfile.h> | - |
94 | #include <qfileinfo.h> | - |
95 | #include <qdir.h> | - |
96 | #include <qlist.h> | - |
97 | #include <qmutex.h> | - |
98 | #include <qsemaphore.h> | - |
99 | #include <qsocketnotifier.h> | - |
100 | #include <qthread.h> | - |
101 | #include <qelapsedtimer.h> | - |
102 | | - |
103 | #ifdef Q_OS_QNX | - |
104 | # include <sys/neutrino.h> | - |
105 | #endif | - |
106 | | - |
107 | #include <errno.h> | - |
108 | #include <stdlib.h> | - |
109 | #include <string.h> | - |
110 | #include <forkfd.h> | - |
111 | | - |
112 | QT_BEGIN_NAMESPACE | - |
113 | | - |
114 | | - |
115 | | - |
116 | static const int errorBufferMax = 512; | - |
117 | | - |
118 | static inline void add_fd(int &nfds, int fd, fd_set *fdset) | - |
119 | { | - |
120 | FD_SET(fd, fdset); | - |
121 | if ((fd) > nfds)TRUE | evaluated 110516 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| FALSE | evaluated 2525 times by 11 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
- tst_qdbusxml2cpp
- tst_qprocess - unknown status
|
| 2525-110516 |
122 | nfds = fd;executed 110516 times by 28 tests: nfds = fd; Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| 110516 |
123 | }executed 113041 times by 29 tests: end of block Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFont
- tst_QMimeDatabase
- tst_QNetworkSession
- tst_QObject
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTextStream
- tst_QUuid
- tst_Selftests
- tst_qdbuscpp2xml
- tst_qdbusxml2cpp
- tst_qmake
- tst_qmakelib
- ...
| 113041 |
124 | | - |
125 | static int qt_create_pipe(int *pipe) | - |
126 | { | - |
127 | if (pipe[0] != -1)TRUE | never evaluated | FALSE | evaluated 9861 times by 38 testsEvaluated 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
- ...
|
| 0-9861 |
128 | qt_safe_close(pipe[0]); never executed: qt_safe_close(pipe[0]); | 0 |
129 | if (pipe[1] != -1)TRUE | never evaluated | FALSE | evaluated 9861 times by 38 testsEvaluated 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
- ...
|
| 0-9861 |
130 | qt_safe_close(pipe[1]); never executed: qt_safe_close(pipe[1]); | 0 |
131 | int pipe_ret = qt_safe_pipe(pipe); | - |
132 | if (pipe_ret != 0) {TRUE | never evaluated | FALSE | evaluated 9861 times by 38 testsEvaluated 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
- ...
|
| 0-9861 |
133 | qWarning("QProcessPrivate::createPipe: Cannot create pipe %p: %s", | - |
134 | pipe, qPrintable(qt_error_string(errno))); | - |
135 | } never executed: end of block | 0 |
136 | return pipe_ret;executed 9861 times by 38 tests: return pipe_ret; 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
- ...
| 9861 |
137 | } | - |
138 | | - |
139 | void QProcessPrivate::destroyPipe(int *pipe) | - |
140 | { | - |
141 | if (pipe[1] != -1) {TRUE | evaluated 2468 times by 38 testsEvaluated 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
- ...
| FALSE | evaluated 18075 times by 43 testsEvaluated 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
- ...
|
| 2468-18075 |
142 | qt_safe_close(pipe[1]); | - |
143 | pipe[1] = -1; | - |
144 | }executed 2468 times by 38 tests: end of block 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
- ...
| 2468 |
145 | if (pipe[0] != -1) {TRUE | evaluated 4917 times by 38 testsEvaluated 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
- ...
| FALSE | evaluated 15626 times by 43 testsEvaluated 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
- ...
|
| 4917-15626 |
146 | qt_safe_close(pipe[0]); | - |
147 | pipe[0] = -1; | - |
148 | }executed 4917 times by 38 tests: end of block 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
- ...
| 4917 |
149 | }executed 20543 times by 43 tests: end of block 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
- ...
| 20543 |
150 | | - |
151 | void QProcessPrivate::closeChannel(Channel *channel) | - |
152 | { | - |
153 | destroyPipe(channel->pipe); | - |
154 | }executed 16335 times by 43 tests: end of block 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
- ...
| 16335 |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
159 | | - |
160 | | - |
161 | bool QProcessPrivate::openChannel(Channel &channel) | - |
162 | { | - |
163 | Q_Q(QProcess); | - |
164 | | - |
165 | if (&channel == &stderrChannel && processChannelMode == QProcess::MergedChannels) {TRUE | evaluated 2473 times by 38 testsEvaluated 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
- ...
| FALSE | evaluated 4946 times by 38 testsEvaluated 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
- ...
|
TRUE | evaluated 16 times by 2 testsEvaluated by:- tst_QMimeDatabase
- tst_QProcess
| FALSE | evaluated 2457 times by 37 testsEvaluated 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_QNetworkReply
- tst_QNetworkSession
- tst_QObject
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- ...
|
| 16-4946 |
166 | channel.pipe[0] = -1; | - |
167 | channel.pipe[1] = -1; | - |
168 | return true;executed 16 times by 2 tests: return true; Executed by:- tst_QMimeDatabase
- tst_QProcess
| 16 |
169 | } | - |
170 | | - |
171 | if (channel.type == Channel::Normal) {TRUE | evaluated 7385 times by 38 testsEvaluated 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
- ...
| FALSE | evaluated 18 times by 1 test |
| 18-7385 |
172 | | - |
173 | if (qt_create_pipe(channel.pipe) != 0)TRUE | never evaluated | FALSE | evaluated 7385 times by 38 testsEvaluated 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
- ...
|
| 0-7385 |
174 | return false; never executed: return false; | 0 |
175 | | - |
176 | | - |
177 | if (threadData->hasEventDispatcher()) {TRUE | evaluated 7142 times by 36 testsEvaluated by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| FALSE | evaluated 243 times by 2 testsEvaluated by:- tst_QApplication
- tst_qdbuscpp2xml
|
| 243-7142 |
178 | if (&channel == &stdinChannel) {TRUE | evaluated 2387 times by 36 testsEvaluated by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| FALSE | evaluated 4755 times by 36 testsEvaluated by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
|
| 2387-4755 |
179 | channel.notifier = new QSocketNotifier(channel.pipe[1], | - |
180 | QSocketNotifier::Write, q); | - |
181 | channel.notifier->setEnabled(false); | - |
182 | QObject::connect(channel.notifier, SIGNAL(activated(int)), | - |
183 | q, SLOT(_q_canWrite())); | - |
184 | } else {executed 2387 times by 36 tests: end of block Executed by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| 2387 |
185 | channel.notifier = new QSocketNotifier(channel.pipe[0], | - |
186 | QSocketNotifier::Read, q); | - |
187 | const char *receiver; | - |
188 | if (&channel == &stdoutChannel)TRUE | evaluated 2382 times by 36 testsEvaluated by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| FALSE | evaluated 2373 times by 35 testsEvaluated by:- tst_Lancelot
- tst_QCommandLineParser
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFont
- tst_QLockFile
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QObject
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- tst_QUndoGroup
- ...
|
| 2373-2382 |
189 | receiver = SLOT(_q_canReadStandardOutput());executed 2382 times by 36 tests: receiver = qFlagLocation("1""_q_canReadStandardOutput()" "\0" __FILE__ ":" "189"); Executed by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| 2382 |
190 | else | - |
191 | receiver = SLOT(_q_canReadStandardError());executed 2373 times by 35 tests: receiver = qFlagLocation("1""_q_canReadStandardError()" "\0" __FILE__ ":" "191"); Executed by:- tst_Lancelot
- tst_QCommandLineParser
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFont
- tst_QLockFile
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QObject
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- tst_QUndoGroup
- ...
| 2373 |
192 | QObject::connect(channel.notifier, SIGNAL(activated(int)), | - |
193 | q, receiver); | - |
194 | }executed 4755 times by 36 tests: end of block Executed by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| 4755 |
195 | } | - |
196 | | - |
197 | return true;executed 7385 times by 38 tests: return true; 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
- ...
| 7385 |
198 | } else if (channel.type == Channel::Redirect) {TRUE | evaluated 12 times by 1 test | FALSE | evaluated 6 times by 1 test |
| 6-12 |
199 | | - |
200 | QByteArray fname = QFile::encodeName(channel.file); | - |
201 | | - |
202 | if (&channel == &stdinChannel) {TRUE | evaluated 2 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 2-10 |
203 | | - |
204 | channel.pipe[1] = -1; | - |
205 | if ( (channel.pipe[0] = qt_safe_open(fname, O_RDONLY)) != -1)TRUE | evaluated 2 times by 1 test | FALSE | never evaluated |
| 0-2 |
206 | return true; executed 2 times by 1 test: return true; | 2 |
207 | setErrorAndEmit(QProcess::FailedToStart, | - |
208 | QProcess::tr("Could not open input redirection for reading")); | - |
209 | } else { never executed: end of block | 0 |
210 | int mode = O_WRONLY | O_CREAT; | - |
211 | if (channel.append)TRUE | evaluated 3 times by 1 test | FALSE | evaluated 7 times by 1 test |
| 3-7 |
212 | mode |= O_APPEND;executed 3 times by 1 test: mode |= 02000; | 3 |
213 | else | - |
214 | mode |= O_TRUNC;executed 7 times by 1 test: mode |= 01000; | 7 |
215 | | - |
216 | channel.pipe[0] = -1; | - |
217 | if ( (channel.pipe[1] = qt_safe_open(fname, mode, 0666)) != -1)TRUE | evaluated 10 times by 1 test | FALSE | never evaluated |
| 0-10 |
218 | return true; executed 10 times by 1 test: return true; | 10 |
219 | | - |
220 | setErrorAndEmit(QProcess::FailedToStart, | - |
221 | QProcess::tr("Could not open input redirection for reading")); | - |
222 | } never executed: end of block | 0 |
223 | cleanup(); | - |
224 | return false; never executed: return false; | 0 |
225 | } else { | - |
226 | Q_ASSERT_X(channel.process, "QProcess::start", "Internal error"); | - |
227 | | - |
228 | Channel *source; | - |
229 | Channel *sink; | - |
230 | | - |
231 | if (channel.type == Channel::PipeSource) {TRUE | evaluated 3 times by 1 test | FALSE | evaluated 3 times by 1 test |
| 3 |
232 | | - |
233 | source = &channel; | - |
234 | sink = &channel.process->stdinChannel; | - |
235 | | - |
236 | Q_ASSERT(source == &stdoutChannel); | - |
237 | Q_ASSERT(sink->process == this && sink->type == Channel::PipeSink); | - |
238 | } else {executed 3 times by 1 test: end of block | 3 |
239 | | - |
240 | source = &channel.process->stdoutChannel; | - |
241 | sink = &channel; | - |
242 | | - |
243 | Q_ASSERT(sink == &stdinChannel); | - |
244 | Q_ASSERT(source->process == this && source->type == Channel::PipeSource); | - |
245 | }executed 3 times by 1 test: end of block | 3 |
246 | | - |
247 | if (source->pipe[1] != INVALID_Q_PIPE || sink->pipe[0] != INVALID_Q_PIPE) {TRUE | never evaluated | FALSE | evaluated 6 times by 1 test |
TRUE | evaluated 3 times by 1 test | FALSE | evaluated 3 times by 1 test |
| 0-6 |
248 | | - |
249 | return true;executed 3 times by 1 test: return true; | 3 |
250 | } else { | - |
251 | Q_ASSERT(source->pipe[0] == INVALID_Q_PIPE && source->pipe[1] == INVALID_Q_PIPE); | - |
252 | Q_ASSERT(sink->pipe[0] == INVALID_Q_PIPE && sink->pipe[1] == INVALID_Q_PIPE); | - |
253 | | - |
254 | Q_PIPE pipe[2] = { -1, -1 }; | - |
255 | if (qt_create_pipe(pipe) != 0)TRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
| 0-3 |
256 | return false; never executed: return false; | 0 |
257 | sink->pipe[0] = pipe[0]; | - |
258 | source->pipe[1] = pipe[1]; | - |
259 | | - |
260 | return true;executed 3 times by 1 test: return true; | 3 |
261 | } | - |
262 | } | - |
263 | } | - |
264 | | - |
265 | QT_BEGIN_INCLUDE_NAMESPACE | - |
266 | #if defined(Q_OS_MACX) | - |
267 | # include <crt_externs.h> | - |
268 | # define environ (*_NSGetEnviron()) | - |
269 | #else | - |
270 | extern char **environ; | - |
271 | #endif | - |
272 | QT_END_INCLUDE_NAMESPACE | - |
273 | | - |
274 | QProcessEnvironment QProcessEnvironment::systemEnvironment() | - |
275 | { | - |
276 | QProcessEnvironment env; | - |
277 | #if !defined(Q_OS_IOS) | - |
278 | const char *entry; | - |
279 | for (int count = 0; (entry = environ[count]); ++count) {TRUE | evaluated 301 times by 3 testsEvaluated by:- tst_QProcess
- tst_QProcessEnvironment
- tst_Selftests
| FALSE | evaluated 10 times by 3 testsEvaluated by:- tst_QProcess
- tst_QProcessEnvironment
- tst_Selftests
|
| 10-301 |
280 | const char *equal = strchr(entry, '='); | - |
281 | if (!equal)TRUE | never evaluated | FALSE | evaluated 301 times by 3 testsEvaluated by:- tst_QProcess
- tst_QProcessEnvironment
- tst_Selftests
|
| 0-301 |
282 | continue; never executed: continue; | 0 |
283 | | - |
284 | QByteArray name(entry, equal - entry); | - |
285 | QByteArray value(equal + 1); | - |
286 | env.d->hash.insert(QProcessEnvironmentPrivate::Key(name), | - |
287 | QProcessEnvironmentPrivate::Value(value)); | - |
288 | }executed 301 times by 3 tests: end of block Executed by:- tst_QProcess
- tst_QProcessEnvironment
- tst_Selftests
| 301 |
289 | #endif | - |
290 | return env;executed 10 times by 3 tests: return env; Executed by:- tst_QProcess
- tst_QProcessEnvironment
- tst_Selftests
| 10 |
291 | } | - |
292 | | - |
293 | static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environment, int *envc) | - |
294 | { | - |
295 | *envc = 0; | - |
296 | if (environment.isEmpty())TRUE | never evaluated | FALSE | evaluated 994 times by 6 testsEvaluated by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
|
| 0-994 |
297 | return 0; never executed: return 0; | 0 |
298 | | - |
299 | char **envp = new char *[environment.count() + 2]; | - |
300 | envp[environment.count()] = 0; | - |
301 | envp[environment.count() + 1] = 0; | - |
302 | | - |
303 | QProcessEnvironmentPrivate::Hash::ConstIterator it = environment.constBegin(); | - |
304 | const QProcessEnvironmentPrivate::Hash::ConstIterator end = environment.constEnd(); | - |
305 | for ( ; it != end; ++it) {TRUE | evaluated 14601 times by 6 testsEvaluated by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
| FALSE | evaluated 994 times by 6 testsEvaluated by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
|
| 994-14601 |
306 | QByteArray key = it.key().key; | - |
307 | QByteArray value = it.value().bytes(); | - |
308 | key.reserve(key.length() + 1 + value.length()); | - |
309 | key.append('='); | - |
310 | key.append(value); | - |
311 | | - |
312 | envp[(*envc)++] = ::strdup(key.constData()); | - |
313 | }executed 14601 times by 6 tests: end of block Executed by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
| 14601 |
314 | | - |
315 | return envp;executed 994 times by 6 tests: return envp; Executed by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
| 994 |
316 | } | - |
317 | | - |
318 | void QProcessPrivate::startProcess() | - |
319 | { | - |
320 | Q_Q(QProcess); | - |
321 | | - |
322 | #if defined (QPROCESS_DEBUG) | - |
323 | qDebug("QProcessPrivate::startProcess()"); | - |
324 | #endif | - |
325 | | - |
326 | | - |
327 | if (!openChannel(stdinChannel) ||TRUE | never evaluated | FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 0-2473 |
328 | !openChannel(stdoutChannel) ||TRUE | never evaluated | FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 0-2473 |
329 | !openChannel(stderrChannel) ||TRUE | never evaluated | FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 0-2473 |
330 | qt_create_pipe(childStartedPipe) != 0) {TRUE | never evaluated | FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 0-2473 |
331 | setErrorAndEmit(QProcess::FailedToStart, qt_error_string(errno)); | - |
332 | cleanup(); | - |
333 | return; never executed: return; | 0 |
334 | } | - |
335 | | - |
336 | if (threadData->hasEventDispatcher()) {TRUE | evaluated 2392 times by 36 testsEvaluated by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| FALSE | evaluated 81 times by 2 testsEvaluated by:- tst_QApplication
- tst_qdbuscpp2xml
|
| 81-2392 |
337 | startupSocketNotifier = new QSocketNotifier(childStartedPipe[0], | - |
338 | QSocketNotifier::Read, q); | - |
339 | QObject::connect(startupSocketNotifier, SIGNAL(activated(int)), | - |
340 | q, SLOT(_q_startupNotification())); | - |
341 | }executed 2392 times by 36 tests: end of block Executed by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| 2392 |
342 | | - |
343 | | - |
344 | q->setProcessState(QProcess::Starting); | - |
345 | | - |
346 | | - |
347 | | - |
348 | char **argv = new char *[arguments.count() + 2]; | - |
349 | argv[arguments.count() + 1] = 0; | - |
350 | | - |
351 | | - |
352 | QByteArray encodedProgramName = QFile::encodeName(program); | - |
353 | #ifdef Q_OS_MAC | - |
354 | | - |
355 | QFileInfo fileInfo(program); | - |
356 | if (encodedProgramName.endsWith(".app") && fileInfo.isDir()) { | - |
357 | QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, | - |
358 | QCFString(fileInfo.absoluteFilePath()), | - |
359 | kCFURLPOSIXPathStyle, true); | - |
360 | { | - |
361 | | - |
362 | | - |
363 | static QBasicMutex cfbundleMutex; | - |
364 | QMutexLocker lock(&cfbundleMutex); | - |
365 | QCFType<CFBundleRef> bundle = CFBundleCreate(0, url); | - |
366 | | - |
367 | QCFType<CFURLRef> executableURL = CFBundleCopyExecutableURL(bundle); | - |
368 | | - |
369 | url = CFURLCopyAbsoluteURL(executableURL); | - |
370 | } | - |
371 | if (url) { | - |
372 | const QCFString str = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle); | - |
373 | encodedProgramName += (QDir::separator() + QDir(program).relativeFilePath(QCFString::toQString(str))).toUtf8(); | - |
374 | } | - |
375 | } | - |
376 | #endif | - |
377 | | - |
378 | | - |
379 | char *dupProgramName = ::strdup(encodedProgramName.constData()); | - |
380 | argv[0] = dupProgramName; | - |
381 | | - |
382 | | - |
383 | for (int i = 0; i < arguments.count(); ++i)TRUE | evaluated 4043 times by 26 testsEvaluated by:- tst_Lancelot
- tst_QCommandLineParser
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFile
- tst_QFont
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
- tst_Selftests
- tst_qdbuscpp2xml
- tst_qdbusxml2cpp
- tst_qmake
- tst_qmakelib
- tst_rcc
- ...
| FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 2473-4043 |
384 | argv[i + 1] = ::strdup(QFile::encodeName(arguments.at(i)).constData());executed 4043 times by 26 tests: argv[i + 1] = ::strdup(QFile::encodeName(arguments.at(i)).constData()); Executed by:- tst_Lancelot
- tst_QCommandLineParser
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFile
- tst_QFont
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
- tst_Selftests
- tst_qdbuscpp2xml
- tst_qdbusxml2cpp
- tst_qmake
- tst_qmakelib
- tst_rcc
- ...
| 4043 |
385 | | - |
386 | | - |
387 | int envc = 0; | - |
388 | char **envp = 0; | - |
389 | if (environment.d.constData()) {TRUE | evaluated 994 times by 6 testsEvaluated by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
| FALSE | evaluated 1479 times by 34 testsEvaluated 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
- ...
|
| 994-1479 |
390 | QProcessEnvironmentPrivate::MutexLocker locker(environment.d); | - |
391 | envp = _q_dupEnvironment(environment.d.constData()->hash, &envc); | - |
392 | }executed 994 times by 6 tests: end of block Executed by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
| 994 |
393 | | - |
394 | | - |
395 | const char *workingDirPtr = 0; | - |
396 | QByteArray encodedWorkingDirectory; | - |
397 | if (!workingDirectory.isEmpty()) {TRUE | evaluated 263 times by 4 testsEvaluated by:- tst_Lancelot
- tst_QProcess
- tst_QSharedPointer
- tst_qmakelib
| FALSE | evaluated 2210 times by 36 testsEvaluated 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_QSystemSemaphore
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- ...
|
| 263-2210 |
398 | encodedWorkingDirectory = QFile::encodeName(workingDirectory); | - |
399 | workingDirPtr = encodedWorkingDirectory.constData(); | - |
400 | }executed 263 times by 4 tests: end of block Executed by:- tst_Lancelot
- tst_QProcess
- tst_QSharedPointer
- tst_qmakelib
| 263 |
401 | | - |
402 | | - |
403 | | - |
404 | char **path = 0; | - |
405 | int pathc = 0; | - |
406 | if (!program.contains(QLatin1Char('/'))) {TRUE | evaluated 282 times by 7 testsEvaluated by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| FALSE | evaluated 2191 times by 34 testsEvaluated by:- tst_QApplication
- tst_QCommandLineParser
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- 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
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
- tst_QUuid
- ...
|
| 282-2191 |
407 | const QString pathEnv = QString::fromLocal8Bit(qgetenv("PATH")); | - |
408 | if (!pathEnv.isEmpty()) {TRUE | evaluated 282 times by 7 testsEvaluated by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| FALSE | never evaluated |
| 0-282 |
409 | QStringList pathEntries = pathEnv.split(QLatin1Char(':'), QString::SkipEmptyParts); | - |
410 | if (!pathEntries.isEmpty()) {TRUE | evaluated 282 times by 7 testsEvaluated by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| FALSE | never evaluated |
| 0-282 |
411 | pathc = pathEntries.size(); | - |
412 | path = new char *[pathc + 1]; | - |
413 | path[pathc] = 0; | - |
414 | | - |
415 | for (int k = 0; k < pathEntries.size(); ++k) {TRUE | evaluated 3666 times by 7 testsEvaluated by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| FALSE | evaluated 282 times by 7 testsEvaluated by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
|
| 282-3666 |
416 | QByteArray tmp = QFile::encodeName(pathEntries.at(k)); | - |
417 | if (!tmp.endsWith('/')) tmp += '/';executed 3666 times by 7 tests: tmp += '/'; Executed by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
TRUE | evaluated 3666 times by 7 testsEvaluated by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| FALSE | never evaluated |
| 0-3666 |
418 | tmp += encodedProgramName; | - |
419 | path[k] = ::strdup(tmp.constData()); | - |
420 | }executed 3666 times by 7 tests: end of block Executed by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| 3666 |
421 | }executed 282 times by 7 tests: end of block Executed by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| 282 |
422 | }executed 282 times by 7 tests: end of block Executed by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| 282 |
423 | }executed 282 times by 7 tests: end of block Executed by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| 282 |
424 | | - |
425 | | - |
426 | pid_t childPid; | - |
427 | forkfd = ::forkfd(FFD_CLOEXEC, &childPid); | - |
428 | int lastForkErrno = errno; | - |
429 | if (forkfd != FFD_CHILD_PROCESS) {TRUE | evaluated 2473 times by 38 testsEvaluated 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
- ...
| FALSE | never evaluated |
| 0-2473 |
430 | | - |
431 | | - |
432 | free(dupProgramName); | - |
433 | for (int i = 1; i <= arguments.count(); ++i)TRUE | evaluated 4043 times by 26 testsEvaluated by:- tst_Lancelot
- tst_QCommandLineParser
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFile
- tst_QFont
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
- tst_Selftests
- tst_qdbuscpp2xml
- tst_qdbusxml2cpp
- tst_qmake
- tst_qmakelib
- tst_rcc
- ...
| FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 2473-4043 |
434 | free(argv[i]);executed 4043 times by 26 tests: free(argv[i]); Executed by:- tst_Lancelot
- tst_QCommandLineParser
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFile
- tst_QFont
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
- tst_Selftests
- tst_qdbuscpp2xml
- tst_qdbusxml2cpp
- tst_qmake
- tst_qmakelib
- tst_rcc
- ...
| 4043 |
435 | for (int i = 0; i < envc; ++i)TRUE | evaluated 14601 times by 6 testsEvaluated by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
| FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 2473-14601 |
436 | free(envp[i]);executed 14601 times by 6 tests: free(envp[i]); Executed by:- tst_QProcess
- tst_QSharedPointer
- tst_Selftests
- tst_qmake
- tst_qmakelib
- tst_qmessagehandler
| 14601 |
437 | for (int i = 0; i < pathc; ++i)TRUE | evaluated 3666 times by 7 testsEvaluated by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 2473-3666 |
438 | free(path[i]);executed 3666 times by 7 tests: free(path[i]); Executed by:- tst_Lancelot
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- tst_QProcess
- tst_QSharedPointer
- tst_qmake
| 3666 |
439 | delete [] argv; | - |
440 | delete [] envp; | - |
441 | delete [] path; | - |
442 | }executed 2473 times by 38 tests: end of block 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
- ...
| 2473 |
443 | | - |
444 | | - |
445 | | - |
446 | | - |
447 | | - |
448 | if (forkfd == -1) {TRUE | never evaluated | FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 0-2473 |
449 | | - |
450 | #if defined (QPROCESS_DEBUG) | - |
451 | qDebug("fork failed: %s", qPrintable(qt_error_string(lastForkErrno))); | - |
452 | #endif | - |
453 | q->setProcessState(QProcess::NotRunning); | - |
454 | setErrorAndEmit(QProcess::FailedToStart, | - |
455 | QProcess::tr("Resource error (fork failure): %1").arg(qt_error_string(lastForkErrno))); | - |
456 | cleanup(); | - |
457 | return; never executed: return; | 0 |
458 | } | - |
459 | | - |
460 | | - |
461 | if (forkfd == FFD_CHILD_PROCESS) {TRUE | never evaluated | FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 0-2473 |
462 | execChild(workingDirPtr, path, argv, envp); | - |
463 | ::_exit(-1); | - |
464 | } never executed: end of block | 0 |
465 | | - |
466 | pid = Q_PID(childPid); | - |
467 | | - |
468 | | - |
469 | | - |
470 | qt_safe_close(childStartedPipe[1]); | - |
471 | childStartedPipe[1] = -1; | - |
472 | | - |
473 | if (stdinChannel.pipe[0] != -1) {TRUE | evaluated 2473 times by 38 testsEvaluated 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
- ...
| FALSE | never evaluated |
| 0-2473 |
474 | qt_safe_close(stdinChannel.pipe[0]); | - |
475 | stdinChannel.pipe[0] = -1; | - |
476 | }executed 2473 times by 38 tests: end of block 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
- ...
| 2473 |
477 | | - |
478 | if (stdinChannel.pipe[1] != -1)TRUE | evaluated 2468 times by 38 testsEvaluated 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
- ...
| FALSE | evaluated 5 times by 1 test |
| 5-2468 |
479 | ::fcntl(stdinChannel.pipe[1], F_SETFL, ::fcntl(stdinChannel.pipe[1], F_GETFL) | O_NONBLOCK);executed 2468 times by 38 tests: ::fcntl(stdinChannel.pipe[1], 4, ::fcntl(stdinChannel.pipe[1], 3) | 04000); 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
- ...
| 2468 |
480 | | - |
481 | if (stdoutChannel.pipe[1] != -1) {TRUE | evaluated 2473 times by 38 testsEvaluated 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
- ...
| FALSE | never evaluated |
| 0-2473 |
482 | qt_safe_close(stdoutChannel.pipe[1]); | - |
483 | stdoutChannel.pipe[1] = -1; | - |
484 | }executed 2473 times by 38 tests: end of block 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
- ...
| 2473 |
485 | | - |
486 | if (stdoutChannel.pipe[0] != -1)TRUE | evaluated 2463 times by 38 testsEvaluated 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
- ...
| FALSE | evaluated 10 times by 1 test |
| 10-2463 |
487 | ::fcntl(stdoutChannel.pipe[0], F_SETFL, ::fcntl(stdoutChannel.pipe[0], F_GETFL) | O_NONBLOCK);executed 2463 times by 38 tests: ::fcntl(stdoutChannel.pipe[0], 4, ::fcntl(stdoutChannel.pipe[0], 3) | 04000); 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
- ...
| 2463 |
488 | | - |
489 | if (stderrChannel.pipe[1] != -1) {TRUE | evaluated 2457 times by 37 testsEvaluated 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_QNetworkReply
- tst_QNetworkSession
- tst_QObject
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- ...
| FALSE | evaluated 16 times by 2 testsEvaluated by:- tst_QMimeDatabase
- tst_QProcess
|
| 16-2457 |
490 | qt_safe_close(stderrChannel.pipe[1]); | - |
491 | stderrChannel.pipe[1] = -1; | - |
492 | }executed 2457 times by 37 tests: end of block 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_QNetworkReply
- tst_QNetworkSession
- tst_QObject
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- ...
| 2457 |
493 | if (stderrChannel.pipe[0] != -1)TRUE | evaluated 2454 times by 37 testsEvaluated 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_QNetworkReply
- tst_QNetworkSession
- tst_QObject
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- ...
| FALSE | evaluated 19 times by 2 testsEvaluated by:- tst_QMimeDatabase
- tst_QProcess
|
| 19-2454 |
494 | ::fcntl(stderrChannel.pipe[0], F_SETFL, ::fcntl(stderrChannel.pipe[0], F_GETFL) | O_NONBLOCK);executed 2454 times by 37 tests: ::fcntl(stderrChannel.pipe[0], 4, ::fcntl(stderrChannel.pipe[0], 3) | 04000); 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_QNetworkReply
- tst_QNetworkSession
- tst_QObject
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedMemory
- tst_QSharedPointer
- tst_QSystemSemaphore
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- ...
| 2454 |
495 | | - |
496 | if (threadData->eventDispatcher) {TRUE | evaluated 2392 times by 36 testsEvaluated by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| FALSE | evaluated 81 times by 2 testsEvaluated by:- tst_QApplication
- tst_qdbuscpp2xml
|
| 81-2392 |
497 | deathNotifier = new QSocketNotifier(forkfd, QSocketNotifier::Read, q); | - |
498 | QObject::connect(deathNotifier, SIGNAL(activated(int)), | - |
499 | q, SLOT(_q_processDied())); | - |
500 | }executed 2392 times by 36 tests: end of block Executed by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| 2392 |
501 | }executed 2473 times by 38 tests: end of block 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
- ...
| 2473 |
502 | | - |
503 | void QProcessPrivate::execChild(const char *workingDir, char **path, char **argv, char **envp) | - |
504 | { | - |
505 | ::signal(SIGPIPE, SIG_DFL); | - |
506 | | - |
507 | Q_Q(QProcess); | - |
508 | | - |
509 | | - |
510 | if (inputChannelMode != QProcess::ForwardedInputChannel)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
511 | qt_safe_dup2(stdinChannel.pipe[0], STDIN_FILENO, 0); never executed: qt_safe_dup2(stdinChannel.pipe[0], 0, 0); | 0 |
512 | | - |
513 | | - |
514 | if (processChannelMode != QProcess::ForwardedChannels) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
515 | if (processChannelMode != QProcess::ForwardedOutputChannel)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
516 | qt_safe_dup2(stdoutChannel.pipe[1], STDOUT_FILENO, 0); never executed: qt_safe_dup2(stdoutChannel.pipe[1], 1, 0); | 0 |
517 | | - |
518 | | - |
519 | if (processChannelMode == QProcess::MergedChannels) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
520 | qt_safe_dup2(STDOUT_FILENO, STDERR_FILENO, 0); | - |
521 | } else if (processChannelMode != QProcess::ForwardedErrorChannel) { never executed: end of block TRUE | never evaluated | FALSE | never evaluated |
| 0 |
522 | qt_safe_dup2(stderrChannel.pipe[1], STDERR_FILENO, 0); | - |
523 | } never executed: end of block | 0 |
524 | } never executed: end of block | 0 |
525 | | - |
526 | | - |
527 | qt_safe_close(childStartedPipe[0]); | - |
528 | | - |
529 | | - |
530 | if (workingDir && QT_CHDIR(workingDir) == -1) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
531 | | - |
532 | goto report_errno; never executed: goto report_errno; | 0 |
533 | } | - |
534 | | - |
535 | | - |
536 | q->setupChildProcess(); | - |
537 | | - |
538 | | - |
539 | if (!envp) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
540 | qt_safe_execvp(argv[0], argv); | - |
541 | } else { never executed: end of block | 0 |
542 | if (path) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
543 | char **arg = path; | - |
544 | while (*arg) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
545 | argv[0] = *arg; | - |
546 | #if defined (QPROCESS_DEBUG) | - |
547 | fprintf(stderr, "QProcessPrivate::execChild() searching / starting %s\n", argv[0]); | - |
548 | #endif | - |
549 | qt_safe_execve(argv[0], argv, envp); | - |
550 | ++arg; | - |
551 | } never executed: end of block | 0 |
552 | } else { never executed: end of block | 0 |
553 | #if defined (QPROCESS_DEBUG) | - |
554 | fprintf(stderr, "QProcessPrivate::execChild() starting %s\n", argv[0]); | - |
555 | #endif | - |
556 | qt_safe_execve(argv[0], argv, envp); | - |
557 | } never executed: end of block | 0 |
558 | } | - |
559 | | - |
560 | | - |
561 | report_errno: code before this statement never executed: report_errno: | 0 |
562 | QString error = qt_error_string(errno); | - |
563 | #if defined (QPROCESS_DEBUG) | - |
564 | fprintf(stderr, "QProcessPrivate::execChild() failed (%s), notifying parent process\n", qPrintable(error)); | - |
565 | #endif | - |
566 | qt_safe_write(childStartedPipe[1], error.data(), error.length() * sizeof(QChar)); | - |
567 | qt_safe_close(childStartedPipe[1]); | - |
568 | childStartedPipe[1] = -1; | - |
569 | } never executed: end of block | 0 |
570 | | - |
571 | bool QProcessPrivate::processStarted(QString *errorMessage) | - |
572 | { | - |
573 | ushort buf[errorBufferMax]; | - |
574 | int i = qt_safe_read(childStartedPipe[0], &buf, sizeof buf); | - |
575 | if (startupSocketNotifier) {TRUE | evaluated 2392 times by 36 testsEvaluated by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| FALSE | evaluated 81 times by 2 testsEvaluated by:- tst_QApplication
- tst_qdbuscpp2xml
|
| 81-2392 |
576 | startupSocketNotifier->setEnabled(false); | - |
577 | startupSocketNotifier->deleteLater(); | - |
578 | startupSocketNotifier = 0; | - |
579 | }executed 2392 times by 36 tests: end of block Executed by:- tst_Lancelot
- 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
- tst_QUdpSocket
- ...
| 2392 |
580 | qt_safe_close(childStartedPipe[0]); | - |
581 | childStartedPipe[0] = -1; | - |
582 | | - |
583 | #if defined (QPROCESS_DEBUG) | - |
584 | qDebug("QProcessPrivate::processStarted() == %s", i <= 0 ? "true" : "false"); | - |
585 | #endif | - |
586 | | - |
587 | | - |
588 | if ((i > 0) && errorMessage)TRUE | evaluated 704 times by 11 testsEvaluated by:- tst_QCommandLineParser
- tst_QFile
- tst_QLockFile
- tst_QProcess
- tst_QSharedPointer
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
| FALSE | evaluated 1769 times by 29 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFont
- tst_QMimeDatabase
- tst_QNetworkReply
- 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_qmake
- tst_qmakelib
- ...
|
TRUE | evaluated 704 times by 11 testsEvaluated by:- tst_QCommandLineParser
- tst_QFile
- tst_QLockFile
- tst_QProcess
- tst_QSharedPointer
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
| FALSE | never evaluated |
| 0-1769 |
589 | *errorMessage = QString((const QChar *)buf, i / sizeof(QChar));executed 704 times by 11 tests: *errorMessage = QString((const QChar *)buf, i / sizeof(QChar)); Executed by:- tst_QCommandLineParser
- tst_QFile
- tst_QLockFile
- tst_QProcess
- tst_QSharedPointer
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
| 704 |
590 | | - |
591 | return i <= 0;executed 2473 times by 38 tests: return i <= 0; 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
- ...
| 2473 |
592 | } | - |
593 | | - |
594 | qint64 QProcessPrivate::bytesAvailableInChannel(const Channel *channel) const | - |
595 | { | - |
596 | Q_ASSERT(channel->pipe[0] != INVALID_Q_PIPE); | - |
597 | int nbytes = 0; | - |
598 | qint64 available = 0; | - |
599 | if (::ioctl(channel->pipe[0], FIONREAD, (char *) &nbytes) >= 0)TRUE | evaluated 38181 times by 29 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFont
- tst_QMimeDatabase
- tst_QNetworkReply
- 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_qmake
- tst_qmakelib
- ...
| FALSE | never evaluated |
| 0-38181 |
600 | available = (qint64) nbytes;executed 38181 times by 29 tests: available = (qint64) nbytes; Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFont
- tst_QMimeDatabase
- tst_QNetworkReply
- 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_qmake
- tst_qmakelib
- ...
| 38181 |
601 | #if defined (QPROCESS_DEBUG) | - |
602 | qDebug("QProcessPrivate::bytesAvailableInChannel(%d) == %lld", int(channel - &stdinChannel), available); | - |
603 | #endif | - |
604 | return available;executed 38181 times by 29 tests: return available; Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFont
- tst_QMimeDatabase
- tst_QNetworkReply
- 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_qmake
- tst_qmakelib
- ...
| 38181 |
605 | } | - |
606 | | - |
607 | qint64 QProcessPrivate::readFromChannel(const Channel *channel, char *data, qint64 maxlen) | - |
608 | { | - |
609 | Q_ASSERT(channel->pipe[0] != INVALID_Q_PIPE); | - |
610 | qint64 bytesRead = qt_safe_read(channel->pipe[0], data, maxlen); | - |
611 | #if defined QPROCESS_DEBUG | - |
612 | int save_errno = errno; | - |
613 | qDebug("QProcessPrivate::readFromChannel(%d, %p \"%s\", %lld) == %lld", | - |
614 | int(channel - &stdinChannel), | - |
615 | data, qt_prettyDebug(data, bytesRead, 16).constData(), maxlen, bytesRead); | - |
616 | errno = save_errno; | - |
617 | #endif | - |
618 | if (bytesRead == -1 && errno == EWOULDBLOCK)TRUE | evaluated 2 times by 1 test | FALSE | evaluated 38179 times by 29 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFont
- tst_QMimeDatabase
- tst_QNetworkReply
- 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_qmake
- tst_qmakelib
- ...
|
TRUE | evaluated 2 times by 1 test | FALSE | never evaluated |
| 0-38179 |
619 | return -2;executed 2 times by 1 test: return -2; | 2 |
620 | return bytesRead;executed 38179 times by 29 tests: return bytesRead; Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDir
- tst_QFont
- tst_QMimeDatabase
- tst_QNetworkReply
- 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_qmake
- tst_qmakelib
- ...
| 38179 |
621 | } | - |
622 | | - |
623 | bool QProcessPrivate::writeToStdin() | - |
624 | { | - |
625 | const char *data = stdinChannel.buffer.readPointer(); | - |
626 | const qint64 bytesToWrite = stdinChannel.buffer.nextDataBlockSize(); | - |
627 | | - |
628 | qint64 written = qt_safe_write_nosignal(stdinChannel.pipe[1], data, bytesToWrite); | - |
629 | #if defined QPROCESS_DEBUG | - |
630 | qDebug("QProcessPrivate::writeToStdin(), write(%p \"%s\", %lld) == %lld", | - |
631 | data, qt_prettyDebug(data, bytesToWrite, 16).constData(), bytesToWrite, written); | - |
632 | if (written == -1) | - |
633 | qDebug("QProcessPrivate::writeToStdin(), failed to write (%s)", qPrintable(qt_error_string(errno))); | - |
634 | #endif | - |
635 | if (written == -1) {TRUE | evaluated 5 times by 1 test | FALSE | evaluated 624 times by 6 testsEvaluated by:- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
- tst_qdbusxml2cpp
- tst_qprocess - unknown status
|
| 5-624 |
636 | | - |
637 | | - |
638 | | - |
639 | if (errno == EAGAIN)TRUE | never evaluated | FALSE | evaluated 5 times by 1 test |
| 0-5 |
640 | return true; never executed: return true; | 0 |
641 | | - |
642 | closeChannel(&stdinChannel); | - |
643 | setErrorAndEmit(QProcess::WriteError); | - |
644 | return false;executed 5 times by 1 test: return false; | 5 |
645 | } | - |
646 | stdinChannel.buffer.free(written); | - |
647 | if (!emittedBytesWritten && written != 0) {TRUE | evaluated 623 times by 6 testsEvaluated by:- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
- tst_qdbusxml2cpp
- tst_qprocess - unknown status
| FALSE | evaluated 1 time by 1 test |
TRUE | evaluated 623 times by 6 testsEvaluated by:- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
- tst_qdbusxml2cpp
- tst_qprocess - unknown status
| FALSE | never evaluated |
| 0-623 |
648 | emittedBytesWritten = true; | - |
649 | emit q_func()->bytesWritten(written); | - |
650 | emittedBytesWritten = false; | - |
651 | }executed 623 times by 6 tests: end of block Executed by:- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
- tst_qdbusxml2cpp
- tst_qprocess - unknown status
| 623 |
652 | return true;executed 624 times by 6 tests: return true; Executed by:- tst_QNetworkReply
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
- tst_qdbusxml2cpp
- tst_qprocess - unknown status
| 624 |
653 | } | - |
654 | | - |
655 | void QProcessPrivate::terminateProcess() | - |
656 | { | - |
657 | #if defined (QPROCESS_DEBUG) | - |
658 | qDebug("QProcessPrivate::terminateProcess()"); | - |
659 | #endif | - |
660 | if (pid)TRUE | evaluated 12 times by 3 testsEvaluated by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
| FALSE | never evaluated |
| 0-12 |
661 | ::kill(pid_t(pid), SIGTERM);executed 12 times by 3 tests: ::kill(pid_t(pid), 15); Executed by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
| 12 |
662 | }executed 12 times by 3 tests: end of block Executed by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
| 12 |
663 | | - |
664 | void QProcessPrivate::killProcess() | - |
665 | { | - |
666 | #if defined (QPROCESS_DEBUG) | - |
667 | qDebug("QProcessPrivate::killProcess()"); | - |
668 | #endif | - |
669 | if (pid)TRUE | evaluated 11 times by 3 testsEvaluated by:- tst_QNetworkSession
- tst_QProcess
- tst_QSystemSemaphore
| FALSE | evaluated 4 times by 4 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusInterface
- tst_QDBusMarshall
|
| 4-11 |
670 | ::kill(pid_t(pid), SIGKILL);executed 11 times by 3 tests: ::kill(pid_t(pid), 9); Executed by:- tst_QNetworkSession
- tst_QProcess
- tst_QSystemSemaphore
| 11 |
671 | }executed 15 times by 7 tests: end of block Executed by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QNetworkSession
- tst_QProcess
- tst_QSystemSemaphore
| 15 |
672 | | - |
673 | bool QProcessPrivate::waitForStarted(int msecs) | - |
674 | { | - |
675 | #if defined (QPROCESS_DEBUG) | - |
676 | qDebug("QProcessPrivate::waitForStarted(%d) waiting for child to start (fd = %d)", msecs, | - |
677 | childStartedPipe[0]); | - |
678 | #endif | - |
679 | | - |
680 | fd_set fds; | - |
681 | FD_ZERO(&fds); | - |
682 | FD_SET(childStartedPipe[0], &fds); | - |
683 | if (qt_select_msecs(childStartedPipe[0] + 1, &fds, 0, msecs) == 0) {TRUE | never evaluated | FALSE | evaluated 2246 times by 36 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QCommandLineParser
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- 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
- tst_QUdpSocket
- tst_QUndoGroup
- ...
|
| 0-2246 |
684 | setError(QProcess::Timedout); | - |
685 | #if defined (QPROCESS_DEBUG) | - |
686 | qDebug("QProcessPrivate::waitForStarted(%d) == false (timed out)", msecs); | - |
687 | #endif | - |
688 | return false; never executed: return false; | 0 |
689 | } | - |
690 | | - |
691 | bool startedEmitted = _q_startupNotification(); | - |
692 | #if defined (QPROCESS_DEBUG) | - |
693 | qDebug("QProcessPrivate::waitForStarted() == %s", startedEmitted ? "true" : "false"); | - |
694 | #endif | - |
695 | return startedEmitted;executed 2246 times by 36 tests: return startedEmitted; Executed by:- tst_Lancelot
- tst_QApplication
- tst_QCommandLineParser
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- 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
- tst_QUdpSocket
- tst_QUndoGroup
- ...
| 2246 |
696 | } | - |
697 | | - |
698 | #ifdef Q_OS_BLACKBERRY | - |
699 | QList<QSocketNotifier *> QProcessPrivate::defaultNotifiers() const | - |
700 | { | - |
701 | QList<QSocketNotifier *> notifiers; | - |
702 | notifiers << stdoutChannel.notifier | - |
703 | << stderrChannel.notifier | - |
704 | << stdinChannel.notifier; | - |
705 | return notifiers; | - |
706 | } | - |
707 | #endif // Q_OS_BLACKBERRY | - |
708 | | - |
709 | bool QProcessPrivate::waitForReadyRead(int msecs) | - |
710 | { | - |
711 | #if defined (QPROCESS_DEBUG) | - |
712 | qDebug("QProcessPrivate::waitForReadyRead(%d)", msecs); | - |
713 | #endif | - |
714 | | - |
715 | QElapsedTimer stopWatch; | - |
716 | stopWatch.start(); | - |
717 | | - |
718 | #ifdef Q_OS_BLACKBERRY | - |
719 | QList<QSocketNotifier *> notifiers = defaultNotifiers(); | - |
720 | #endif | - |
721 | | - |
722 | forever { | - |
723 | fd_set fdread; | - |
724 | fd_set fdwrite; | - |
725 | | - |
726 | FD_ZERO(&fdread); | - |
727 | FD_ZERO(&fdwrite); | - |
728 | | - |
729 | int nfds = forkfd; | - |
730 | FD_SET(forkfd, &fdread); | - |
731 | | - |
732 | if (processState == QProcess::Starting)TRUE | evaluated 115 times by 4 testsEvaluated by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
- tst_QTextStream
| FALSE | evaluated 892 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
|
| 115-892 |
733 | add_fd(nfds, childStartedPipe[0], &fdread);executed 115 times by 4 tests: add_fd(nfds, childStartedPipe[0], &fdread); Executed by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
- tst_QTextStream
| 115 |
734 | | - |
735 | if (stdoutChannel.pipe[0] != -1)TRUE | evaluated 1006 times by 9 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
| FALSE | evaluated 1 time by 1 test |
| 1-1006 |
736 | add_fd(nfds, stdoutChannel.pipe[0], &fdread);executed 1006 times by 9 tests: add_fd(nfds, stdoutChannel.pipe[0], &fdread); Executed by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
| 1006 |
737 | if (stderrChannel.pipe[0] != -1)TRUE | evaluated 663 times by 9 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
| FALSE | evaluated 344 times by 5 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
|
| 344-663 |
738 | add_fd(nfds, stderrChannel.pipe[0], &fdread);executed 663 times by 9 tests: add_fd(nfds, stderrChannel.pipe[0], &fdread); Executed by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
| 663 |
739 | | - |
740 | if (!stdinChannel.buffer.isEmpty() && stdinChannel.pipe[1] != -1)TRUE | evaluated 217 times by 2 testsEvaluated by:- tst_QProcess
- tst_QTextStream
| FALSE | evaluated 790 times by 9 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
|
TRUE | evaluated 217 times by 2 testsEvaluated by:- tst_QProcess
- tst_QTextStream
| FALSE | never evaluated |
| 0-790 |
741 | add_fd(nfds, stdinChannel.pipe[1], &fdwrite);executed 217 times by 2 tests: add_fd(nfds, stdinChannel.pipe[1], &fdwrite); Executed by:- tst_QProcess
- tst_QTextStream
| 217 |
742 | | - |
743 | int timeout = qt_subtract_from_timeout(msecs, stopWatch.elapsed()); | - |
744 | #ifdef Q_OS_BLACKBERRY | - |
745 | int ret = bb_select(notifiers, nfds + 1, &fdread, &fdwrite, timeout); | - |
746 | #else | - |
747 | int ret = qt_select_msecs(nfds + 1, &fdread, &fdwrite, timeout); | - |
748 | #endif | - |
749 | if (ret < 0) {TRUE | never evaluated | FALSE | evaluated 1007 times by 9 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
|
| 0-1007 |
750 | break; never executed: break; | 0 |
751 | } | - |
752 | if (ret == 0) {TRUE | evaluated 5 times by 1 test | FALSE | evaluated 1002 times by 9 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
|
| 5-1002 |
753 | setError(QProcess::Timedout); | - |
754 | return false;executed 5 times by 1 test: return false; | 5 |
755 | } | - |
756 | | - |
757 | if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {TRUE | evaluated 115 times by 4 testsEvaluated by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
- tst_QTextStream
| FALSE | evaluated 887 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
|
TRUE | evaluated 113 times by 4 testsEvaluated by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
- tst_QTextStream
| FALSE | evaluated 2 times by 2 testsEvaluated by:- tst_QProcess
- tst_QTextStream
|
| 2-887 |
758 | if (!_q_startupNotification())TRUE | evaluated 102 times by 2 testsEvaluated by:- tst_QProcess
- tst_QTextStream
| FALSE | evaluated 11 times by 3 testsEvaluated by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
|
| 11-102 |
759 | return false;executed 102 times by 2 tests: return false; Executed by:- tst_QProcess
- tst_QTextStream
| 102 |
760 | }executed 11 times by 3 tests: end of block Executed by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
| 11 |
761 | | - |
762 | bool readyReadEmitted = false; | - |
763 | if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread)) {TRUE | evaluated 899 times by 9 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
| FALSE | evaluated 1 time by 1 test |
TRUE | evaluated 620 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
| FALSE | evaluated 279 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QTextStream
|
| 1-899 |
764 | bool canRead = _q_canReadStandardOutput(); | - |
765 | if (processChannel == QProcess::StandardOutput && canRead)TRUE | evaluated 605 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
| FALSE | evaluated 15 times by 1 test |
TRUE | evaluated 604 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
| FALSE | evaluated 1 time by 1 test |
| 1-605 |
766 | readyReadEmitted = true;executed 604 times by 8 tests: readyReadEmitted = true; Executed by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
| 604 |
767 | }executed 620 times by 8 tests: end of block Executed by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
| 620 |
768 | if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread)) {TRUE | evaluated 556 times by 9 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
| FALSE | evaluated 344 times by 5 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
|
TRUE | evaluated 52 times by 5 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
| FALSE | evaluated 504 times by 5 testsEvaluated by:- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QTextStream
|
| 52-556 |
769 | bool canRead = _q_canReadStandardError(); | - |
770 | if (processChannel == QProcess::StandardError && canRead)TRUE | evaluated 22 times by 1 test | FALSE | evaluated 30 times by 5 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
|
TRUE | evaluated 22 times by 1 test | FALSE | never evaluated |
| 0-30 |
771 | readyReadEmitted = true;executed 22 times by 1 test: readyReadEmitted = true; | 22 |
772 | }executed 52 times by 5 tests: end of block Executed by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
| 52 |
773 | if (readyReadEmitted)TRUE | evaluated 626 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
| FALSE | evaluated 274 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QTextStream
|
| 274-626 |
774 | return true;executed 626 times by 8 tests: return true; Executed by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
| 626 |
775 | | - |
776 | if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))TRUE | evaluated 270 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QTextStream
| FALSE | evaluated 4 times by 1 test |
TRUE | evaluated 217 times by 2 testsEvaluated by:- tst_QProcess
- tst_QTextStream
| FALSE | evaluated 53 times by 7 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
|
| 4-270 |
777 | _q_canWrite();executed 217 times by 2 tests: _q_canWrite(); Executed by:- tst_QProcess
- tst_QTextStream
| 217 |
778 | | - |
779 | if (forkfd == -1 || FD_ISSET(forkfd, &fdread)) {TRUE | never evaluated | FALSE | evaluated 274 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QTextStream
|
TRUE | evaluated 1 time by 1 test | FALSE | evaluated 273 times by 8 testsEvaluated by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QTextStream
|
| 0-274 |
780 | if (_q_processDied())TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
781 | return false;executed 1 time by 1 test: return false; | 1 |
782 | } never executed: end of block | 0 |
783 | }executed 273 times by 8 tests: end of block Executed by:- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QProcess
- tst_QTextStream
| 273 |
784 | return false; never executed: return false; | 0 |
785 | } | - |
786 | | - |
787 | bool QProcessPrivate::waitForBytesWritten(int msecs) | - |
788 | { | - |
789 | #if defined (QPROCESS_DEBUG) | - |
790 | qDebug("QProcessPrivate::waitForBytesWritten(%d)", msecs); | - |
791 | #endif | - |
792 | | - |
793 | QElapsedTimer stopWatch; | - |
794 | stopWatch.start(); | - |
795 | | - |
796 | #ifdef Q_OS_BLACKBERRY | - |
797 | QList<QSocketNotifier *> notifiers = defaultNotifiers(); | - |
798 | #endif | - |
799 | | - |
800 | while (!stdinChannel.buffer.isEmpty()) {TRUE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
| FALSE | evaluated 1 time by 1 test |
| 1-151 |
801 | fd_set fdread; | - |
802 | fd_set fdwrite; | - |
803 | | - |
804 | FD_ZERO(&fdread); | - |
805 | FD_ZERO(&fdwrite); | - |
806 | | - |
807 | int nfds = forkfd; | - |
808 | FD_SET(forkfd, &fdread); | - |
809 | | - |
810 | if (processState == QProcess::Starting)TRUE | never evaluated | FALSE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
|
| 0-151 |
811 | add_fd(nfds, childStartedPipe[0], &fdread); never executed: add_fd(nfds, childStartedPipe[0], &fdread); | 0 |
812 | | - |
813 | if (stdoutChannel.pipe[0] != -1)TRUE | evaluated 149 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
| FALSE | evaluated 2 times by 1 test |
| 2-149 |
814 | add_fd(nfds, stdoutChannel.pipe[0], &fdread);executed 149 times by 2 tests: add_fd(nfds, stdoutChannel.pipe[0], &fdread); Executed by:- tst_QProcess
- tst_qdbusxml2cpp
| 149 |
815 | if (stderrChannel.pipe[0] != -1)TRUE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
| FALSE | never evaluated |
| 0-151 |
816 | add_fd(nfds, stderrChannel.pipe[0], &fdread);executed 151 times by 2 tests: add_fd(nfds, stderrChannel.pipe[0], &fdread); Executed by:- tst_QProcess
- tst_qdbusxml2cpp
| 151 |
817 | | - |
818 | | - |
819 | if (!stdinChannel.buffer.isEmpty() && stdinChannel.pipe[1] != -1)TRUE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
| FALSE | never evaluated |
TRUE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
| FALSE | never evaluated |
| 0-151 |
820 | add_fd(nfds, stdinChannel.pipe[1], &fdwrite);executed 151 times by 2 tests: add_fd(nfds, stdinChannel.pipe[1], &fdwrite); Executed by:- tst_QProcess
- tst_qdbusxml2cpp
| 151 |
821 | | - |
822 | int timeout = qt_subtract_from_timeout(msecs, stopWatch.elapsed()); | - |
823 | #ifdef Q_OS_BLACKBERRY | - |
824 | int ret = bb_select(notifiers, nfds + 1, &fdread, &fdwrite, timeout); | - |
825 | #else | - |
826 | int ret = qt_select_msecs(nfds + 1, &fdread, &fdwrite, timeout); | - |
827 | #endif | - |
828 | if (ret < 0) {TRUE | never evaluated | FALSE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
|
| 0-151 |
829 | break; never executed: break; | 0 |
830 | } | - |
831 | | - |
832 | if (ret == 0) {TRUE | never evaluated | FALSE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
|
| 0-151 |
833 | setError(QProcess::Timedout); | - |
834 | return false; never executed: return false; | 0 |
835 | } | - |
836 | | - |
837 | if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {TRUE | never evaluated | FALSE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
|
TRUE | never evaluated | FALSE | never evaluated |
| 0-151 |
838 | if (!_q_startupNotification())TRUE | never evaluated | FALSE | never evaluated |
| 0 |
839 | return false; never executed: return false; | 0 |
840 | } never executed: end of block | 0 |
841 | | - |
842 | if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))TRUE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
| FALSE | never evaluated |
TRUE | evaluated 151 times by 2 testsEvaluated by:- tst_QProcess
- tst_qdbusxml2cpp
| FALSE | never evaluated |
| 0-151 |
843 | return _q_canWrite();executed 151 times by 2 tests: return _q_canWrite(); Executed by:- tst_QProcess
- tst_qdbusxml2cpp
| 151 |
844 | | - |
845 | if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread))TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
846 | _q_canReadStandardOutput(); never executed: _q_canReadStandardOutput(); | 0 |
847 | | - |
848 | if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread))TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
849 | _q_canReadStandardError(); never executed: _q_canReadStandardError(); | 0 |
850 | | - |
851 | if (forkfd == -1 || FD_ISSET(forkfd, &fdread)) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
852 | if (_q_processDied())TRUE | never evaluated | FALSE | never evaluated |
| 0 |
853 | return false; never executed: return false; | 0 |
854 | } never executed: end of block | 0 |
855 | } never executed: end of block | 0 |
856 | | - |
857 | return false;executed 1 time by 1 test: return false; | 1 |
858 | } | - |
859 | | - |
860 | bool QProcessPrivate::waitForFinished(int msecs) | - |
861 | { | - |
862 | #if defined (QPROCESS_DEBUG) | - |
863 | qDebug("QProcessPrivate::waitForFinished(%d)", msecs); | - |
864 | #endif | - |
865 | | - |
866 | QElapsedTimer stopWatch; | - |
867 | stopWatch.start(); | - |
868 | | - |
869 | #ifdef Q_OS_BLACKBERRY | - |
870 | QList<QSocketNotifier *> notifiers = defaultNotifiers(); | - |
871 | #endif | - |
872 | | - |
873 | forever { | - |
874 | fd_set fdread; | - |
875 | fd_set fdwrite; | - |
876 | int nfds = -1; | - |
877 | | - |
878 | FD_ZERO(&fdread); | - |
879 | FD_ZERO(&fdwrite); | - |
880 | | - |
881 | if (processState == QProcess::Starting)TRUE | never evaluated | FALSE | evaluated 38470 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
|
| 0-38470 |
882 | add_fd(nfds, childStartedPipe[0], &fdread); never executed: add_fd(nfds, childStartedPipe[0], &fdread); | 0 |
883 | | - |
884 | if (stdoutChannel.pipe[0] != -1)TRUE | evaluated 36808 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| FALSE | evaluated 1662 times by 25 testsEvaluated 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
|
| 1662-36808 |
885 | add_fd(nfds, stdoutChannel.pipe[0], &fdread);executed 36808 times by 28 tests: add_fd(nfds, stdoutChannel.pipe[0], &fdread); Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| 36808 |
886 | if (stderrChannel.pipe[0] != -1)TRUE | evaluated 35238 times by 23 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFont
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
| FALSE | evaluated 3232 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
|
| 3232-35238 |
887 | add_fd(nfds, stderrChannel.pipe[0], &fdread);executed 35238 times by 23 tests: add_fd(nfds, stderrChannel.pipe[0], &fdread); Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFont
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
| 35238 |
888 | | - |
889 | if (processState == QProcess::Running && forkfd != -1)TRUE | evaluated 38470 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| FALSE | never evaluated |
TRUE | evaluated 38470 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| FALSE | never evaluated |
| 0-38470 |
890 | add_fd(nfds, forkfd, &fdread);executed 38470 times by 28 tests: add_fd(nfds, forkfd, &fdread); Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| 38470 |
891 | | - |
892 | if (!stdinChannel.buffer.isEmpty() && stdinChannel.pipe[1] != -1)TRUE | evaluated 78 times by 3 testsEvaluated by:- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_qprocess - unknown status
| FALSE | evaluated 38392 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
|
TRUE | evaluated 73 times by 3 testsEvaluated by:- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_qprocess - unknown status
| FALSE | evaluated 5 times by 1 test |
| 5-38392 |
893 | add_fd(nfds, stdinChannel.pipe[1], &fdwrite);executed 73 times by 3 tests: add_fd(nfds, stdinChannel.pipe[1], &fdwrite); Executed by:- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_qprocess - unknown status
| 73 |
894 | | - |
895 | int timeout = qt_subtract_from_timeout(msecs, stopWatch.elapsed()); | - |
896 | #ifdef Q_OS_BLACKBERRY | - |
897 | int ret = bb_select(notifiers, nfds + 1, &fdread, &fdwrite, timeout); | - |
898 | #else | - |
899 | int ret = qt_select_msecs(nfds + 1, &fdread, &fdwrite, timeout); | - |
900 | #endif | - |
901 | if (ret < 0) {TRUE | never evaluated | FALSE | evaluated 38470 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
|
| 0-38470 |
902 | break; never executed: break; | 0 |
903 | } | - |
904 | if (ret == 0) {TRUE | evaluated 4 times by 3 testsEvaluated by:- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSystemSemaphore
| FALSE | evaluated 38466 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
|
| 4-38466 |
905 | setError(QProcess::Timedout); | - |
906 | return false;executed 4 times by 3 tests: return false; Executed by:- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSystemSemaphore
| 4 |
907 | } | - |
908 | | - |
909 | if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {TRUE | never evaluated | FALSE | evaluated 38466 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
|
TRUE | never evaluated | FALSE | never evaluated |
| 0-38466 |
910 | if (!_q_startupNotification())TRUE | never evaluated | FALSE | never evaluated |
| 0 |
911 | return false; never executed: return false; | 0 |
912 | } never executed: end of block | 0 |
913 | if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))TRUE | evaluated 37133 times by 27 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- ...
| FALSE | evaluated 1333 times by 5 testsEvaluated by:- tst_QProcess
- tst_QSharedPointer
- tst_qdbusxml2cpp
- tst_qprocess - unknown status
- tst_uic
|
TRUE | evaluated 66 times by 3 testsEvaluated by:- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_qprocess - unknown status
| FALSE | evaluated 37067 times by 26 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_rcc
- ...
|
| 66-37133 |
914 | _q_canWrite();executed 66 times by 3 tests: _q_canWrite(); Executed by:- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_qprocess - unknown status
| 66 |
915 | | - |
916 | if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread))TRUE | evaluated 36806 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| FALSE | evaluated 1660 times by 25 testsEvaluated 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
|
TRUE | evaluated 34629 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| FALSE | evaluated 2177 times by 22 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QFont
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
|
| 1660-36806 |
917 | _q_canReadStandardOutput();executed 34629 times by 28 tests: _q_canReadStandardOutput(); Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| 34629 |
918 | | - |
919 | if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread))TRUE | evaluated 35235 times by 23 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFont
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
| FALSE | evaluated 3231 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
|
TRUE | evaluated 2412 times by 23 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFont
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
| FALSE | evaluated 32823 times by 15 testsEvaluated by:- tst_Lancelot
- tst_QDir
- tst_QFont
- tst_QProcess
- tst_QProcess_and_GuiEventLoop
- tst_QSharedPointer
- tst_QUuid
- tst_Selftests
- tst_qdbuscpp2xml
- tst_qdbusxml2cpp
- tst_qmake
- tst_qmakelib
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
|
| 2412-35235 |
920 | _q_canReadStandardError();executed 2412 times by 23 tests: _q_canReadStandardError(); Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDir
- tst_QFont
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
| 2412 |
921 | | - |
922 | if (forkfd == -1 || FD_ISSET(forkfd, &fdread)) {TRUE | evaluated 1 time by 1 test | FALSE | evaluated 38465 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
|
TRUE | evaluated 1701 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| FALSE | evaluated 36764 times by 25 testsEvaluated 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
|
| 1-38465 |
923 | if (_q_processDied())TRUE | evaluated 1702 times by 28 testsEvaluated by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| FALSE | never evaluated |
| 0-1702 |
924 | return true;executed 1702 times by 28 tests: return true; Executed by:- tst_Lancelot
- tst_QApplication
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_SpyHook
- tst_QDBusInterface
- tst_QDBusMarshall
- 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- ...
| 1702 |
925 | } never executed: end of block | 0 |
926 | }executed 36764 times by 25 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_qmake
- tst_qmakelib
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_rcc
- tst_uic
| 36764 |
927 | return false; never executed: return false; | 0 |
928 | } | - |
929 | | - |
930 | bool QProcessPrivate::waitForWrite(int msecs) | - |
931 | { | - |
932 | fd_set fdwrite; | - |
933 | FD_ZERO(&fdwrite); | - |
934 | FD_SET(stdinChannel.pipe[1], &fdwrite); | - |
935 | return qt_select_msecs(stdinChannel.pipe[1] + 1, 0, &fdwrite, msecs < 0 ? 0 : msecs) == 1; never executed: return qt_select_msecs(stdinChannel.pipe[1] + 1, 0, &fdwrite, msecs < 0 ? 0 : msecs) == 1; | 0 |
936 | } | - |
937 | | - |
938 | void QProcessPrivate::findExitCode() | - |
939 | { | - |
940 | } | - |
941 | | - |
942 | bool QProcessPrivate::waitForDeadChild() | - |
943 | { | - |
944 | if (forkfd == -1)TRUE | evaluated 1 time by 1 test | FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
| 1-2473 |
945 | return true; executed 1 time by 1 test: return true; | 1 |
946 | | - |
947 | | - |
948 | forkfd_info info; | - |
949 | int ret; | - |
950 | EINTR_LOOP(ret, forkfd_wait(forkfd, &info, Q_NULLPTR));executed 3176 times by 38 tests: end of block 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
- ...
TRUE | evaluated 703 times by 11 testsEvaluated by:- tst_QCommandLineParser
- tst_QFile
- tst_QLockFile
- tst_QProcess
- tst_QSharedPointer
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
| FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
TRUE | evaluated 703 times by 11 testsEvaluated by:- tst_QCommandLineParser
- tst_QFile
- tst_QLockFile
- tst_QProcess
- tst_QSharedPointer
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QUdpSocket
- tst_QUndoGroup
- tst_QUndoStack
| FALSE | never evaluated |
| 0-3176 |
951 | | - |
952 | exitCode = info.status; | - |
953 | crashed = info.code != CLD_EXITED; | - |
954 | | - |
955 | delete deathNotifier; | - |
956 | deathNotifier = 0; | - |
957 | | - |
958 | EINTR_LOOP(ret, forkfd_close(forkfd));executed 2473 times by 38 tests: end of block 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
- ...
TRUE | never evaluated | FALSE | evaluated 2473 times by 38 testsEvaluated 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
- ...
|
TRUE | never evaluated | FALSE | never evaluated |
| 0-2473 |
959 | forkfd = -1; | - |
960 | | - |
961 | #if defined QPROCESS_DEBUG | - |
962 | qDebug() << "QProcessPrivate::waitForDeadChild() dead with exitCode" | - |
963 | << exitCode << ", crashed?" << crashed; | - |
964 | #endif | - |
965 | return true;executed 2473 times by 38 tests: return true; 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
- ...
| 2473 |
966 | } | - |
967 | | - |
968 | bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid) | - |
969 | { | - |
970 | QByteArray encodedWorkingDirectory = QFile::encodeName(workingDirectory); | - |
971 | | - |
972 | | - |
973 | int startedPipe[2]; | - |
974 | if (qt_safe_pipe(startedPipe) != 0)TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
| 0-4 |
975 | return false; never executed: return false; | 0 |
976 | | - |
977 | int pidPipe[2]; | - |
978 | if (qt_safe_pipe(pidPipe) != 0) {TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
| 0-4 |
979 | qt_safe_close(startedPipe[0]); | - |
980 | qt_safe_close(startedPipe[1]); | - |
981 | return false; never executed: return false; | 0 |
982 | } | - |
983 | | - |
984 | pid_t childPid = fork(); | - |
985 | if (childPid == 0) {TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
| 0-4 |
986 | struct sigaction noaction; | - |
987 | memset(&noaction, 0, sizeof(noaction)); | - |
988 | noaction.sa_handler = SIG_IGN; | - |
989 | ::sigaction(SIGPIPE, &noaction, 0); | - |
990 | | - |
991 | ::setsid(); | - |
992 | | - |
993 | qt_safe_close(startedPipe[0]); | - |
994 | qt_safe_close(pidPipe[0]); | - |
995 | | - |
996 | pid_t doubleForkPid = fork(); | - |
997 | if (doubleForkPid == 0) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
998 | qt_safe_close(pidPipe[1]); | - |
999 | | - |
1000 | if (!encodedWorkingDirectory.isEmpty()) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1001 | if (QT_CHDIR(encodedWorkingDirectory.constData()) == -1)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1002 | qWarning("QProcessPrivate::startDetached: failed to chdir to %s", encodedWorkingDirectory.constData()); never executed: QMessageLogger(__FILE__, 1002, __PRETTY_FUNCTION__).warning("QProcessPrivate::startDetached: failed to chdir to %s", encodedWorkingDirectory.constData()); | 0 |
1003 | } never executed: end of block | 0 |
1004 | | - |
1005 | char **argv = new char *[arguments.size() + 2]; | - |
1006 | for (int i = 0; i < arguments.size(); ++i)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1007 | argv[i + 1] = ::strdup(QFile::encodeName(arguments.at(i)).constData()); never executed: argv[i + 1] = ::strdup(QFile::encodeName(arguments.at(i)).constData()); | 0 |
1008 | argv[arguments.size() + 1] = 0; | - |
1009 | | - |
1010 | if (!program.contains(QLatin1Char('/'))) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1011 | const QString path = QString::fromLocal8Bit(qgetenv("PATH")); | - |
1012 | if (!path.isEmpty()) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1013 | QStringList pathEntries = path.split(QLatin1Char(':')); | - |
1014 | for (int k = 0; k < pathEntries.size(); ++k) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1015 | QByteArray tmp = QFile::encodeName(pathEntries.at(k)); | - |
1016 | if (!tmp.endsWith('/')) tmp += '/'; never executed: tmp += '/'; TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1017 | tmp += QFile::encodeName(program); | - |
1018 | argv[0] = tmp.data(); | - |
1019 | qt_safe_execv(argv[0], argv); | - |
1020 | } never executed: end of block | 0 |
1021 | } never executed: end of block | 0 |
1022 | } else { never executed: end of block | 0 |
1023 | QByteArray tmp = QFile::encodeName(program); | - |
1024 | argv[0] = tmp.data(); | - |
1025 | qt_safe_execv(argv[0], argv); | - |
1026 | } never executed: end of block | 0 |
1027 | | - |
1028 | struct sigaction noaction; | - |
1029 | memset(&noaction, 0, sizeof(noaction)); | - |
1030 | noaction.sa_handler = SIG_IGN; | - |
1031 | ::sigaction(SIGPIPE, &noaction, 0); | - |
1032 | | - |
1033 | | - |
1034 | char c = '\1'; | - |
1035 | qt_safe_write(startedPipe[1], &c, 1); | - |
1036 | qt_safe_close(startedPipe[1]); | - |
1037 | ::_exit(1); | - |
1038 | } else if (doubleForkPid == -1) { never executed: end of block TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1039 | struct sigaction noaction; | - |
1040 | memset(&noaction, 0, sizeof(noaction)); | - |
1041 | noaction.sa_handler = SIG_IGN; | - |
1042 | ::sigaction(SIGPIPE, &noaction, 0); | - |
1043 | | - |
1044 | | - |
1045 | char c = '\2'; | - |
1046 | qt_safe_write(startedPipe[1], &c, 1); | - |
1047 | } never executed: end of block | 0 |
1048 | | - |
1049 | qt_safe_close(startedPipe[1]); | - |
1050 | qt_safe_write(pidPipe[1], (const char *)&doubleForkPid, sizeof(pid_t)); | - |
1051 | if (QT_CHDIR("/") == -1)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1052 | qWarning("QProcessPrivate::startDetached: failed to chdir to /"); never executed: QMessageLogger(__FILE__, 1052, __PRETTY_FUNCTION__).warning("QProcessPrivate::startDetached: failed to chdir to /"); | 0 |
1053 | ::_exit(1); | - |
1054 | } never executed: end of block | 0 |
1055 | | - |
1056 | qt_safe_close(startedPipe[1]); | - |
1057 | qt_safe_close(pidPipe[1]); | - |
1058 | | - |
1059 | if (childPid == -1) {TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
| 0-4 |
1060 | qt_safe_close(startedPipe[0]); | - |
1061 | qt_safe_close(pidPipe[0]); | - |
1062 | return false; never executed: return false; | 0 |
1063 | } | - |
1064 | | - |
1065 | char reply = '\0'; | - |
1066 | int startResult = qt_safe_read(startedPipe[0], &reply, 1); | - |
1067 | int result; | - |
1068 | qt_safe_close(startedPipe[0]); | - |
1069 | qt_safe_waitpid(childPid, &result, 0); | - |
1070 | bool success = (startResult != -1 && reply == '\0');TRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
TRUE | evaluated 2 times by 1 test | FALSE | evaluated 2 times by 1 test |
| 0-4 |
1071 | if (success && pid) {TRUE | evaluated 2 times by 1 test | FALSE | evaluated 2 times by 1 test |
TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1-2 |
1072 | pid_t actualPid = 0; | - |
1073 | if (qt_safe_read(pidPipe[0], (char *)&actualPid, sizeof(pid_t)) == sizeof(pid_t)) {TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
1074 | *pid = actualPid; | - |
1075 | } else {executed 1 time by 1 test: end of block | 1 |
1076 | *pid = 0; | - |
1077 | } never executed: end of block | 0 |
1078 | } | - |
1079 | qt_safe_close(pidPipe[0]); | - |
1080 | return success;executed 4 times by 1 test: return success; | 4 |
1081 | } | - |
1082 | | - |
1083 | QT_END_NAMESPACE | - |
1084 | | - |
1085 | #endif // QT_NO_PROCESS | - |
| | |