qt6-bb10/tests/auto/corelib/io
Thiago Macieira 3ccfc351fd QProcess: Handle spurious socket notifications for stdout and stderr
On Unix systems where the GUI event dispatcher uses a notification
system for socket notifiers that is out of band compared to select(),
it's possible for the QSocketNotifier to activate after the pipe has
been read from. When that happened, the ioctl(2) call with FIONREAD
might return 0 bytes available, which we interpreted to mean EOF.

Instead of doing that, always try to read at least one byte and examine
the returned byte count from read(2). If it returns 0, that's a real
EOF; if it returns -1 EWOULDBLOCK, we simply ignore the situation.

That's the case on OS X: the Cocoa event dispatcher uses CFSocket to get
notifications and those use kevent (and, apparently, an auxiliary
thread) instead of an in-thread select() or poll(). That means the event
loop would activate the QSocketNotifier even though there is nothing to
be read.

Task-number: QTBUG-39488
Change-Id: I1a58b5b1db7a47034fb36a78a005ebff96290efb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-12 17:54:11 +02:00
..
largefile Remove #ifdef from outside test functions 2014-01-10 17:14:29 +01:00
qabstractfileengine
qbuffer
qdatastream QDateTime - Improve and expose Qt::OffsetFromUtc 2013-08-28 19:08:14 +02:00
qdataurl
qdebug QDebug: Allow text stream formatting for 64 bit numbers 2014-03-13 13:26:02 +01:00
qdir QDir: Do not assume that root ends with a slash 2014-01-22 00:04:16 +01:00
qdiriterator
qfile Disable UNC tests on WinRT. 2014-03-14 15:26:49 +01:00
qfileinfo QNX: Fix tst_qfileinfo 2014-05-14 09:12:16 +02:00
qfileselector QFileSelector: correct the macros for Apple platforms. 2014-02-04 19:36:58 +01:00
qfilesystementry
qfilesystemwatcher QNX: Fix tst_qfilesystemwatcher 2014-06-03 17:25:36 +02:00
qiodevice
qipaddress Make QIPAddress::parseIp6 return the first bad character 2013-07-20 05:08:08 +02:00
qlockfile Skip tst_QLockFile::noPermissions 2014-05-19 19:33:15 +02:00
qloggingcategory Add const overload for QLoggingCategory::operator()() 2014-02-15 21:57:43 +01:00
qloggingregistry Logging: Be also more strict with value of logging rule 2014-04-03 11:07:07 +02:00
qnodebug Remove trailing space from QDebug stream 2013-12-06 13:33:10 +01:00
qprocess QProcess: Handle spurious socket notifications for stdout and stderr 2014-06-12 17:54:11 +02:00
qprocess-noapplication Expose QTest::currentAppName() and remove hard-coded argv[0] in tests 2013-09-26 18:45:16 +02:00
qprocessenvironment Fix remaining use of QTEST_NOOP_MAIN 2013-09-02 14:59:02 +02:00
qresourceengine Introduce GENERATED_TESTDATA variable and fix qresourceengine test. 2014-03-14 22:39:58 +01:00
qsavefile Skip some qsavefile auto tests 2014-05-19 19:33:15 +02:00
qsettings Properly escape bytearray data outside the ascii range when using a codec 2014-06-04 23:06:16 +02:00
qstandardpaths Merge remote-tracking branch 'origin/stable' into dev 2014-02-12 16:28:07 +01:00
qtemporarydir WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
qtemporaryfile WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
qtextstream Don't assume QLocale::codecForLocale always returns non-null 2014-05-11 05:13:49 +02:00
qurl Make a URL with absent authority be different from one with an empty one 2014-02-17 18:13:42 +01:00
qurlinternal Fix MSVC 64bit warnings about int64 truncation in tests. 2014-01-24 22:06:15 +01:00
qurlquery
qwinoverlappedionotifier remove qt_windows.h from qwinoverlappedionotifier_p.h 2014-01-15 18:43:20 +01:00
io.pro Allow configuration of logging rules from file system 2014-02-11 20:59:15 +01:00