diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-27 18:11:26 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-27 18:11:26 -0700 |
commit | 50bff0c5fb8dc13987fcb4e9bf16432da1544740 (patch) | |
tree | 92af34a6fd39c5940775bee5c28babffe2eb5953 /073wait.cc | |
parent | 2c0583aa194768129b87dc90814890c0dc712083 (diff) | |
download | mu-50bff0c5fb8dc13987fcb4e9bf16432da1544740.tar.gz |
3264
Turns out chessboard.mu started deadlocking in commit 3258 even though all its tests continue to pass. Not fixed yet; first make deadlock easier to diagnose.
Diffstat (limited to '073wait.cc')
-rw-r--r-- | 073wait.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/073wait.cc b/073wait.cc index 0d635cc3..e42df163 100644 --- a/073wait.cc +++ b/073wait.cc @@ -34,6 +34,11 @@ if (Passed && any_routines_waiting()) { Passed = false; raise << Current_scenario->name << ": deadlock!\n" << end(); } +:(before "End Run Routine") +if (any_routines_waiting()) { + raise << "deadlock!\n" << end(); + dump_waiting_routines(); +} :(before "End Test Teardown") if (Passed && any_routines_with_error()) { Passed = false; @@ -47,6 +52,12 @@ bool any_routines_waiting() { } return false; } +void dump_waiting_routines() { + for (int i = 0; i < SIZE(Routines); ++i) { + if (Routines.at(i)->state == WAITING) + cerr << i << ": " << routine_label(Routines.at(i)) << '\n'; + } +} //: primitive recipe to put routines in that state |