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