diff options
Diffstat (limited to 'lib/observer/test/crashdump_viewer_SUITE.erl')
-rw-r--r-- | lib/observer/test/crashdump_viewer_SUITE.erl | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl index 73ed890802..1fd94ffb3c 100644 --- a/lib/observer/test/crashdump_viewer_SUITE.erl +++ b/lib/observer/test/crashdump_viewer_SUITE.erl @@ -101,7 +101,10 @@ end_per_group(_GroupName, Config) -> init_per_suite(Config) when is_list(Config) -> delete_saved(Config), DataDir = ?config(data_dir,Config), - Rels = [R || R <- ['17','18'], ?t:is_release_available(R)] ++ [current], + CurrVsn = list_to_integer(erlang:system_info(otp_release)), + OldRels = [R || R <- [CurrVsn-2,CurrVsn-1], + ?t:is_release_available(list_to_atom(integer_to_list(R)))], + Rels = OldRels ++ [current], io:format("Creating crash dumps for the following releases: ~p", [Rels]), AllDumps = create_dumps(DataDir,Rels), [{dumps,AllDumps}|Config]. @@ -420,6 +423,10 @@ special(File,Procs) -> %% ".trunc" -> %% %% ???? %% ok; + ".trunc.bytes" -> + {ok,_,[TW]} = crashdump_viewer:general_info(), + {match,_} = re:run(TW,"CRASH DUMP SIZE LIMIT REACHED"), + ok; _ -> ok end, @@ -481,7 +488,11 @@ do_create_dumps(DataDir,Rel) -> current -> CD3 = dump_with_args(DataDir,Rel,"instr","+Mim true"), CD4 = dump_with_strange_module_name(DataDir,Rel,"strangemodname"), - {[CD1,CD2,CD3,CD4], DosDump}; + Bytes = rand:uniform(300000) + 100, + CD5 = dump_with_args(DataDir,Rel,"trunc.bytes", + "-env ERL_CRASH_DUMP_BYTES " ++ + integer_to_list(Bytes)), + {[CD1,CD2,CD3,CD4,CD5], DosDump}; _ -> {[CD1,CD2], DosDump} end. @@ -604,23 +615,17 @@ dos_dump(DataDir,Rel,Dump) -> [] end. +rel_opt(current) -> + []; rel_opt(Rel) -> - case Rel of - '17' -> [{erl,[{release,"17_latest"}]}]; - '18' -> [{erl,[{release,"18_latest"}]}]; - current -> [] - end. + [{erl,[{release,lists:concat([Rel,"_latest"])}]}]. +dump_prefix(current) -> + dump_prefix(erlang:system_info(otp_release)); dump_prefix(Rel) -> - case Rel of - '17' -> "r17_dump."; - '18' -> "r18_dump."; - current -> "r19_dump." - end. + lists:concat(["r",Rel,"_dump."]). +compat_rel(current) -> + ""; compat_rel(Rel) -> - case Rel of - '17' -> "+R17 "; - '18' -> "+R18 "; - current -> "" - end. + lists:concat(["+R",Rel," "]). |