diff options
author | Siri Hansen <[email protected]> | 2017-06-30 14:32:01 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-09-05 11:26:24 +0200 |
commit | e1310b8f92a14809dccfca1100a4bf22921991b4 (patch) | |
tree | b93043aef49d533fdea8d19952be72378ac12256 /lib/observer/test/crashdump_viewer_SUITE.erl | |
parent | 5c5bd9e0fa4d01382da91ed146b651aa9b212d4a (diff) | |
download | otp-e1310b8f92a14809dccfca1100a4bf22921991b4.tar.gz otp-e1310b8f92a14809dccfca1100a4bf22921991b4.tar.bz2 otp-e1310b8f92a14809dccfca1100a4bf22921991b4.zip |
observer: Improve handling of Unicode
Diffstat (limited to 'lib/observer/test/crashdump_viewer_SUITE.erl')
-rw-r--r-- | lib/observer/test/crashdump_viewer_SUITE.erl | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl index 1fd94ffb3c..77cf086d4b 100644 --- a/lib/observer/test/crashdump_viewer_SUITE.erl +++ b/lib/observer/test/crashdump_viewer_SUITE.erl @@ -427,6 +427,18 @@ special(File,Procs) -> {ok,_,[TW]} = crashdump_viewer:general_info(), {match,_} = re:run(TW,"CRASH DUMP SIZE LIMIT REACHED"), ok; + ".unicode" -> + #proc{pid=Pid0} = + lists:keyfind("'unicode_reg_name_αβ'",#proc.name,Procs), + Pid = pid_to_list(Pid0), + {ok,#proc{},[]} = crashdump_viewer:proc_details(Pid), + io:format(" unicode registered name ok",[]), + + {ok,[#ets_table{id="'tab_αβ'",name="'tab_αβ'"}],[]} = + crashdump_viewer:ets_tables(Pid), + io:format(" unicode table name ok",[]), + + ok; _ -> ok end, @@ -492,7 +504,8 @@ do_create_dumps(DataDir,Rel) -> CD5 = dump_with_args(DataDir,Rel,"trunc.bytes", "-env ERL_CRASH_DUMP_BYTES " ++ integer_to_list(Bytes)), - {[CD1,CD2,CD3,CD4,CD5], DosDump}; + CD6 = dump_with_unicode_atoms(DataDir,Rel,"unicode"), + {[CD1,CD2,CD3,CD4,CD5,CD6], DosDump}; _ -> {[CD1,CD2], DosDump} end. @@ -573,6 +586,16 @@ dump_with_strange_module_name(DataDir,Rel,DumpName) -> ?t:stop_node(n1), CD. +dump_with_unicode_atoms(DataDir,Rel,DumpName) -> + Opt = rel_opt(Rel), + Pz = "-pz \"" ++ filename:dirname(code:which(?MODULE)) ++ "\"", + PzOpt = [{args,Pz}], + {ok,N1} = ?t:start_node(n1,peer,Opt ++ PzOpt), + {ok,_Pid} = rpc:call(N1,crashdump_helper_unicode,start,[]), + CD = dump(N1,DataDir,Rel,DumpName), + ?t:stop_node(n1), + CD. + dump(Node,DataDir,Rel,DumpName) -> Crashdump = filename:join(DataDir, dump_prefix(Rel)++DumpName), rpc:call(Node,os,putenv,["ERL_CRASH_DUMP",Crashdump]), |