Permalink
Browse files

Merge branch 'siri/test_server/hanging-io-request/OTP-10991' into maint

* siri/test_server/hanging-io-request/OTP-10991:
  [test_server] Don't hang due to invalid io request
  • Loading branch information...
2 parents c3b26ff + 08edfec commit b74b21ba20e1e5aab7887891bf6672abb33f71fc @sirihansen sirihansen committed Apr 4, 2013
@@ -197,7 +197,7 @@ handle_info({io_request,From,ReplyAs,Req}=IoReq, St) ->
From ! {io_reply,ReplyAs,ok}
catch
_:_ ->
- {io_reply,ReplyAs,{error,arguments}}
+ From ! {io_reply,ReplyAs,{error,arguments}}
end,
{noreply,St};
handle_info({structured_io,ClientPid,{Detail,Str}}, St) ->
@@ -104,7 +104,7 @@ test_server_SUITE(Config) ->
% rpc:call(Node,dbg, tpl,[test_server_ctrl,x]),
run_test_server_tests("test_server_SUITE",
[{test_server_SUITE,skip_case7,"SKIPPED!"}],
- 38, 1, 30, 19, 9, 1, 11, 2, 25, Config).
+ 39, 1, 31, 20, 9, 1, 11, 2, 26, Config).
test_server_parallel01_SUITE(Config) ->
run_test_server_tests("test_server_parallel01_SUITE", [],
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,7 +38,8 @@
conf_init/1, check_new_conf/1, conf_cleanup/1,
check_old_conf/1, conf_init_fail/1, start_stop_node/1,
cleanup_nodes_init/1, check_survive_nodes/1, cleanup_nodes_fin/1,
- commercial/1]).
+ commercial/1,
+ io_invalid_data/1]).
-export([dummy_function/0,dummy_function/1,doer/1]).
@@ -47,7 +48,7 @@ all(suite) ->
[config, comment, timetrap, timetrap_cancel, multiply_timetrap,
init_per_s, init_per_tc, end_per_tc,
timeconv, msgs, capture, timecall, do_times, skip_cases,
- commercial,
+ commercial, io_invalid_data,
{conf, conf_init, [check_new_conf], conf_cleanup},
check_old_conf,
{conf, conf_init_fail,[conf_member_skip],conf_cleanup_skip},
@@ -497,4 +498,8 @@ commercial(Config) when is_list(Config) ->
true -> {comment,"Commercial build"}
end.
-
+io_invalid_data(Config) when is_list(Config) ->
+ ok = io:put_chars("valid: " ++ [42]),
+ %% OTP-10991 caused this to hang and produce a timetrap timeout:
+ {'EXIT',{badarg,_}} = (catch io:put_chars("invalid: " ++ [42.0])),
+ ok.

0 comments on commit b74b21b

Please sign in to comment.