aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/test/crashdump_viewer_SUITE.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2014-03-17 15:48:17 +0100
committerSiri Hansen <[email protected]>2014-03-25 11:34:35 +0100
commit6a5b206e984ed28d257c6ab518b3ecbe5c6033d7 (patch)
tree4072150ad363c5d5459a3154954c5a7a8eb8ff82 /lib/observer/test/crashdump_viewer_SUITE.erl
parentf6bb3dc325e686375b1dee283bd91c3068b682a1 (diff)
downloadotp-6a5b206e984ed28d257c6ab518b3ecbe5c6033d7.tar.gz
otp-6a5b206e984ed28d257c6ab518b3ecbe5c6033d7.tar.bz2
otp-6a5b206e984ed28d257c6ab518b3ecbe5c6033d7.zip
Fix crash in crashdump_viewer when node has multiple creations
A node to which we have references to multiple instances (creations) will have an information line in the crashdump like this: Creation: 1 2 ... This would earlier crash because crashdump_viewer would try to do list_to_integer on the value after "Creation: ". This is now corrected. This correction also helps the case when the emulator is debug compiled, since the line could then be Creation: 1 (refc=1)
Diffstat (limited to 'lib/observer/test/crashdump_viewer_SUITE.erl')
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl
index 7a582436b4..91f349b6c1 100644
--- a/lib/observer/test/crashdump_viewer_SUITE.erl
+++ b/lib/observer/test/crashdump_viewer_SUITE.erl
@@ -428,8 +428,10 @@ do_create_dumps(DataDir,Rel) ->
end.
-%% Create a dump which has two visible nodes, one hidden and one
+%% Create a dump which has three visible nodes, one hidden and one
%% not connected node, and with monitors and links between nodes.
+%% One of the visible nodes is stopped and started again in order to
+%% get multiple creations.
full_dist_dump(DataDir,Rel) ->
Opt = rel_opt(Rel),
Pz = "-pz \"" ++ filename:dirname(code:which(?MODULE)) ++ "\"",
@@ -450,6 +452,15 @@ full_dist_dump(DataDir,Rel) ->
get_response(P4),
get_response(P1),
+ %% start, stop and start a node in order to get multiple 'creations'
+ {ok,N5} = ?t:start_node(n5,peer,Opt ++ PzOpt),
+ P51 = rpc:call(N5,?helper_mod,remote_proc,[P1,Creator]),
+ get_response(P51),
+ ?t:stop_node(N5),
+ {ok,N5} = ?t:start_node(n5,peer,Opt ++ PzOpt),
+ P52 = rpc:call(N5,?helper_mod,remote_proc,[P1,Creator]),
+ get_response(P52),
+
{aaaaaaaa,N1} ! {hello,from,other,node}, % distribution message
?t:stop_node(N3),
@@ -458,6 +469,7 @@ full_dist_dump(DataDir,Rel) ->
?t:stop_node(N2),
?t:stop_node(N4),
+ ?t:stop_node(N5),
CD.
get_response(P) ->