aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/test/crashdump_viewer_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-10-16 12:31:09 +0200
committerBjörn Gustavsson <[email protected]>2017-10-18 14:05:01 +0200
commite6bc3f31f8d3e67be67c2c6b53eb868dbc53d7ec (patch)
treec721a04316fba7eabb2ab2ff4219b8903babcfdb /lib/observer/test/crashdump_viewer_SUITE.erl
parent31ad587b6d75e8697964e2b80709fb3b3d2901d5 (diff)
downloadotp-e6bc3f31f8d3e67be67c2c6b53eb868dbc53d7ec.tar.gz
otp-e6bc3f31f8d3e67be67c2c6b53eb868dbc53d7ec.tar.bz2
otp-e6bc3f31f8d3e67be67c2c6b53eb868dbc53d7ec.zip
Verify that binaries of different sizes are dumped correctly
Diffstat (limited to 'lib/observer/test/crashdump_viewer_SUITE.erl')
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl
index 6ac9d7d3fb..86a60e15f4 100644
--- a/lib/observer/test/crashdump_viewer_SUITE.erl
+++ b/lib/observer/test/crashdump_viewer_SUITE.erl
@@ -364,6 +364,10 @@ special(File,Procs) ->
crashdump_viewer:expand_binary({SOffset,SSize,SPos}),
io:format(" expand binary ok",[]),
+ Binaries = crashdump_helper:create_binaries(),
+ verify_binaries(Binaries, proplists:get_value(bins,Dict)),
+ io:format(" binaries ok",[]),
+
#proc{last_calls=LastCalls} = ProcDetails,
true = length(LastCalls) =< 4,
@@ -534,6 +538,15 @@ special(File,Procs) ->
end,
ok.
+verify_binaries([H|T1], [H|T2]) ->
+ %% Heap binary.
+ verify_binaries(T1, T2);
+verify_binaries([Bin|T1], [['#CDVBin',Offset,Size,Pos]|T2]) ->
+ %% Refc binary.
+ {ok,<<Bin:Size/binary>>} = crashdump_viewer:expand_binary({Offset,Size,Pos}),
+ verify_binaries(T1, T2);
+verify_binaries([], []) ->
+ ok.
lookat_all_pids([]) ->
ok;