aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/ets_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-12-09 14:53:03 +0100
committerSverker Eriksson <[email protected]>2011-12-19 16:03:09 +0100
commit5d7dccfd4553aa03d22e71dc69e40e4debe2b96d (patch)
treea77de2c0b009ef5ea06373c3156761d5e8cc3c9e /lib/stdlib/test/ets_SUITE.erl
parent2799d29ad1123b5128498ea89d2ff5678e59b545 (diff)
downloadotp-5d7dccfd4553aa03d22e71dc69e40e4debe2b96d.tar.gz
otp-5d7dccfd4553aa03d22e71dc69e40e4debe2b96d.tar.bz2
otp-5d7dccfd4553aa03d22e71dc69e40e4debe2b96d.zip
stdlib: Enable unused 'end_per_testcase' in ets_SUITE
Also added more information when waiting for test proc to die
Diffstat (limited to 'lib/stdlib/test/ets_SUITE.erl')
-rw-r--r--lib/stdlib/test/ets_SUITE.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 0e8849b5b3..101828fdef 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -74,7 +74,7 @@
-export([bad_table/1, types/1]).
-export([otp_9423/1]).
--export([init_per_testcase/2]).
+-export([init_per_testcase/2, end_per_testcase/2]).
%% Convenience for manual testing
-export([random_test/0]).
@@ -2385,6 +2385,8 @@ setopts_do(Opts) ->
?line {'EXIT',{badarg,_}} = (catch ets:setopts(T,{protection,private,false})),
?line {'EXIT',{badarg,_}} = (catch ets:setopts(T,protection)),
?line ets:delete(T),
+ unlink(Heir),
+ exit(Heir, bang),
ok.
bad_table(doc) -> ["All kinds of operations with bad table argument"];
@@ -5645,7 +5647,8 @@ spawn_logger(Procs) ->
true -> exit(Proc, kill);
_ -> ok
end,
- erlang:display(process_info(Proc)),
+ erlang:display({"Waiting for 'DOWN' from", Proc,
+ process_info(Proc), pid_status(Proc)}),
receive
{'DOWN', Mon, _, _, _} ->
ok
@@ -5656,6 +5659,15 @@ spawn_logger(Procs) ->
spawn_logger([From])
end.
+pid_status(Pid) ->
+ try
+ erts_debug:get_internal_state({process_status, Pid})
+ catch
+ error:undef ->
+ erts_debug:set_internal_state(available_internal_state, true),
+ pid_status(Pid)
+ end.
+
start_spawn_logger() ->
case whereis(ets_test_spawn_logger) of
Pid when is_pid(Pid) -> true;