This is an archive of the discontinued LLVM Phabricator instance.

[test] Persist packets between expect_gdbremote_sequence invocations
ClosedPublic

Authored by labath on Mar 14 2016, 4:15 AM.

Details

Summary

Some tests (Hc_then_Csignal_signals_correct_thread, at least) were sending a "continue" packet in
one expect_gdbremote_sequence invocation, and "expecting" the stop-reply in another call. This
posed a problem, because the were packets were not persisted between the two invocations, and if
the stub was exceptionally fast to respond, the packet would be received in the first invocation
(where it would be ignored) and then the second invocation would fail because it could not find
the packet.

Since doing matching in two invocations seems like a reasonable use of the packet pump, instead
of fixing the test, I make sure the packet_pump supports this usage by making the list of
captured packets persistent.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 50577.Mar 14 2016, 4:15 AM
labath retitled this revision from to [test] Persist packets between expect_gdbremote_sequence invocations.
labath updated this object.
labath added a reviewer: tfiala.
labath added a subscriber: lldb-commits.
tfiala accepted this revision.Mar 15 2016, 9:30 AM
tfiala edited edge metadata.

LGTM, Pavel!

This revision is now accepted and ready to land.Mar 15 2016, 9:30 AM
This revision was automatically updated to reflect the committed changes.