summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusabstractadaptor.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-06-08 17:53:29 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-06-09 20:30:07 -0700
commit01872d06d9a09c83f28b3ecebcb06f0ed81c5622 (patch)
treeee97271ff1269a1c0efdb8462a1b354d6ef3e6d6 /src/dbus/qdbusabstractadaptor.cpp
parent65097e7667c96177c322ebd45f7ac5c74fee7a26 (diff)
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>
Diffstat (limited to 'src/dbus/qdbusabstractadaptor.cpp')
0 files changed, 0 insertions, 0 deletions