diff --git a/src/testing/interleaver.cpp b/src/testing/interleaver.cpp index 0323503..4982372 100644 --- a/src/testing/interleaver.cpp +++ b/src/testing/interleaver.cpp @@ -174,7 +174,7 @@ std::vector stabilize(std::span> threads) do { const auto elapsed = std::chrono::high_resolution_clock::now() - start; if (elapsed > 200ms) { - throw std::logic_error("deadlock"); + throw std::logic_error("deadlock - still running"); } states = get_states(threads); } while (!is_stable(states)); @@ -182,7 +182,7 @@ std::vector stabilize(std::span> threads) while (!is_unblocked(states)) { const auto elapsed = std::chrono::high_resolution_clock::now() - start; if (elapsed > 200ms) { - throw std::logic_error("deadlock"); + throw std::logic_error("deadlock - all blocked"); } states = get_states(threads); } @@ -307,6 +307,8 @@ path run_next_interleaving(tree& tree, std::span> swarm) current_node = &tree.next(transition_node, resumed); } catch (std::exception&) { + const auto locked_states = get_states(swarm); + path.steps.push_back({ swarm_state(locked_states), -1 }); std::cerr << path.dump() << std::endl; std::terminate(); }