[Lldb-commits] [PATCH] D62948: lit/Register: Avoid stdio in register write tests

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 6 06:11:29 PDT 2019


labath created this revision.
labath added reviewers: mgorny, jgorbe.

The linux kernel doesn't guarantee that the data written to a pty will
instantly be available for reading on the other side. So what sometimes
happens here is that the inferior dumps all register values and exits,
lldb registers the exit, goes to read the inferior stdio, but the data
is not there.

Depending on how the machine is configured, the frequency of this
occurring can range from "almost never" to "pretty much always". This
patch side-steps the issue by redirecting the inferior output to a file.
Files have better synchronization properties (plenty of applications
depend on those), and this fixes the flakyness of these tests on
affected machines.


https://reviews.llvm.org/D62948

Files:
  lit/Register/x86-64-gp-write.test
  lit/Register/x86-64-write.test
  lit/Register/x86-64-ymm-write.test
  lit/Register/x86-gp-write.test
  lit/Register/x86-mm-xmm-write.test
  lit/Register/x86-ymm-write.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62948.203340.patch
Type: text/x-patch
Size: 19768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190606/fd3e9ac8/attachment-0001.bin>


More information about the lldb-commits mailing list