diff options
author | Lukas Larsson <[email protected]> | 2015-12-15 10:10:10 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2015-12-15 10:21:40 +0100 |
commit | 9083bc7e2172937296b7e8fbe09ed595c6893f08 (patch) | |
tree | b3b4255af12bf6cc023ee7a47bcf5ae5ae115077 /erts/emulator/test/driver_SUITE.erl | |
parent | d7cd5ee8a34d289fbc91627a3f096a870bf70393 (diff) | |
parent | 4b1b3bf6c62f8208b2eea506c9dac1504df6e916 (diff) | |
download | otp-9083bc7e2172937296b7e8fbe09ed595c6893f08.tar.gz otp-9083bc7e2172937296b7e8fbe09ed595c6893f08.tar.bz2 otp-9083bc7e2172937296b7e8fbe09ed595c6893f08.zip |
Merge branch 'lukas/erts/forker'
* lukas/erts/forker: (28 commits)
erts: Never abort in the forked child
erts: Mend ASSERT makro for erl_child_setup
erts: Allow enomem failures in port_SUITE
erts: iter_port sleep longer on freebsd
erts: Allow one dangling fd if there is a gethost port
erts: Only use forker StackAck on freebsd
erts: It is not possible to exit the forker driver
erts: Add forker StartAck for port start flowcontrol
erts: Fix large open_port arg segfault for win32
erts: Fix memory leak at async open port
kernel: Remove cmd server for unix os:cmd
erts: Add testcase for huge port environment
erts: Move os_pid to port hash to child setup
erts: Handle all EINTR and EAGAIN cases in child setup
erts: Make child_setup work with large environments
erts: Fix forker driver ifdefs for win32
erts: Fix uds socket handling for os x
erts: Fix dereferencing of unaligned integer for sparc
erts: Flatten too long io vectors in uds write
erts: Add fd count test for spawn_driver
...
Conflicts:
erts/emulator/beam/erl_node_tables.c
erts/preloaded/src/erts_internal.erl
Diffstat (limited to 'erts/emulator/test/driver_SUITE.erl')
-rw-r--r-- | erts/emulator/test/driver_SUITE.erl | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/erts/emulator/test/driver_SUITE.erl b/erts/emulator/test/driver_SUITE.erl index 4fd7b36e6a..ce55fe3c52 100644 --- a/erts/emulator/test/driver_SUITE.erl +++ b/erts/emulator/test/driver_SUITE.erl @@ -2395,13 +2395,35 @@ z_test(Config) when is_list(Config) -> check_io_debug() -> get_stable_check_io_info(), - {NoErrorFds, NoUsedFds, NoDrvSelStructs, NoDrvEvStructs} + {NoErrorFds, NoUsedFds, NoDrvSelStructs, NoDrvEvStructs} = CheckIoDebug = erts_debug:get_internal_state(check_io_debug), + HasGetHost = has_gethost(), + ct:log("check_io_debug: ~p~n" + "HasGetHost: ~p",[CheckIoDebug, HasGetHost]), 0 = NoErrorFds, - NoUsedFds = NoDrvSelStructs, + if + NoUsedFds == NoDrvSelStructs -> + ok; + HasGetHost andalso (NoUsedFds == (NoDrvSelStructs - 1)) -> + %% If the inet_gethost port is alive, we may have + %% one extra used fd that is not selected on + ok + end, 0 = NoDrvEvStructs, ok. +has_gethost() -> + has_gethost(erlang:ports()). +has_gethost([P|T]) -> + case erlang:port_info(P, name) of + {name,"inet_gethost"++_} -> + true; + _ -> + has_gethost(T) + end; +has_gethost([]) -> + false. + %flush_msgs() -> % receive % M -> |