qt5base-lts/tests/auto/corelib/io
Thiago Macieira 01872d06d9 tst_QFile: replicate the unixPipe test using FIFOs
Pipes are unnamed FIFOs, so they're basically the same.

The difference here is that open() blocks on opening a FIFO until both
ends of the FIFO are opened. This helps us in synchronizing the two
threads and thus ensuring that that the read() system call deep inside
QFile does, indeed, block.

We see this with strace -T on Linux:

[pid 662956] openat(AT_FDCWD, "/run/user/1000/tst_qfile_fifo.2575572361", O_RDONLY|O_CLOEXEC <unfinished ...>
... aux starts up ...
[pid 662957] prctl(PR_SET_NAME, "QThread") = 0 <0.000004>
[pid 662957] openat(AT_FDCWD, "/run/user/1000/tst_qfile_fifo.2575572361", O_WRONLY|O_CLOEXEC <unfinished ...>
[pid 662956] <... openat resumed>)      = 4 <0.000133>
[pid 662957] <... openat resumed>)      = 6 <0.000011>
[pid 662957] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=500000000},  <unfinished ...>
[pid 662956] read(4,  <unfinished ...>
[pid 662957] <... clock_nanosleep resumed>NULL) = 0 <0.500183>
[pid 662957] write(6, "\2", 1)          = 1 <0.000033>
[pid 662956] <... read resumed>"\2", 1) = 1 <0.500311>

Pick-to: 6.6
Change-Id: I63b988479db546dabffcfffd1766d7a48819b149
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-09 20:30:07 -07:00
..
largefile Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qabstractfileengine tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qbuffer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qdataurl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qdebug Move the formatting of <chrono> durations to QDebug & QtTest 2023-05-06 17:54:23 +00:00
qdir Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qdiriterator tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qfile tst_QFile: replicate the unixPipe test using FIFOs 2023-06-09 20:30:07 -07:00
qfileinfo Use LANGUAGE OBJCXX rather than COMPILE_FLAGS "-x objective-c++" 2023-04-13 14:36:26 +02:00
qfileselector tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qfilesystementry Fix tst_qfilesystementry in unity build 2023-03-15 18:18:01 +01:00
qfilesystemmetadata tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qfilesystemwatcher Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qiodevice tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qipaddress Silence warning about unsafe sprintf, use snprintf instead 2023-03-06 23:14:08 +01:00
qlockfile QLockFile: tryLock(): use chrono first 2023-03-14 22:15:35 +02:00
qloggingcategory tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qloggingregistry tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qnodebug tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qprocess QProcess/Unix: capture the child process modifier exception's what() 2023-06-09 17:32:35 -07:00
qprocess-noapplication tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qprocessenvironment tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qresourceengine CMake: Allow contents of resources to be replaced by empty files 2022-12-17 20:43:51 +01:00
qsavefile tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qsettings Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qstandardpaths QStandardPaths: de-duplicate some unittests code 2023-04-22 20:04:31 +02:00
qstorageinfo tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qtemporarydir tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qtemporaryfile tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qurl Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qurlinternal tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qurlquery tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qurluts46 Update UCD to Revision 30 2022-10-11 14:10:59 +00:00
qzip Move QZipReader/Writer from QtGui to QtCore 2023-04-26 12:01:05 +02:00
CMakeLists.txt Move QZipReader/Writer from QtGui to QtCore 2023-04-26 12:01:05 +02:00