diff options
author | John Högberg <[email protected]> | 2018-07-26 09:56:47 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-07-26 09:56:47 +0200 |
commit | d9d694ca3ea8a168c51145fc485a3bcbc18f6188 (patch) | |
tree | 3ae824615ddadabdbeae2679b1aa4f717195b4b8 /erts/emulator/test/driver_SUITE.erl | |
parent | d7e303cb7981e2ceb0eb0074cf7402feec5da868 (diff) | |
parent | a0b2cc0a377d780fe938ba9be3e417c7a8e00914 (diff) | |
download | otp-d9d694ca3ea8a168c51145fc485a3bcbc18f6188.tar.gz otp-d9d694ca3ea8a168c51145fc485a3bcbc18f6188.tar.bz2 otp-d9d694ca3ea8a168c51145fc485a3bcbc18f6188.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/test/driver_SUITE.erl')
-rw-r--r-- | erts/emulator/test/driver_SUITE.erl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/erts/emulator/test/driver_SUITE.erl b/erts/emulator/test/driver_SUITE.erl index bb76e6f24b..9ffb484eb4 100644 --- a/erts/emulator/test/driver_SUITE.erl +++ b/erts/emulator/test/driver_SUITE.erl @@ -81,6 +81,7 @@ thr_msg_blast/1, consume_timeslice/1, env/1, + poll_pipe/1, z_test/1]). -export([bin_prefix/2]). @@ -168,6 +169,7 @@ all() -> %% Keep a_test first and z_test last... thr_msg_blast, consume_timeslice, env, + poll_pipe, z_test]. groups() -> @@ -2676,3 +2678,25 @@ rpc(Config, Fun) -> ct:fail(Other) end end. + +poll_pipe(Config) when is_list(Config) -> + %% ERL-647; we wouldn't see any events on EOF when polling a pipe using + %% kqueue(2). + case os:type() of + {unix, _} -> + Command = "erl -noshell -eval " + "'\"DATA\n\" = io:get_line(\"\")," + "eof = io:get_line(\"\")," + "halt()' <<< 'DATA'", + Ref = make_ref(), + Self = self(), + Pid = spawn(fun() -> os:cmd(Command), Self ! Ref end), + receive + Ref -> ok + after 5000 -> + exit(Pid, kill), + ct:fail("Stuck reading from stdin.") + end; + _ -> + {skipped, "Unix-only test"} + end. |