File 3081-ct-Do-not-flush-output-when-exiting-ct_run.patch of Package erlang
From 707a0d4c60e94d3c80f577ce26415f0fb382f9d0 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Mon, 3 Jan 2022 14:54:54 +0100
Subject: [PATCH 01/11] ct: Do not flush output when exiting ct_run
When running tests the state of the system may not always
be able to flush all ports and we do not want the system
to hang when that happens.
An example of this happening is when the peer_SUITE has
connections to dead nodes that have been been disconnected
yet.
---
lib/common_test/src/ct_run.erl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index a80d2476f5..4f71ae7130 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -212,10 +212,10 @@ finish(Tracing, ExitStatus, Args) ->
case get_start_opt(halt_with,
fun([HaltMod,HaltFunc]) ->
{list_to_atom(HaltMod),
- list_to_atom(HaltFunc)} end,
- Args) of
+ list_to_atom(HaltFunc)}
+ end, Args) of
undefined ->
- halt(ExitStatus);
+ halt(ExitStatus, [{flush, false}]);
{M,F} ->
apply(M, F, [ExitStatus])
end
--
2.31.1