[Lldb-commits] [PATCH] D42959: Rewrite the flaky test_restart_bug test in a more deterministic way

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 6 06:10:01 PST 2018

labath created this revision.
labath added a reviewer: owenpshaw.
Herald added a subscriber: srhines.

The test was trying to reproduce a bug in handling of two concurrent
events, which was impossible to do reliably in a black-box style test.
In practice, this meant the test was only ever failing on remote
targets, as these were slow enough to trigger this.

Fortunately, we now have the ability to mock the server side of the
connection, which means we can simulate the failure deterministically,
so I rewrite the test to use the new gdb-client framework.

I've needed to add a couple of new packets to the mock server to be able
to do this. Instead of trying to guess how a "typical" gdb-client test
will want to handle this, I throw an exception in the implementation to
force the user to override them (the packets are only sent if the test
explicitly performs some action which will trigger them, so a basic test
which e.g. does not need the "continue" functionality will not need to
implement them).



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42959.132983.patch
Type: text/x-patch
Size: 9944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180206/774713ec/attachment-0001.bin>

More information about the lldb-commits mailing list