From 36b5f99ccdf9bbd6cf72afa24ab5ee562e3ed1b9 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 5 Oct 2017 11:58:14 +0200 Subject: erts: Fail port_SUITE:huge_env if error code > 127 This can happen for instance if erl_child_setup segfaults before it can do the execv. --- erts/emulator/test/port_SUITE.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erts/emulator/test/port_SUITE.erl b/erts/emulator/test/port_SUITE.erl index 730a17d7e8..e7044653f0 100644 --- a/erts/emulator/test/port_SUITE.erl +++ b/erts/emulator/test/port_SUITE.erl @@ -1035,6 +1035,9 @@ huge_env(Config) when is_list(Config) -> try erlang:open_port({spawn,Cmd},[exit_status, {env, Env}]) of P -> receive + {P, {exit_status,N}} = M when N > 127-> + %% If exit status is > 127 something went very wrong + ct:fail("Open port failed got ~p",[M]); {P, {exit_status,N}} = M -> %% We test that the exit status is an integer, this means %% that the child program has started. If we get an atom -- cgit v1.2.3