From 0841aaf3a09b4ddcf5ea52a6c781f5e11cf85227 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 19 Mar 2013 14:32:02 +0100 Subject: [sasl] Quote path to program run with open_port({spawn,... This is to allow space in the path. --- lib/sasl/src/erlsrv.erl | 6 +++--- lib/sasl/test/release_handler_SUITE.erl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/erlsrv.erl b/lib/sasl/src/erlsrv.erl index 086dc7c651..58d43cda34 100644 --- a/lib/sasl/src/erlsrv.erl +++ b/lib/sasl/src/erlsrv.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2011. All Rights Reserved. +%% Copyright Ericsson AB 1998-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -39,7 +39,7 @@ current_version() -> run_erlsrv(Command) -> run_erlsrv(current_version(),Command). run_erlsrv(EVer, Command) -> - case catch(open_port({spawn, erlsrv(EVer) ++ " " ++ Command}, + case catch(open_port({spawn, "\"" ++ erlsrv(EVer) ++ "\" " ++ Command}, [{line,1000}, in, eof])) of {'EXIT',{Reason,_}} -> {port_error, Reason}; @@ -53,7 +53,7 @@ run_erlsrv(EVer, Command) -> end. run_erlsrv_interactive(EVer, Commands) -> - case catch(open_port({spawn, erlsrv(EVer) ++ " readargs"}, + case catch(open_port({spawn, "\""++ erlsrv(EVer) ++ "\" readargs"}, [{line,1000}, eof])) of {'EXIT',{Reason,_}} -> {port_error, Reason}; diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 97ba70c9bd..501220d3c6 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -2676,7 +2676,7 @@ rpc_inst(Node,Func,Args) -> delete_all_services() -> ErlSrv = erlsrv:erlsrv(erlang:system_info(version)), - [_|Serviceinfo] = string:tokens(os:cmd(ErlSrv ++ " list"),"\n"), + [_|Serviceinfo] = string:tokens(os:cmd("\"" ++ ErlSrv ++ "\" list"),"\n"), Services = [lists:takewhile(fun($\t) -> false; (_) -> true end,S) || S <- Serviceinfo], -- cgit v1.2.3 From efa025efd47516f58c429a7ec91f6c002e3a9170 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 15 Apr 2013 18:14:40 +0200 Subject: Update sasl version and sasl.appup.src for R17 Also clean up appup_test in sasl_SUITE by removing old versions that are no longer used. --- lib/sasl/src/sasl.appup.src | 14 ++++++-------- lib/sasl/test/sasl_SUITE.erl | 36 +----------------------------------- lib/sasl/vsn.mk | 2 +- 3 files changed, 8 insertions(+), 44 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index a4a38ee40a..0c4d80a74f 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -17,13 +17,11 @@ %% %CopyrightEnd% {"%VSN%", %% Up from - max two major revisions back - [{<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 - {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15 - {<<"2\\.1\\.10(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R14B04 - {<<"2\\.1\\.9\\.[24](\\.[0-9]+)*">>,[restart_new_emulator]}],%% R14B-R14B03 + [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17 + {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 + {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}], %% R15 %% Down to - max two major revisions back - [{<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 - {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15 - {<<"2\\.1\\.10(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R14B04 - {<<"2\\.1\\.9\\.[24](\\.[0-9]+)*">>,[restart_new_emulator]}] %% R14B-R14B03 + [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17 + {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 + {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R15 }. diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index b6eaf41323..e8f6a4a2eb 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011. All Rights Reserved. +%% Copyright Ericsson AB 2011-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -74,40 +74,6 @@ appup_test(_Config) -> check_appup(NokVsns,DownTo,error), ok. - -%% For sasl, the versions up to R14B03 were not according to the rule -%% used for other core applications - i.e. to change the second number -%% at major releases, the third at maintenance releases and the fourth -%% for patches - therefore test versions up to and including R16 are -%% hardcoded. -%% (All versions below are not necessarily existing.) --define(r12_vsns,["2.1.5"]). --define(r13_vsns,["2.1.6","2.1.7.1","2.1.9","2.1.9.1.2"]). --define(r14_vsns,["2.1.9.2","2.1.9.2.20","2.1.9.4","2.1.10"]). --define(r15_major,"2.2"). --define(r16_major,"2.3"). --define(r17_major,"2.4"). -create_test_vsns(?r15_major ++ Rest) -> - R15Vsns = - case string:tokens(Rest,".") of - [] -> []; - ["1"] -> [?r15_major]; - _ -> [?r15_major,?r15_major++".1"] - end, - OkVsns = ?r13_vsns ++ ?r14_vsns ++ R15Vsns, - NokVsns = ?r12_vsns ++ [?r15_major++",1", ?r16_major], - {OkVsns,NokVsns}; -create_test_vsns(?r16_major ++ Rest) -> - R16Vsns = - case string:tokens(Rest,".") of - [] -> []; - ["1"] -> [?r16_major]; - _ -> [?r16_major,?r16_major++".1"] - end, - OkVsns = ?r14_vsns ++ [?r15_major, ?r15_major ++ ".1.4"] ++ R16Vsns, - NokVsns = ?r13_vsns ++ [?r16_major++",1", ?r17_major], - {OkVsns,NokVsns}; -%% Normal erts case - i.e. for versions that comply to the erts standard create_test_vsns(Current) -> [XStr,YStr|Rest] = string:tokens(Current,"."), X = list_to_integer(XStr), diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index 0e52133166..da8cbc5130 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.3.1 +SASL_VSN = 2.4 -- cgit v1.2.3 From a40d4119238604652a9dcb9c092c103cf625a363 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 16 Apr 2013 09:59:50 +0200 Subject: Update "old vsn" in sasl test to R15 instead of R14 (two back from R17) --- lib/sasl/test/test_lib.hrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/test_lib.hrl b/lib/sasl/test/test_lib.hrl index eeef721647..37aa44c198 100644 --- a/lib/sasl/test/test_lib.hrl +++ b/lib/sasl/test/test_lib.hrl @@ -1,3 +1,3 @@ -define(ertsvsn,"4.4"). --define(kernelvsn,"2.14.3"). --define(stdlibvsn,"1.17.3"). +-define(kernelvsn,"2.15.3"). +-define(stdlibvsn,"1.18.3"). -- cgit v1.2.3 From 1f3afa8143d9aabc178b6fbcd09a693fc105065a Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 19 Apr 2013 15:29:19 +0200 Subject: Remove the "coding: utf-8" comment from all Erlang source files --- lib/sasl/src/overload.erl | 3 +-- lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/overload.erl b/lib/sasl/src/overload.erl index 97f7bebe00..736423484a 100644 --- a/lib/sasl/src/overload.erl +++ b/lib/sasl/src/overload.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app b/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app index 3d38a3dde4..7d56a298b8 100644 --- a/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app +++ b/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app @@ -1,4 +1,3 @@ -%% -*- coding: utf-8 -*- {application, ua, [{description, "αβ"}, {vsn, "1.0"}, -- cgit v1.2.3 From e5875001247e6a6ac4f474157a51a8c54f94ae49 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 14 Mar 2013 16:01:25 +0100 Subject: Convert XML files to UTF-8 --- lib/sasl/doc/src/alarm_handler.xml | 4 ++-- lib/sasl/doc/src/appup.xml | 4 ++-- lib/sasl/doc/src/book.xml | 4 ++-- lib/sasl/doc/src/error_logging.xml | 4 ++-- lib/sasl/doc/src/fascicules.xml | 2 +- lib/sasl/doc/src/notes.xml | 2 +- lib/sasl/doc/src/notes_history.xml | 4 ++-- lib/sasl/doc/src/overload.xml | 4 ++-- lib/sasl/doc/src/part.xml | 4 ++-- lib/sasl/doc/src/part_notes.xml | 4 ++-- lib/sasl/doc/src/part_notes_history.xml | 4 ++-- lib/sasl/doc/src/rb.xml | 4 ++-- lib/sasl/doc/src/ref_man.xml | 4 ++-- lib/sasl/doc/src/rel.xml | 4 ++-- lib/sasl/doc/src/release_handler.xml | 4 ++-- lib/sasl/doc/src/relup.xml | 4 ++-- lib/sasl/doc/src/sasl_app.xml | 4 ++-- lib/sasl/doc/src/sasl_intro.xml | 4 ++-- lib/sasl/doc/src/script.xml | 4 ++-- lib/sasl/doc/src/systools.xml | 4 ++-- 20 files changed, 38 insertions(+), 38 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/alarm_handler.xml b/lib/sasl/doc/src/alarm_handler.xml index 87be6d2a9e..ab3041137e 100644 --- a/lib/sasl/doc/src/alarm_handler.xml +++ b/lib/sasl/doc/src/alarm_handler.xml @@ -1,11 +1,11 @@ - +
1996 - 2011 + 2013 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml index bacfaa76ef..85fcbed3ba 100644 --- a/lib/sasl/doc/src/appup.xml +++ b/lib/sasl/doc/src/appup.xml @@ -1,10 +1,10 @@ - +
- 19972012 + 19972013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/book.xml b/lib/sasl/doc/src/book.xml index de6a533636..30f196be48 100644 --- a/lib/sasl/doc/src/book.xml +++ b/lib/sasl/doc/src/book.xml @@ -1,10 +1,10 @@ - +
- 19972009 + 19972013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml index 5707bc4d69..56b26b0e05 100644 --- a/lib/sasl/doc/src/error_logging.xml +++ b/lib/sasl/doc/src/error_logging.xml @@ -1,10 +1,10 @@ - +
- 19972009 + 19972013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/fascicules.xml b/lib/sasl/doc/src/fascicules.xml index 0678195e07..37feca543f 100644 --- a/lib/sasl/doc/src/fascicules.xml +++ b/lib/sasl/doc/src/fascicules.xml @@ -1,4 +1,4 @@ - + diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index f54b04c223..dfc6e9949d 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -1,4 +1,4 @@ - + diff --git a/lib/sasl/doc/src/notes_history.xml b/lib/sasl/doc/src/notes_history.xml index 50772ae4e3..3607d9204c 100644 --- a/lib/sasl/doc/src/notes_history.xml +++ b/lib/sasl/doc/src/notes_history.xml @@ -1,10 +1,10 @@ - +
- 20062009 + 20062013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/overload.xml b/lib/sasl/doc/src/overload.xml index 80457e75fa..3a82432647 100644 --- a/lib/sasl/doc/src/overload.xml +++ b/lib/sasl/doc/src/overload.xml @@ -1,10 +1,10 @@ - +
- 19962009 + 19962013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/part.xml b/lib/sasl/doc/src/part.xml index 647380efbd..99d5210278 100644 --- a/lib/sasl/doc/src/part.xml +++ b/lib/sasl/doc/src/part.xml @@ -1,10 +1,10 @@ - +
- 19962009 + 19962013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/part_notes.xml b/lib/sasl/doc/src/part_notes.xml index 1f572ae922..6a1e2e9408 100644 --- a/lib/sasl/doc/src/part_notes.xml +++ b/lib/sasl/doc/src/part_notes.xml @@ -1,10 +1,10 @@ - +
- 20042009 + 20042013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/part_notes_history.xml b/lib/sasl/doc/src/part_notes_history.xml index d8d48bfd46..53fc8a7fea 100644 --- a/lib/sasl/doc/src/part_notes_history.xml +++ b/lib/sasl/doc/src/part_notes_history.xml @@ -1,11 +1,11 @@ - +
2006 - 2011 + 2013 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml index 3da825878e..928b85d50b 100644 --- a/lib/sasl/doc/src/rb.xml +++ b/lib/sasl/doc/src/rb.xml @@ -1,10 +1,10 @@ - +
- 19962011 + 19962013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/ref_man.xml b/lib/sasl/doc/src/ref_man.xml index 09b745a705..fa13bf65c3 100644 --- a/lib/sasl/doc/src/ref_man.xml +++ b/lib/sasl/doc/src/ref_man.xml @@ -1,10 +1,10 @@ - +
- 19962009 + 19962013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/rel.xml b/lib/sasl/doc/src/rel.xml index 68ef90330f..82b54a767e 100644 --- a/lib/sasl/doc/src/rel.xml +++ b/lib/sasl/doc/src/rel.xml @@ -1,11 +1,11 @@ - +
1997 - 2012 + 2013 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/release_handler.xml b/lib/sasl/doc/src/release_handler.xml index e3438ede41..b8b9603bc0 100644 --- a/lib/sasl/doc/src/release_handler.xml +++ b/lib/sasl/doc/src/release_handler.xml @@ -1,10 +1,10 @@ - +
- 19962011 + 19962013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/relup.xml b/lib/sasl/doc/src/relup.xml index 7aba7e58ba..d7c1d6fbe4 100644 --- a/lib/sasl/doc/src/relup.xml +++ b/lib/sasl/doc/src/relup.xml @@ -1,11 +1,11 @@ - +
1997 - 2011 + 2013 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml index 446baccb08..9f8c5d782e 100644 --- a/lib/sasl/doc/src/sasl_app.xml +++ b/lib/sasl/doc/src/sasl_app.xml @@ -1,10 +1,10 @@ - +
- 19962011 + 19962013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/sasl_intro.xml b/lib/sasl/doc/src/sasl_intro.xml index 535f25e044..f3d4632218 100644 --- a/lib/sasl/doc/src/sasl_intro.xml +++ b/lib/sasl/doc/src/sasl_intro.xml @@ -1,10 +1,10 @@ - +
- 19972009 + 19972013 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/script.xml b/lib/sasl/doc/src/script.xml index 17cc64f08e..3a85e64e7a 100644 --- a/lib/sasl/doc/src/script.xml +++ b/lib/sasl/doc/src/script.xml @@ -1,11 +1,11 @@ - +
1997 - 2011 + 2013 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/systools.xml b/lib/sasl/doc/src/systools.xml index 84fed0a25f..6d88b228fd 100644 --- a/lib/sasl/doc/src/systools.xml +++ b/lib/sasl/doc/src/systools.xml @@ -1,11 +1,11 @@ - +
1996 - 2011 + 2013 Ericsson AB, All Rights Reserved -- cgit v1.2.3 From 19d41eefa1cf4856587930d99959bbed73a818b5 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 26 Apr 2013 14:21:12 +0200 Subject: Fix unmatched_return warnings in sasl --- lib/sasl/src/format_lib_supp.erl | 4 +-- lib/sasl/src/rb.erl | 14 ++++---- lib/sasl/src/release_handler_1.erl | 2 +- lib/sasl/src/sasl_report_file_h.erl | 6 ++-- lib/sasl/src/sasl_report_tty_h.erl | 4 +-- lib/sasl/src/si.erl | 4 +-- lib/sasl/src/si_sasl_supp.erl | 8 ++--- lib/sasl/src/systools_lib.erl | 12 ++++--- lib/sasl/src/systools_make.erl | 71 ++++++++++++++++++++++++------------- lib/sasl/src/systools_relup.erl | 19 ++++++---- lib/sasl/test/systools_SUITE.erl | 4 +-- 11 files changed, 89 insertions(+), 59 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/format_lib_supp.erl b/lib/sasl/src/format_lib_supp.erl index af15fd3288..5348bc6d59 100644 --- a/lib/sasl/src/format_lib_supp.erl +++ b/lib/sasl/src/format_lib_supp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -77,7 +77,7 @@ print_format(Device, Line, [{data, Data}|T]) -> print_data(Device, Line, Data), print_format(Device, Line, T); print_format(Device, Line, [{table, Table}|T]) -> - print_table(Device, Line, Table), + _ = print_table(Device, Line, Table), print_format(Device, Line, T); print_format(Device, Line, [{items, Items}|T]) -> print_items(Device, Line, Items), diff --git a/lib/sasl/src/rb.erl b/lib/sasl/src/rb.erl index 8004ef2c5a..eb65aa8786 100644 --- a/lib/sasl/src/rb.erl +++ b/lib/sasl/src/rb.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2011. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -309,11 +309,11 @@ scan_files(RptDir, Max, Type) -> {ok, Fd} -> case catch file:read(Fd, 1) of {ok, [LastWritten]} -> - file:close(Fd), + ok = file:close(Fd), Files = make_file_list(RptDir, LastWritten), scan_files(RptDir, Files, Max, Type); _X -> - file:close(Fd), + _ = file:close(Fd), exit("cannot read the index file") end; _X -> exit("cannot read the index file") @@ -386,7 +386,7 @@ read_reports(No, Fd, Fname, Max, Type) -> io:format("rb: reading report..."), case catch read_reports(Fd, [], Type) of {ok, Res} -> - file:close(Fd), + ok = file:close(Fd), io:format("done.~n"), NewRes = if @@ -397,7 +397,7 @@ read_reports(No, Fd, Fname, Max, Type) -> end, add_report_data(NewRes, No, Fname); {error, [Problem | Res]} -> - file:close(Fd), + _ = file:close(Fd), io:format("Error: ~p~n",[Problem]), io:format("Salvaged ~p entries from corrupt report file ~s...~n", [length(Res),Fname]), @@ -898,7 +898,7 @@ handle_bad_form(Date, Msg, Device, Abort, Log) -> end. read_rep_msg(Fd, FilePosition) -> - file:position(Fd, {bof, FilePosition}), + {ok,_} = file:position(Fd, {bof, FilePosition}), Res = case catch read_report(Fd) of {ok, Report} -> @@ -906,5 +906,5 @@ read_rep_msg(Fd, FilePosition) -> {Date, Report}; _ -> error end, - file:close(Fd), + ok = file:close(Fd), Res. diff --git a/lib/sasl/src/release_handler_1.erl b/lib/sasl/src/release_handler_1.erl index b37ae2f944..fa6ef77b2d 100644 --- a/lib/sasl/src/release_handler_1.erl +++ b/lib/sasl/src/release_handler_1.erl @@ -349,7 +349,7 @@ eval({load, {Mod, _PrePurgeMethod, PostPurgeMethod}}, EvalState) -> {value, {_Mod, Bin, File}} = lists:keysearch(Mod, 1, Bins), % load_binary kills all procs running old code % if soft_purge, we know that there are no such procs now - code:load_binary(Mod, File, Bin), + {module,_} = code:load_binary(Mod, File, Bin), % Now, the prev current is old. There might be procs % running it. Find them. Unpurged = do_soft_purge(Mod,PostPurgeMethod,EvalState#eval_state.unpurged), diff --git a/lib/sasl/src/sasl_report_file_h.erl b/lib/sasl/src/sasl_report_file_h.erl index f4810d31cc..f42b4b5ff2 100644 --- a/lib/sasl/src/sasl_report_file_h.erl +++ b/lib/sasl/src/sasl_report_file_h.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -40,7 +40,7 @@ init({File, Type}) -> handle_event({_Type, GL, _Msg}, State) when node(GL) /= node() -> {ok, State}; handle_event(Event, {Fd, File, Type}) -> - sasl_report:write_report(Fd, Type, tag_event(Event)), + _ = sasl_report:write_report(Fd, Type, tag_event(Event)), {ok, {Fd, File, Type}}; handle_event(_, State) -> {ok, State}. @@ -53,7 +53,7 @@ handle_info(_, State) -> handle_call(_Query, _State) -> {error, bad_query}. terminate(_, {Fd, _File, _Type}) -> - file:close(Fd), + _ = file:close(Fd), []. tag_event(Event) -> diff --git a/lib/sasl/src/sasl_report_tty_h.erl b/lib/sasl/src/sasl_report_tty_h.erl index 064f0471f2..8d63428aeb 100644 --- a/lib/sasl/src/sasl_report_tty_h.erl +++ b/lib/sasl/src/sasl_report_tty_h.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -35,7 +35,7 @@ init(Type) -> handle_event({Type, GL, _Msg}, Type) when node(GL) /= node() -> {ok, Type}; handle_event(Event, Type) -> - sasl_report:write_report(standard_io, Type, tag_event(Event)), + _ = sasl_report:write_report(standard_io, Type, tag_event(Event)), {ok, Type}. handle_info(_, Type) -> {ok, Type}. diff --git a/lib/sasl/src/si.erl b/lib/sasl/src/si.erl index eeed7a9f55..e2f6d95e58 100644 --- a/lib/sasl/src/si.erl +++ b/lib/sasl/src/si.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -135,7 +135,7 @@ pi_impl(Opt, XPid) -> {status_info, Pid, {module, Module}, Data} -> si_sasl_supp:do_best_printout(Opt, Pid, Module, Data); {error, Reason} -> - si_sasl_supp:ppi_impl(Pid), + _ = si_sasl_supp:ppi_impl(Pid), {error, {"can not get status info from process:", XPid, Reason}}; diff --git a/lib/sasl/src/si_sasl_supp.erl b/lib/sasl/src/si_sasl_supp.erl index c4fc0c5f08..12b2557cd6 100644 --- a/lib/sasl/src/si_sasl_supp.erl +++ b/lib/sasl/src/si_sasl_supp.erl @@ -162,7 +162,7 @@ handle_call(stop, _From, State) -> {stop, normal, stopped, State}. terminate(_Reason, _State) -> - close_device(get(device)), + _ = close_device(get(device)), ok. handle_cast(_Msg, State) -> @@ -190,7 +190,7 @@ open_log_file(undefined, NewFile) -> open_log_file(standard_io, NewFile) -> open_log_file(NewFile); open_log_file(OldFile, NewFile) -> - file:close(OldFile), + _ = file:close(OldFile), open_log_file(NewFile). open_log_file(standard_io) -> standard_io; @@ -317,7 +317,7 @@ pi_impl(Opt, XPid) -> {status_info, Pid, {module, Module}, Data} -> do_best_printout(Opt, Pid, Module, Data); {error, Reason} -> - ppi_impl(Pid), + _ = ppi_impl(Pid), {error, {"can not get status info from process:", XPid, Reason}} @@ -335,7 +335,7 @@ do_best_printout(Opt, Pid, Mod, Data) when is_pid(Pid) -> case print_info(get(device), Pid, {Mod, format_status}, Opt, Data) of ok -> ok; {error, Reason} -> - ppi_impl(Pid), + _ = ppi_impl(Pid), {error, Reason} end. diff --git a/lib/sasl/src/systools_lib.erl b/lib/sasl/src/systools_lib.erl index 6618baa2aa..0a96f2bd48 100644 --- a/lib/sasl/src/systools_lib.erl +++ b/lib/sasl/src/systools_lib.erl @@ -34,8 +34,10 @@ file_term2binary(FileIn, FileOut) -> case read_term(FileIn) of {ok, Term} -> - file:write_file(FileOut, term_to_binary(Term)), - ok; + case file:write_file(FileOut, term_to_binary(Term)) of + ok -> ok; + {error,Error} -> {error,{open,FileOut,Error}} + end; Other -> Other end. @@ -51,8 +53,10 @@ read_term(File) -> case file:open(File, [read]) of {ok, Stream} -> Res = read_term_from_stream(Stream, File), - file:close(Stream), - Res; + case file:close(Stream) of + ok -> Res; + {error,Error} -> {error,{close,File,Error}} + end; {error, Error} -> {error, {open,File,Error}} end. diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index 193dbb64bf..0a7d05c753 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -406,9 +406,9 @@ check_rel(Release) -> end. check_rel1({release,{Name,Vsn},{erts,EVsn},Appl}) when is_list(Appl) -> - check_name(Name), - check_vsn(Vsn), - check_evsn(EVsn), + Name = check_name(Name), + Vsn = check_vsn(Vsn), + EVsn = check_evsn(EVsn), {{Appls,Incls},Ws} = check_appl(Appl), {ok, {Name,Vsn,EVsn,Appls,Incls},Ws}; check_rel1(_) -> @@ -974,7 +974,8 @@ check_xref(Appls, Path, XrefP) -> ok; {error, {already_started, _Pid}} -> xref:stop(?XREF_SERVER), %% Clear out any previous data - xref:start(?XREF_SERVER, XrefArgs) + {ok,_} = xref:start(?XREF_SERVER, XrefArgs), + ok end, {ok, _} = xref:set_default(?XREF_SERVER, verbose, false), LibPath = case Path == code:get_path() of @@ -1146,14 +1147,17 @@ generate_script(Output, Release, Appls, Flags) -> {ok, Fd} -> io:format(Fd, "%% script generated at ~w ~w\n~p.\n", [date(), time(), Script]), - file:close(Fd), - - BootFile = Output ++ ".boot", - case file:write_file(BootFile, term_to_binary(Script)) of + case file:close(Fd) of ok -> - ok; + BootFile = Output ++ ".boot", + case file:write_file(BootFile, term_to_binary(Script)) of + ok -> + ok; + {error, Reason} -> + {error, ?MODULE, {open,BootFile,Reason}} + end; {error, Reason} -> - {error, ?MODULE, {open,BootFile,Reason}} + {error, ?MODULE, {close,ScriptFile,Reason}} end; {error, Reason} -> {error, ?MODULE, {open,ScriptFile,Reason}} @@ -1529,14 +1533,16 @@ mk_tar(RelName, Release, Appls, Flags, Path1) -> Tar = open_main_tar(TarName), case catch mk_tar(Tar, RelName, Release, Appls, Flags, Path1) of {error,Error} -> - del_tar(Tar, TarName), + _ = del_tar(Tar, TarName), {error,?MODULE,Error}; {'EXIT',Reason} -> - del_tar(Tar, TarName), + _ = del_tar(Tar, TarName), {error,?MODULE,Reason}; _ -> - close_tar(Tar), - ok + case erl_tar:close(Tar) of + ok -> ok; + {error,Reason} -> {error,?MODULE,{close,TarName,Reason}} + end end. open_main_tar(TarName) -> @@ -1591,14 +1597,13 @@ add_variable_tar({Variable,P}, Appls, Tar, Flags) -> case catch add_applications(Appls, VarTar, [{Variable,P}], Flags, Variable) of ok when Flag == include -> - close_tar(VarTar), + close_tar(VarTar,TarName), add_to_tar(Tar, TarName, TarName), del_file(TarName); ok when Flag == ownfile -> - close_tar(VarTar), - ok; + close_tar(VarTar,TarName); Error -> - del_tar(VarTar, TarName), + _ = del_tar(VarTar, TarName), throw(Error) end end. @@ -1856,12 +1861,15 @@ open_tar(TarName) -> throw({error,{tar_error, {open, TarName, Error}}}) end. -close_tar(Tar) -> - erl_tar:close(Tar). +close_tar(Tar,File) -> + case erl_tar:close(Tar) of + ok -> ok; + {error,Reason} -> throw({error,{close,File,Reason}}) + end. del_tar(Tar, TarName) -> - close_tar(Tar), - del_file(TarName). + _ = erl_tar:close(Tar), + file:delete(TarName). add_to_tar(Tar, FromFile, ToFile) -> case erl_tar:add(Tar, FromFile, ToFile, [compressed, dereference]) of @@ -1916,13 +1924,20 @@ read_file(File, Path) -> Other -> Other end, - file:close(Stream), - Return; + case file:close(Stream) of + ok -> Return; + {error, Error} -> {error, {close,File,Error}} + end; _Other -> {error, {not_found, File}} end. -del_file(File) -> file:delete(File). +del_file(File) -> + case file:delete(File) of + ok -> ok; + {error, Error} -> + throw({error, {delete, File, Error}}) + end. dirp(Dir) -> case file:read_file_info(Dir) of @@ -2238,6 +2253,12 @@ format_error({read,File}) -> format_error({open,File,Error}) -> io_lib:format("Cannot open ~p - ~ts~n", [File,file:format_error(Error)]); +format_error({close,File,Error}) -> + io_lib:format("Cannot close ~p - ~ts~n", + [File,file:format_error(Error)]); +format_error({delete,File,Error}) -> + io_lib:format("Cannot delete ~p - ~ts~n", + [File,file:format_error(Error)]); format_error({tar_error,What}) -> form_tar_err(What); format_error(ListOfErrors) when is_list(ListOfErrors) -> diff --git a/lib/sasl/src/systools_relup.erl b/lib/sasl/src/systools_relup.erl index 716dc2b5ff..b3494542e5 100644 --- a/lib/sasl/src/systools_relup.erl +++ b/lib/sasl/src/systools_relup.erl @@ -523,7 +523,7 @@ to_list(X) when is_atom(X) -> atom_to_list(X); to_list(X) when is_list(X) -> X. -%% write_relup_file(Relup, Opts) -> {ok. Relup} +%% write_relup_file(Relup, Opts) -> ok %% %% Writes a relup file. %% @@ -545,12 +545,17 @@ write_relup_file(Relup, Opts) -> case file:open(Filename, [write]) of {ok, Fd} -> io:format(Fd, "~p.~n", [Relup]), - file:close(Fd); + case file:close(Fd) of + ok -> ok; + {error,Reason} -> + throw({error, ?MODULE, + {file_problem, {"relup", {close,Reason}}}}) + end; {error, Reason} -> - throw({error, ?MODULE, {file_problem, {"relup", Reason}}}) + throw({error, ?MODULE, + {file_problem, {"relup", {open, Reason}}}}) end - end, - {ok, Relup}. + end. add_code_path(Opts) -> case get_opt(path, Opts) of @@ -597,8 +602,6 @@ print_error({error, Mod, Error}) -> print_error(Other) -> io:format("Error: ~p~n", [Other]). -format_error({file_problem, {"relup", _Posix}}) -> - io_lib:format("Could not open file relup~n", []); format_error({file_problem, {File, What}}) -> io_lib:format("Could not ~w file ~ts~n", [get_reason(What), File]); format_error({no_relup, File, App, Vsn}) -> @@ -642,12 +645,14 @@ format_warning(Prefix, What) -> get_reason({error, {open, _, _}}) -> open; get_reason({error, {read, _, _}}) -> read; get_reason({error, {parse, _, _}}) -> parse; +get_reason({error, {close, _, _}}) -> close; get_reason({error, {open, _}}) -> open; get_reason({error, {read, _}}) -> read; get_reason({error, {parse, _}}) -> parse; get_reason({open, _}) -> open; get_reason({read, _}) -> read; get_reason({parse, _}) -> parse; +get_reason({close, _}) -> close; get_reason(open) -> open; get_reason(read) -> read; get_reason(parse) -> parse. diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 367cab1d77..5e95b13077 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1924,12 +1924,12 @@ otp_6226_outdir(Config) when is_list(Config) -> ok = file:delete(Relup), %% d) absolute but incorrect path - {error,_,{file_problem,{"relup",enoent}}} = + {error,_,{file_problem,{"relup",{open,enoent}}}} = systools:make_relup(LatestName,[LatestName1],[LatestName1], [{outdir,Outdir2},{path,P},silent]), %% e) relative but incorrect path - {error,_,{file_problem,{"relup",enoent}}} = + {error,_,{file_problem,{"relup",{open,enoent}}}} = systools:make_relup(LatestName,[LatestName1],[LatestName1], [{outdir,"./outdir2"},{path,P},silent]), -- cgit v1.2.3 From dd850c00803939e44d7f2ea6659825d0ab861b9d Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 8 May 2013 11:36:34 +0200 Subject: [sasl] In test, quote erlsrv executable in call to open_port/2 --- lib/sasl/test/rh_test_lib.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/rh_test_lib.erl b/lib/sasl/test/rh_test_lib.erl index 99a7f919a7..c9a425c729 100644 --- a/lib/sasl/test/rh_test_lib.erl +++ b/lib/sasl/test/rh_test_lib.erl @@ -13,7 +13,8 @@ erlsrv(Erlsrv,Action,Name) -> erlsrv(Erlsrv,Action,Name,""). erlsrv(Erlsrv,Action,Name,Rest) -> - Cmd = Erlsrv ++ " " ++ atom_to_list(Action) ++ " " ++ Name ++ " " ++ Rest, + Cmd = "\"" ++ Erlsrv ++ "\" " ++ atom_to_list(Action) ++ " " ++ + Name ++ " " ++ Rest, io:format("erlsrv cmd: ~p~n",[Cmd]), Port = open_port({spawn, Cmd}, [stream, {line, 100}, eof, in]), Res = recv_prog_output(Port), -- cgit v1.2.3 From 45b6ff14ff5a644517ca029fafdae8a63700cd93 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 21 Feb 2013 09:47:22 +0100 Subject: [sasl] Write erl.ini as utf8, allowing unicode path for root dir and bin dir --- lib/sasl/src/release_handler.erl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl index c1b715b970..5dd84ca521 100644 --- a/lib/sasl/src/release_handler.erl +++ b/lib/sasl/src/release_handler.erl @@ -2205,23 +2205,23 @@ set_static_files(SrcDir, DestDir, Masters) -> write_ini_file(RootDir,EVsn,Masters) -> BinDir = filename:join([RootDir,"erts-"++EVsn,"bin"]), Str0 = io_lib:format("[erlang]~n" - "Bindir=~s~n" + "Bindir=~ts~n" "Progname=erl~n" - "Rootdir=~s~n", + "Rootdir=~ts~n", [filename:nativename(BinDir), filename:nativename(RootDir)]), - Str = re:replace(Str0,"\\\\","\\\\\\\\",[{return,list},global]), + Str = re:replace(Str0,"\\\\","\\\\\\\\",[{return,list},global,unicode]), IniFile = filename:join(BinDir,"erl.ini"), do_write_ini_file(IniFile,Str,Masters). do_write_ini_file(File,Data,false) -> - case do_write_file(File, Data) of + case do_write_file(File, Data, [{encoding,utf8}]) of ok -> ok; Error -> throw(Error) end; do_write_ini_file(File,Data,Masters) -> all_masters(Masters), - safe_write_file_m(File, Data, Masters). + safe_write_file_m(File, Data, [{encoding,utf8}], Masters). %%----------------------------------------------------------------- @@ -2235,13 +2235,15 @@ do_write_ini_file(File,Data,Masters) -> %% (as long as possible), except for 4 which is allowed to fail. %%----------------------------------------------------------------- safe_write_file_m(File, Data, Masters) -> + safe_write_file_m(File, Data, [], Masters). +safe_write_file_m(File, Data, FileOpts, Masters) -> Backup = File ++ ".backup", Change = File ++ ".change", case at_all_masters(Masters, ?MODULE, do_copy_files, [File, [Backup]]) of ok -> case at_all_masters(Masters, ?MODULE, do_write_file, - [Change, Data]) of + [Change, Data, FileOpts]) of ok -> case at_all_masters(Masters, file, rename, [Change, File]) of -- cgit v1.2.3 From a89ed3d94f3966d07a061fe540a87db15357e4d2 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 12 Feb 2013 20:00:09 +0100 Subject: [sasl] Update example/target_system.erl to handle unicode This example module can now create and install a release in a directory which contains unicode characters. The erlang node must be started with the +fnu* switch for this work. --- lib/sasl/examples/src/target_system.erl | 35 ++++++------ lib/sasl/test/release_handler_SUITE.erl | 95 +++++++++++++++++++++++++++++---- 2 files changed, 104 insertions(+), 26 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/examples/src/target_system.erl b/lib/sasl/examples/src/target_system.erl index ffc0fcf443..fb9e9aaaaf 100644 --- a/lib/sasl/examples/src/target_system.erl +++ b/lib/sasl/examples/src/target_system.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011. All Rights Reserved. +%% Copyright Ericsson AB 2011-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -34,9 +34,9 @@ create(RelFileName,SystoolsOpts) -> Dir = filename:dirname(RelFileName), PlainRelFileName = filename:join(Dir,"plain"), PlainRelFile = PlainRelFileName ++ ".rel", - io:fwrite("Reading file: ~p ...~n", [RelFile]), + io:fwrite("Reading file: ~tp ...~n", [RelFile]), {ok, [RelSpec]} = file:consult(RelFile), - io:fwrite("Creating file: ~p from ~p ...~n", + io:fwrite("Creating file: ~tp from ~tp ...~n", [PlainRelFile, RelFile]), {release, {RelName, RelVsn}, @@ -57,41 +57,41 @@ create(RelFileName,SystoolsOpts) -> io:fwrite(Fd, "~p.~n", [PlainRelSpec]), file:close(Fd), - io:fwrite("Making \"~s.script\" and \"~s.boot\" files ...~n", + io:fwrite("Making \"~ts.script\" and \"~ts.boot\" files ...~n", [PlainRelFileName,PlainRelFileName]), make_script(PlainRelFileName,SystoolsOpts), - io:fwrite("Making \"~s.script\" and \"~s.boot\" files ...~n", + io:fwrite("Making \"~ts.script\" and \"~ts.boot\" files ...~n", [RelFileName, RelFileName]), make_script(RelFileName,SystoolsOpts), TarFileName = filename:join(Dir,RelFileName ++ ".tar.gz"), - io:fwrite("Creating tar file ~p ...~n", [TarFileName]), + io:fwrite("Creating tar file ~tp ...~n", [TarFileName]), make_tar(RelFileName,SystoolsOpts), TmpDir = filename:join(Dir,"tmp"), - io:fwrite("Creating directory ~p ...~n",[TmpDir]), + io:fwrite("Creating directory ~tp ...~n",[TmpDir]), file:make_dir(TmpDir), - io:fwrite("Extracting ~p into directory ~p ...~n", [TarFileName,TmpDir]), + io:fwrite("Extracting ~tp into directory ~tp ...~n", [TarFileName,TmpDir]), extract_tar(TarFileName, TmpDir), TmpBinDir = filename:join([TmpDir, "bin"]), ErtsBinDir = filename:join([TmpDir, "erts-" ++ ErtsVsn, "bin"]), - io:fwrite("Deleting \"erl\" and \"start\" in directory ~p ...~n", + io:fwrite("Deleting \"erl\" and \"start\" in directory ~tp ...~n", [ErtsBinDir]), file:delete(filename:join([ErtsBinDir, "erl"])), file:delete(filename:join([ErtsBinDir, "start"])), - io:fwrite("Creating temporary directory ~p ...~n", [TmpBinDir]), + io:fwrite("Creating temporary directory ~tp ...~n", [TmpBinDir]), file:make_dir(TmpBinDir), - io:fwrite("Copying file \"~s.boot\" to ~p ...~n", + io:fwrite("Copying file \"~ts.boot\" to ~tp ...~n", [PlainRelFileName, filename:join([TmpBinDir, "start.boot"])]), copy_file(PlainRelFileName++".boot",filename:join([TmpBinDir, "start.boot"])), io:fwrite("Copying files \"epmd\", \"run_erl\" and \"to_erl\" from \n" - "~p to ~p ...~n", + "~tp to ~tp ...~n", [ErtsBinDir, TmpBinDir]), copy_file(filename:join([ErtsBinDir, "epmd"]), filename:join([TmpBinDir, "epmd"]), [preserve]), @@ -101,11 +101,11 @@ create(RelFileName,SystoolsOpts) -> filename:join([TmpBinDir, "to_erl"]), [preserve]), StartErlDataFile = filename:join([TmpDir, "releases", "start_erl.data"]), - io:fwrite("Creating ~p ...~n", [StartErlDataFile]), + io:fwrite("Creating ~tp ...~n", [StartErlDataFile]), StartErlData = io_lib:fwrite("~s ~s~n", [ErtsVsn, RelVsn]), write_file(StartErlDataFile, StartErlData), - io:fwrite("Recreating tar file ~p from contents in directory ~p ...~n", + io:fwrite("Recreating tar file ~tp from contents in directory ~tp ...~n", [TarFileName,TmpDir]), {ok, Tar} = erl_tar:open(TarFileName, [write, compressed]), %% {ok, Cwd} = file:get_cwd(), @@ -117,14 +117,14 @@ create(RelFileName,SystoolsOpts) -> erl_tar:add(Tar, filename:join(TmpDir,"lib"), "lib", []), erl_tar:close(Tar), %% file:set_cwd(Cwd), - io:fwrite("Removing directory ~p ...~n",[TmpDir]), + io:fwrite("Removing directory ~tp ...~n",[TmpDir]), remove_dir_tree(TmpDir), ok. install(RelFileName, RootDir) -> TarFile = RelFileName ++ ".tar.gz", - io:fwrite("Extracting ~p ...~n", [TarFile]), + io:fwrite("Extracting ~tp ...~n", [TarFile]), extract_tar(TarFile, RootDir), StartErlDataFile = filename:join([RootDir, "releases", "start_erl.data"]), {ok, StartErlData} = read_txt_file(StartErlDataFile), @@ -235,8 +235,9 @@ copy_file(Src, Dest, Opts) -> end. write_file(FName, Conts) -> + Enc = file:native_name_encoding(), {ok, Fd} = file:open(FName, [write]), - file:write(Fd, Conts), + file:write(Fd, unicode:characters_to_binary(Conts,Enc,Enc)), file:close(Fd). read_txt_file(File) -> diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index a56924d5ca..f103537142 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -50,7 +50,7 @@ unix_cases() -> true -> [{group, release}]; false -> [no_run_erl] end, - [target_system] ++ RunErlCases ++ cases(). + [target_system, target_system_unicode] ++ RunErlCases ++ cases(). win32_cases() -> [{group,release} | cases()]. @@ -1559,6 +1559,9 @@ eval_appup_with_restart(Conf) when is_list(Conf) -> %% Test the example/target_system.erl module target_system(Conf) when is_list(Conf) -> PrivDir = priv_dir(Conf), + target_system1(Conf,PrivDir). + +target_system1(Conf,PrivDir) -> DataDir = ?config(data_dir,Conf), TargetCreateDir = filename:join([PrivDir,"target_system","create"]), @@ -1567,7 +1570,6 @@ target_system(Conf) when is_list(Conf) -> ok = filelib:ensure_dir(filename:join(TargetCreateDir,"xx")), ok = filelib:ensure_dir(filename:join(TargetInstallDir,"xx")), - %% Create the .rel file RelName = filename:join(TargetCreateDir,"ts-1.0"), RelFile = RelName++".rel", @@ -1607,7 +1609,8 @@ target_system(Conf) when is_list(Conf) -> StdlibVsn = vsn(stdlib,current), SaslVsn = vsn(sasl,current), RelFileBasename = filename:basename(RelFile), - true = filelib:is_dir(filename:join(LibDir,"kernel-"++KernelVsn)), + KernelLibDir = filename:join(LibDir,"kernel-"++KernelVsn), + true = filelib:is_dir(KernelLibDir), true = filelib:is_dir(filename:join(LibDir,"stdlib-"++StdlibVsn)), true = filelib:is_dir(filename:join(LibDir,"sasl-"++SaslVsn)), true = filelib:is_dir(filename:join(LibDir,"a-1.0")), @@ -1616,11 +1619,13 @@ target_system(Conf) when is_list(Conf) -> true = filelib:is_regular(filename:join(RelDir,"start_erl.data")), true = filelib:is_regular(filename:join(RelDir,RelFileBasename)), true = filelib:is_dir(filename:join(RelDir,RelVsn)), - true = filelib:is_regular(filename:join([RelDir,RelVsn,"start.boot"])), + StartBoot = filename:join([RelDir,RelVsn,"start.boot"]), + true = filelib:is_regular(StartBoot), true = filelib:is_regular(filename:join([RelDir,RelVsn,RelFileBasename])), BinDir = filename:join(TargetInstallDir,bin), + Erl = filename:join(BinDir,erl), + true = filelib:is_regular(Erl), true = filelib:is_regular(filename:join(BinDir,"start.boot")), - true = filelib:is_regular(filename:join(BinDir,erl)), true = filelib:is_regular(filename:join(BinDir,start_erl)), true = filelib:is_regular(filename:join(BinDir,start)), true = filelib:is_regular(filename:join(BinDir,epmd)), @@ -1631,9 +1636,81 @@ target_system(Conf) when is_list(Conf) -> ErtsVsn = vsn(erts,current), {ok,SED} = file:read_file(filename:join(RelDir,"start_erl.data")), [ErtsVsn,RelVsn] = string:tokens(binary_to_list(SED),"\s\n"), + + %% Check that installation can be started + Sname = list_to_atom(atom_to_list(?MODULE) ++ "-target_system"), + {ok,Node} = start_target_node_with_erl(Erl,Sname,StartBoot), + + TargetInstallDir = rpc:call(Node,code,root_dir,[]), + KernelLibDir = rpc:call(Node,code,lib_dir,[kernel]), + [{RelName,RelVsn,_Apps,permanent}] = + rpc:call(Node,release_handler,which_releases,[]), + + ?t:format("Target node ok:~nRootDir: ~ts~nKernelLibDir: ~ts~nRelease: ~ts", + [TargetInstallDir,KernelLibDir,RelName]), + ok. +target_system(cleanup,_Conf) -> + Sname = list_to_atom(atom_to_list(?MODULE) ++ "-target_system"), + stop_target_node(node_name(Sname)), + ok. +start_target_node_with_erl(Erl,Sname,Boot) -> + FullName = node_name(Sname), + FilenameMode = case file:native_name_encoding() of + latin1 -> "+fnl"; + utf8 -> "+fnui" + end, + Args = [FilenameMode,"-detached", "-noinput","-sname",atom_to_list(Sname), + "-boot",filename:rootname(Boot)], + ?t:format("Starting node ~p: ~ts~n", + [FullName, lists:flatten([[X," "] || X <- [Erl|Args]])]), + ?t:format("open_port({spawn_executable, ~tp}, [{args,~p}])~n",[Erl,Args]), + case open_port({spawn_executable, Erl}, [{args,Args}]) of + Port when is_port(Port) -> + unlink(Port), + erlang:port_close(Port), + %% timer:sleep(10000), + %% io:format("PING: ~p~n",[net_adm:ping(FullName)]), + ok = wait_nodes_up([FullName],"target_system test node"), + {ok,FullName}; + Error -> + ?t:fail({failed_to_start_node, FullName, Error}) + end. + +stop_target_node(Node) -> + monitor_node(Node, true), + _ = rpc:call(Node,erlang,halt,[]), + receive {nodedown, Node} -> ok end. + +%% Test that the example/target_system.erl module can create and +%% install under a path which includes unicode characters +target_system_unicode(Conf) when is_list(Conf) -> + PrivDir = priv_dir(Conf), + UnicodeStr = [945,946], % alhpa beta in greek letters + UnicodePrivDir = filename:join(PrivDir,UnicodeStr), + + PA = filename:dirname(code:which(?MODULE)), + + %% Make sure this runs on a node with unicode file name mode + Sname = list_to_atom(atom_to_list(?MODULE) ++ "-target_system_unicode"), + {ok,Node} = ?t:start_node(Sname,peer,[{args,"+fnui -pa " ++ PA}]), + ok = rpc:call(Node,file,make_dir,[UnicodePrivDir]), + case rpc:call(Node,application,start,[sasl]) of + ok -> ok; + {error,{already_started,sasl}} -> ok; + Error -> ?t:fail({failed_to_start_sasl_on_test_node,Node,Error}) + end, + ok = rpc:call(Node,?MODULE,target_system1,[Conf,UnicodePrivDir]), + ok. + +target_system_unicode(cleanup,Conf) -> + Sname = list_to_atom(atom_to_list(?MODULE) ++ "-target_system_unicode"), + Node = node_name(Sname), + _ = rpc:call(Node,?MODULE,target_system,[cleanup,Conf]), + _ = stop_node(Node), + ok. %%%================================================================= %%% Testing global groups. @@ -1852,7 +1929,7 @@ stop_node(Node) -> copy_client(Conf,Master,Sname,Client) -> - io:format("copy_client(Conf)"), + ?t:format("copy_client(Conf)"), DataDir = ?config(data_dir, Conf), MasterDir = filename:join(priv_dir(Conf),Master), @@ -2012,7 +2089,7 @@ chmod(Dest,Opts) -> copy_error(Src, Dest, Reason) -> - io:format("Copy ~s to ~s failed: ~s\n", + ?t:format("Copy ~s to ~s failed: ~s\n", [Src,Dest,file:format_error(Reason)]), ?t:fail(file_copy_failed). @@ -2513,9 +2590,9 @@ start_node_unix(Sname,NodeDir) -> Script = filename:join([NodeDir,"bin","start"]), Cmd = "env NODENAME="++atom_to_list(Sname) ++ " " ++ Script, %% {ok,StartFile} = file:read_file(Cmd), - %% io:format("~s:\n~s~n~n",[Start,binary_to_list(StartFile)]), + %% ?t:format("~s:\n~s~n~n",[Start,binary_to_list(StartFile)]), Res = os:cmd(Cmd), - io:format("Start ~p: ~p~n=>\t~p~n", [Sname,Cmd,Res]). + ?t:format("Start ~p: ~p~n=>\t~p~n", [Sname,Cmd,Res]). start_node_win32(Sname,NodeDir) -> Name = atom_to_list(Sname) ++ "_P1G", -- cgit v1.2.3 From 6a093c47d87707480d1710fc6790b57f1520cef7 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 13 Feb 2013 11:21:36 +0100 Subject: [sasl] Rewrite release_handler_SUITE:clean_priv_dir to work on unicode paths This function used os:cmd("rm -rf " ++ File), and it failed when the file path contained characters > 255. The function now uses file:delete/1 and file:del_dir/1 instead. --- lib/sasl/test/release_handler_SUITE.erl | 87 +++++++++++---------------------- 1 file changed, 28 insertions(+), 59 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index f103537142..4cf4122959 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -20,6 +20,7 @@ -include_lib("common_test/include/ct.hrl"). -include("test_lib.hrl"). +-include_lib("kernel/include/file.hrl"). -compile(export_all). @@ -1969,80 +1970,48 @@ copy_client(Conf,Master,Sname,Client) -> clean_priv_dir(Conf,Save) -> PrivDir = priv_dir(Conf), - {ok, OrigWd} = file:get_cwd(), - - ok = file:set_cwd(PrivDir), ?t:format("======== current dir ~p~n",[PrivDir]), - {ok, Dirs} = file:list_dir(PrivDir), + Dirs = filelib:wildcard(filename:join(PrivDir,"*")), ?t:format("======== deleting ~p~n",[Dirs]), - ok = clean_dirs_os(Dirs,Save), - {ok,Remaining} = file:list_dir(PrivDir), + ok = rm_rf(Dirs,Save), + Remaining = filelib:wildcard(filename:join(PrivDir,"*")), ?t:format("======== remaining ~p~n",[Remaining]), case Remaining of [] -> ok; _ -> - clean_dirs_os(Remaining,Save), - Remaining2 = file:list_dir(PrivDir), + rm_rf(Remaining,Save), + Remaining2 = filelib:wildcard(filename:join(PrivDir,"*")), ?t:format("======== remaining after second try ~p~n",[Remaining2]) end, - ok = file:set_cwd(OrigWd), ok. -clean_dirs_os(Dirs,Save) -> - case os:type() of - {unix, _} -> - clean_dirs_unix(Dirs,Save); - {win32, _} -> - clean_dirs_win32(Dirs,Save); - Os -> - test_server:fail({error, {not_yet_implemented_os, Os}}) - end. - - -clean_dirs_unix([],_) -> - ok; -clean_dirs_unix(["save"|Dirs],Save) when Save -> - clean_dirs_unix(Dirs,Save); -clean_dirs_unix([Dir|Dirs],Save) -> - Rm = string:concat("rm -rf ", Dir), - ?t:format("============== COMMAND ~p~n",[Rm]), - case file:list_dir(Dir) of - {error, enotdir} -> - ok; - X -> - ?t:format("------- Dir ~p~n ~p~n",[Dir, X]) - end, - case os:cmd(Rm) of - [] -> - ?t:format("------- Result of COMMAND ~p~n",[ok]); - Y -> - ?t:format("!!!!!!! delete ERROR Dir ~p Error ~p~n",[Dir, Y]), - ?t:format("------- ls -al ~p~n",[os:cmd("ls -al " ++ Dir)]) - end, - - clean_dirs_unix(Dirs,Save). - -clean_dirs_win32([],_) -> - ok; -clean_dirs_win32(["save"|Dirs],Save) when Save -> - clean_dirs_win32(Dirs,Save); -clean_dirs_win32([Dir|Dirs],Save) -> - Rm = - case filelib:is_dir(Dir) of - true -> - string:concat("rmdir /s /q ", Dir); - false -> - string:concat("del /q ", Dir) - end, - ?t:format("============== COMMAND ~p~n",[Rm]), - [] = os:cmd(Rm), - clean_dirs_win32(Dirs,Save). - +rm_rf([File|Files],Save) -> + case Save andalso filename:basename(File)=="save" of + true -> + rm_rf(Files,Save); + false -> + case file:read_link_info(File) of + {ok,#file_info{type=directory}} -> + MoreFiles = filelib:wildcard(filename:join(File,"*")), + rm_rf(MoreFiles,Save), + file:del_dir(File), + rm_rf(Files,Save); + {ok,#file_info{}} -> + file:delete(File), + rm_rf(Files,Save); + Other -> + ?t:format("======== could not delete file ~p~n" + "read_link_info -> ~p~n",[File,Other]), + rm_rf(Files,Save) + end + end; +rm_rf([],_) -> + ok. node_name(Sname) when is_atom(Sname) -> {ok,Host} = inet:gethostname(), -- cgit v1.2.3 From 44b76ccb2f2640e27214f3286acb5d798920babc Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 13 Feb 2013 20:53:45 +0100 Subject: [sasl] Update tests to run under unicode path In order to test that unicode paths can be used in release handling, the release_handler_SUITE will use a priv_dir with unicode characters if the file name translation mode is utf8 (not on windows). --- lib/sasl/test/installer.erl | 15 ++++---- lib/sasl/test/release_handler_SUITE.erl | 61 +++++++++++++++++++-------------- lib/sasl/test/rh_test_lib.erl | 11 ++++++ 3 files changed, 56 insertions(+), 31 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/installer.erl b/lib/sasl/test/installer.erl index 709269a73c..fa404c8b7b 100644 --- a/lib/sasl/test/installer.erl +++ b/lib/sasl/test/installer.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2012. All Rights Reserved. +%% Copyright Ericsson AB 2011-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -54,8 +54,12 @@ -export([reg_proc/1]). -export([registered_loop/1]). --define(print(List), {rh_print, TestNode} ! {print, {?MODULE, ?LINE}, List}). --define(print_line(Line,List), {rh_print, TestNode} ! {print, {?MODULE, Line}, List}). +-define(print(List), + io:format(user,"(~w:~w) ~tp~n",[?MODULE,?LINE,List]), + {rh_print, TestNode} ! {print, {?MODULE, ?LINE}, List}). +-define(print_line(Line,List), + io:format(user,"(~w:~w) ~tp~n",[?MODULE,Line,List]), + {rh_print, TestNode} ! {print, {?MODULE, Line}, List}). -define(fail(Term), exit({?MODULE, ?LINE, Term})). -define(fail_line(Line,Term), exit({?MODULE, Line, Term})). @@ -905,10 +909,9 @@ start_client(TestNode,Client,Sname) -> start_client_unix(TestNode,Sname,Node) -> Start = filename:join(["clients", "type1", Node, "bin", "start"]), - Cmd = lists:concat(["env NODENAME=",Sname," ", - filename:join(code:root_dir(), Start)]), + Cmd = filename:join(code:root_dir(), Start), ?print([{start_client,Sname},Cmd]), - Res = os:cmd(Cmd), + Res = rh_test_lib:cmd(Cmd,[],[{"NODENAME",atom_to_list(Sname)}]), ?print([{start_client,result},Res]). start_client_win32(TestNode,Client,ClientSname) -> diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 4cf4122959..2ca254ff87 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -24,6 +24,8 @@ -compile(export_all). +-define(unicode_string,[945,946]). % greek letters alpha and beta + % Default timetrap timeout (set in init_per_testcase). %-define(default_timeout, ?t:minutes(40)). -define(default_timeout, ?t:minutes(10)). @@ -1667,16 +1669,11 @@ start_target_node_with_erl(Erl,Sname,Boot) -> "-boot",filename:rootname(Boot)], ?t:format("Starting node ~p: ~ts~n", [FullName, lists:flatten([[X," "] || X <- [Erl|Args]])]), - ?t:format("open_port({spawn_executable, ~tp}, [{args,~p}])~n",[Erl,Args]), - case open_port({spawn_executable, Erl}, [{args,Args}]) of - Port when is_port(Port) -> - unlink(Port), - erlang:port_close(Port), - %% timer:sleep(10000), - %% io:format("PING: ~p~n",[net_adm:ping(FullName)]), + case rh_test_lib:cmd(Erl,Args,[]) of + ok -> ok = wait_nodes_up([FullName],"target_system test node"), {ok,FullName}; - Error -> + Error -> ?t:fail({failed_to_start_node, FullName, Error}) end. @@ -1689,7 +1686,7 @@ stop_target_node(Node) -> %% install under a path which includes unicode characters target_system_unicode(Conf) when is_list(Conf) -> PrivDir = priv_dir(Conf), - UnicodeStr = [945,946], % alhpa beta in greek letters + UnicodeStr = ?unicode_string, UnicodePrivDir = filename:join(PrivDir,UnicodeStr), PA = filename:dirname(code:which(?MODULE)), @@ -1970,13 +1967,13 @@ copy_client(Conf,Master,Sname,Client) -> clean_priv_dir(Conf,Save) -> PrivDir = priv_dir(Conf), - ?t:format("======== current dir ~p~n",[PrivDir]), + ?t:format("======== current dir ~tp~n",[PrivDir]), Dirs = filelib:wildcard(filename:join(PrivDir,"*")), - ?t:format("======== deleting ~p~n",[Dirs]), + ?t:format("======== deleting ~tp~n",[Dirs]), ok = rm_rf(Dirs,Save), Remaining = filelib:wildcard(filename:join(PrivDir,"*")), - ?t:format("======== remaining ~p~n",[Remaining]), + ?t:format("======== remaining ~tp~n",[Remaining]), case Remaining of [] -> @@ -1984,7 +1981,7 @@ clean_priv_dir(Conf,Save) -> _ -> rm_rf(Remaining,Save), Remaining2 = filelib:wildcard(filename:join(PrivDir,"*")), - ?t:format("======== remaining after second try ~p~n",[Remaining2]) + ?t:format("======== remaining after second try ~tp~n",[Remaining2]) end, ok. @@ -2058,7 +2055,7 @@ chmod(Dest,Opts) -> copy_error(Src, Dest, Reason) -> - ?t:format("Copy ~s to ~s failed: ~s\n", + ?t:format("Copy ~ts to ~ts failed: ~ts\n", [Src,Dest,file:format_error(Reason)]), ?t:fail(file_copy_failed). @@ -2098,9 +2095,11 @@ subst_file(Src, Dest, Vars) -> subst_file(Src, Dest, Vars, []). subst_file(Src, Dest, Vars, Opts) -> {ok, Bin} = file:read_file(Src), - Conts = binary_to_list(Bin), + Conts = binary_to_list(Bin), % The source will always be latin1 NConts = subst(Conts, Vars), - ok = file:write_file(Dest, NConts), + %% The destination must be utf8 if file name encoding is unicode + Enc = file:native_name_encoding(), + ok = file:write_file(Dest, unicode:characters_to_binary(NConts,Enc,Enc)), preserve(Src,Dest,Opts), chmod(Dest,Opts). @@ -2133,13 +2132,22 @@ subst_var([], Vars, Result, VarAcc) -> priv_dir(Conf) -> -%% filename:absname(?config(priv_dir, Conf)). % Get rid of trailing slash %% Due to problem with long paths on windows => creating a new %% priv_dir under data_dir - filename:absname(filename:join(?config(data_dir, Conf),priv_dir)). + %% And get rid of trailing slash (absname does that) + %% And if file name translation mode is utf8 when not on windows, + %% use a path with unicode characters... + PrivDir = + case {file:native_name_encoding(),os:type()} of + {utf8,{Os,_}} when Os=/=win32 -> + "priv_dir_" ++ ?unicode_string; + _ -> + "priv_dir" + end, + filename:absname(filename:join([?config(data_dir, Conf),PrivDir])). init_priv_dir(Conf) -> - Dir = filename:absname(filename:join(?config(data_dir, Conf),priv_dir)), + Dir = priv_dir(Conf), case filelib:is_dir(Dir) of true -> clean_priv_dir(Conf,false); @@ -2164,7 +2172,7 @@ rh_print() -> receive {print, {Module,Line}, [H|T]} -> ?t:format("=== ~p:~p - ~p",[Module,Line,H]), - lists:foreach(fun(Term) -> ?t:format(" ~p",[Term]) end, T), + lists:foreach(fun(Term) -> ?t:format(" ~tp",[Term]) end, T), ?t:format("",[]), rh_print(); kill -> @@ -2557,11 +2565,14 @@ start_nodes(Conf,Snames,Tag) -> start_node_unix(Sname,NodeDir) -> Script = filename:join([NodeDir,"bin","start"]), - Cmd = "env NODENAME="++atom_to_list(Sname) ++ " " ++ Script, - %% {ok,StartFile} = file:read_file(Cmd), - %% ?t:format("~s:\n~s~n~n",[Start,binary_to_list(StartFile)]), - Res = os:cmd(Cmd), - ?t:format("Start ~p: ~p~n=>\t~p~n", [Sname,Cmd,Res]). + ?t:format("Starting ~p: ~tp~n", [Sname,Script]), + case rh_test_lib:cmd(Script,[],[{"NODENAME",atom_to_list(Sname)}]) of + ok -> + {ok,node_name(Sname)}; + Error -> + ?t:fail({failed_to_start_node, Sname, Error}) + end. + start_node_win32(Sname,NodeDir) -> Name = atom_to_list(Sname) ++ "_P1G", diff --git a/lib/sasl/test/rh_test_lib.erl b/lib/sasl/test/rh_test_lib.erl index 99a7f919a7..06efa4acea 100644 --- a/lib/sasl/test/rh_test_lib.erl +++ b/lib/sasl/test/rh_test_lib.erl @@ -1,5 +1,6 @@ -module(rh_test_lib). +-export([cmd/3]). -export([erlsrv/3, erlsrv/4]). -export([get_service_args/3, @@ -10,6 +11,16 @@ get_client_args/4]). +cmd(Cmd,Args,Env) -> + case open_port({spawn_executable, Cmd}, [{args,Args},{env,Env}]) of + Port when is_port(Port) -> + unlink(Port), + erlang:port_close(Port), + ok; + Error -> + Error + end. + erlsrv(Erlsrv,Action,Name) -> erlsrv(Erlsrv,Action,Name,""). erlsrv(Erlsrv,Action,Name,Rest) -> -- cgit v1.2.3 From 91fc4f1f66332e9cc295c737a2f668153a025cc4 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 14 May 2013 12:05:53 +0200 Subject: [sasl] Use unicode characters in priv dir name also on windows --- lib/sasl/test/release_handler_SUITE.erl | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 2ca254ff87..b343bd0be6 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -24,8 +24,6 @@ -compile(export_all). --define(unicode_string,[945,946]). % greek letters alpha and beta - % Default timetrap timeout (set in init_per_testcase). %-define(default_timeout, ?t:minutes(40)). -define(default_timeout, ?t:minutes(10)). @@ -1686,8 +1684,7 @@ stop_target_node(Node) -> %% install under a path which includes unicode characters target_system_unicode(Conf) when is_list(Conf) -> PrivDir = priv_dir(Conf), - UnicodeStr = ?unicode_string, - UnicodePrivDir = filename:join(PrivDir,UnicodeStr), + UnicodePrivDir = filename:join(PrivDir,"αβ"), PA = filename:dirname(code:which(?MODULE)), @@ -2135,12 +2132,12 @@ priv_dir(Conf) -> %% Due to problem with long paths on windows => creating a new %% priv_dir under data_dir %% And get rid of trailing slash (absname does that) - %% And if file name translation mode is utf8 when not on windows, - %% use a path with unicode characters... + %% And if file name translation mode is utf8, use a path with + %% unicode characters PrivDir = - case {file:native_name_encoding(),os:type()} of - {utf8,{Os,_}} when Os=/=win32 -> - "priv_dir_" ++ ?unicode_string; + case file:native_name_encoding() of + utf8 -> + "priv_dir_αβ"; _ -> "priv_dir" end, -- cgit v1.2.3 From 46d99ecfdc8b5d1f6d35c415d020eca5cd6130e1 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 19 Feb 2013 16:14:49 +0100 Subject: Quote windows paths with spaces --- lib/sasl/src/erlsrv.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/erlsrv.erl b/lib/sasl/src/erlsrv.erl index 086dc7c651..67f6941479 100644 --- a/lib/sasl/src/erlsrv.erl +++ b/lib/sasl/src/erlsrv.erl @@ -30,7 +30,7 @@ erlsrv(EVer) -> Root = code:root_dir(), - filename:join([Root, "erts-" ++ EVer, "bin", "erlsrv.exe"]). + "\"" ++ filename:join([Root, "erts-" ++ EVer, "bin", "erlsrv.exe"]) ++ "\"". current_version() -> hd(string:tokens(erlang:system_info(version),"_ ")). -- cgit v1.2.3 From ee23d4b549618044d4a4f800db839483b359cb9f Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 18 Apr 2013 14:55:47 +0200 Subject: erts: Windows, convert erlsrv to use widestring --- lib/sasl/src/erlsrv.erl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/erlsrv.erl b/lib/sasl/src/erlsrv.erl index 67f6941479..711c1c6f1c 100644 --- a/lib/sasl/src/erlsrv.erl +++ b/lib/sasl/src/erlsrv.erl @@ -30,7 +30,7 @@ erlsrv(EVer) -> Root = code:root_dir(), - "\"" ++ filename:join([Root, "erts-" ++ EVer, "bin", "erlsrv.exe"]) ++ "\"". + filename:join([Root, "erts-" ++ EVer, "bin", "erlsrv.exe"]). current_version() -> hd(string:tokens(erlang:system_info(version),"_ ")). @@ -71,11 +71,14 @@ write_all_data(Port,[]) -> Port ! {self(), {command, io_lib:nl()}}, ok; write_all_data(Port,[H|T]) -> - Port ! {self(), {command, H ++ io_lib:nl()}}, + Port ! {self(), {command, unicode:characters_to_binary([H,io_lib:nl()])}}, write_all_data(Port,T). read_all_data(Port) -> - lists:reverse(read_all_data(Port,[],[])). + Data0 = lists:reverse(read_all_data(Port,[],[])), + %% Convert from utf8 to a list of chars + [unicode:characters_to_list(list_to_binary(Data)) || Data <- Data0]. + read_all_data(Port,Line,Lines) -> receive {Port, {data, {noeol,Data}}} -> @@ -178,7 +181,7 @@ get_service(EVer, ServiceName) -> [] end end, - %%% First split by Env: + %%% First split by Env: {Before, After} = split_by_env(Data), FirstPass = lists:flatten(lists:map(F,Before)), %%% If the arguments are there, split them to -- cgit v1.2.3 From 5ad4e9787c072ae8cea1ed1c9f2212551b307267 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 21 May 2013 18:21:06 +0200 Subject: [sasl] Clean priv_dir after systools_SUITE Some files with icky names (unicode) can not be deleted with the cleanup scripts after daily tests. Therefore it is better to clean up directly from the erlang node after test is run. --- lib/sasl/test/release_handler_SUITE.erl | 45 +---------------------------- lib/sasl/test/rh_test_lib.erl | 50 +++++++++++++++++++++++++++++++++ lib/sasl/test/systools_SUITE.erl | 6 ++-- 3 files changed, 54 insertions(+), 47 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index b343bd0be6..816dc7b36c 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -20,7 +20,6 @@ -include_lib("common_test/include/ct.hrl"). -include("test_lib.hrl"). --include_lib("kernel/include/file.hrl"). -compile(export_all). @@ -1963,49 +1962,7 @@ copy_client(Conf,Master,Sname,Client) -> clean_priv_dir(Conf,Save) -> PrivDir = priv_dir(Conf), - - ?t:format("======== current dir ~tp~n",[PrivDir]), - Dirs = filelib:wildcard(filename:join(PrivDir,"*")), - ?t:format("======== deleting ~tp~n",[Dirs]), - - ok = rm_rf(Dirs,Save), - Remaining = filelib:wildcard(filename:join(PrivDir,"*")), - ?t:format("======== remaining ~tp~n",[Remaining]), - - case Remaining of - [] -> - ok; - _ -> - rm_rf(Remaining,Save), - Remaining2 = filelib:wildcard(filename:join(PrivDir,"*")), - ?t:format("======== remaining after second try ~tp~n",[Remaining2]) - end, - - ok. - - -rm_rf([File|Files],Save) -> - case Save andalso filename:basename(File)=="save" of - true -> - rm_rf(Files,Save); - false -> - case file:read_link_info(File) of - {ok,#file_info{type=directory}} -> - MoreFiles = filelib:wildcard(filename:join(File,"*")), - rm_rf(MoreFiles,Save), - file:del_dir(File), - rm_rf(Files,Save); - {ok,#file_info{}} -> - file:delete(File), - rm_rf(Files,Save); - Other -> - ?t:format("======== could not delete file ~p~n" - "read_link_info -> ~p~n",[File,Other]), - rm_rf(Files,Save) - end - end; -rm_rf([],_) -> - ok. + rh_test_lib:clean_dir(PrivDir,Save). node_name(Sname) when is_atom(Sname) -> {ok,Host} = inet:gethostname(), diff --git a/lib/sasl/test/rh_test_lib.erl b/lib/sasl/test/rh_test_lib.erl index 06efa4acea..36996f7ab2 100644 --- a/lib/sasl/test/rh_test_lib.erl +++ b/lib/sasl/test/rh_test_lib.erl @@ -9,7 +9,10 @@ get_start_erl_args/3, get_client_args/3, get_client_args/4]). +-export([clean_dir/1, + clean_dir/2]). +-include_lib("kernel/include/file.hrl"). cmd(Cmd,Args,Env) -> case open_port({spawn_executable, Cmd}, [{args,Args},{env,Env}]) of @@ -109,3 +112,50 @@ single_quote() -> _ -> "\\'" end. + +clean_dir(Dir) -> + clean_dir(Dir,false). +clean_dir(Dir,Save) -> + test_server:format("======== current dir ~tp~n",[Dir]), + Dirs = filelib:wildcard(filename:join(Dir,"*")), + test_server:format("======== deleting ~tp~n",[Dirs]), + + ok = rm_rf(Dirs,Save), + Remaining = filelib:wildcard(filename:join(Dir,"*")), + test_server:format("======== remaining ~tp~n",[Remaining]), + + case Remaining of + [] -> + ok; + _ -> + rm_rf(Remaining,Save), + Remaining2 = filelib:wildcard(filename:join(Dir,"*")), + test_server:format("======== remaining after second try ~tp~n", + [Remaining2]) + end, + + ok. + + +rm_rf([File|Files],Save) -> + case Save andalso filename:basename(File)=="save" of + true -> + rm_rf(Files,Save); + false -> + case file:read_link_info(File) of + {ok,#file_info{type=directory}} -> + MoreFiles = filelib:wildcard(filename:join(File,"*")), + rm_rf(MoreFiles,Save), + file:del_dir(File), + rm_rf(Files,Save); + {ok,#file_info{}} -> + file:delete(File), + rm_rf(Files,Save); + Other -> + test_server:format("======== could not delete file ~p~n" + "read_link_info -> ~p~n",[File,Other]), + rm_rf(Files,Save) + end + end; +rm_rf([],_) -> + ok. diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 5e95b13077..1cc9eb6986 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -137,9 +137,9 @@ compile_source(File) -> ok = file:write_file(OutFileTemp, Code), file:rename(OutFileTemp, OutFile). -end_per_suite(Conf) when is_list(Conf) -> - %% Nothing. - Conf. +end_per_suite(Config) when is_list(Config) -> + rh_test_lib:clean_dir(?privdir), + Config. init_per_testcase(link_tar, Config) -> case os:type() of -- cgit v1.2.3 From aeba170badda17fe7c09b58c2db0459e395b627b Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 27 May 2013 16:44:06 +0200 Subject: Fix unmatched_return warnings in release_handler --- lib/sasl/src/release_handler.erl | 87 ++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 43 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl index c1b715b970..7c637b0adf 100644 --- a/lib/sasl/src/release_handler.erl +++ b/lib/sasl/src/release_handler.erl @@ -585,11 +585,9 @@ init([]) -> handle_call({unpack_release, ReleaseName}, _From, S) when S#state.masters == false -> - RelDir = S#state.rel_dir, - case catch do_unpack_release(S#state.root, RelDir, + case catch do_unpack_release(S#state.root, S#state.rel_dir, ReleaseName, S#state.releases) of {ok, NewReleases, Vsn} -> - clean_release(RelDir, ReleaseName), {reply, {ok, Vsn}, S#state{releases = NewReleases}}; {error, Reason} -> {reply, {error, Reason}, S}; @@ -739,7 +737,7 @@ mk_lib_name([]) -> []. handle_info(timeout, S) -> case soft_purge(S#state.unpurged) of [] -> - timer:cancel(S#state.timer), + _ = timer:cancel(S#state.timer), {noreply, S#state{unpurged = [], timer = undefined}}; Unpurged -> {noreply, S#state{unpurged = Unpurged}} @@ -850,15 +848,11 @@ do_unpack_release(Root, RelDir, ReleaseName, Releases) -> Dir = filename:join([RelDir, Vsn]), copy_file(RelFile, Dir, false), - {ok, NewReleases, Vsn}. + %% Clean release + _ = file:delete(Tar), + _ = file:delete(RelFile), -%% Note that this function is not executed by a client -%% release_handler. -clean_release(RelDir, ReleaseName) -> - Tar = filename:join(RelDir, ReleaseName ++ ".tar.gz"), - Rel = filename:join(RelDir, ReleaseName ++ ".rel"), - file:delete(Tar), - file:delete(Rel). + {ok, NewReleases, Vsn}. check_rel(Root, RelFile, Masters) -> check_rel(Root, RelFile, [], Masters). @@ -1184,7 +1178,8 @@ rename_tmp_service(EVsn,TmpVsn,NewVsn) -> {error, _Error} -> ok; _Data -> - erlsrv:remove_service(ToName) + {ok,_} = erlsrv:remove_service(ToName), + ok end, rename_service(EVsn,FromName,ToName). @@ -1237,13 +1232,12 @@ do_make_services_permanent(PermanentVsn,Vsn, PermanentEVsn, EVsn) -> UpdData = erlsrv:new_service(Name, Data, []), case erlsrv:store_service(EVsn,UpdData) of ok -> - erlsrv:disable_service(PermanentEVsn, PermName), - erlsrv:enable_service(EVsn, Name), - erlsrv:remove_service(PermName), + {ok,_} = erlsrv:disable_service(PermanentEVsn, PermName), + {ok,_} = erlsrv:enable_service(EVsn, Name), + {ok,_} = erlsrv:remove_service(PermName), %%% Read comments about these above... os:putenv("ERLSRV_SERVICE_NAME", Name), - heart:cycle(), - ok; + ok = heart:cycle(); Error4 -> throw(Error4) end @@ -1288,7 +1282,7 @@ do_make_permanent(#state{releases = Releases, _ -> ok end, - init:make_permanent(filename:join(Dir, "start"), Sys), + ok = init:make_permanent(filename:join(Dir, "start"), Sys), {ok, NewReleases, brutal_purge(Unpurged)}; {value, #release{status = permanent}} -> {ok, Releases, Unpurged}; @@ -1309,13 +1303,13 @@ do_back_service(OldVersion, CurrentVersion,OldEVsn,CurrentEVsn) -> Data -> erlsrv:new_service(OldName, Data, []) end, - case erlsrv:store_service(OldEVsn,UpdData) of - ok -> - erlsrv:disable_service(CurrentEVsn,CurrentName), - erlsrv:enable_service(OldEVsn,OldName); - Error2 -> - throw(Error2) - end, + _ = case erlsrv:store_service(OldEVsn,UpdData) of + ok -> + {ok,_} = erlsrv:disable_service(CurrentEVsn,CurrentName), + {ok,_} = erlsrv:enable_service(OldEVsn,OldName); + Error2 -> + throw(Error2) + end, OldErlSrv = filename:nativename(erlsrv:erlsrv(OldEVsn)), CurrentErlSrv = filename:nativename(erlsrv:erlsrv(CurrentEVsn)), case heart:set_cmd(CurrentErlSrv ++ " remove " ++ CurrentName ++ @@ -1386,10 +1380,18 @@ set_permanent_files(RelDir, _EVsn, Vsn, Masters, _Static) -> do_remove_service(Vsn) -> - %%% Very unconditionally remove the service. + %% Very unconditionally remove the service. + %% Note that the service could already have been removed when + %% making another release permanent. ServiceName = hd(string:tokens(atom_to_list(node()),"@")) ++ "_" ++ Vsn, - erlsrv:remove_service(ServiceName). + case erlsrv:get_service(ServiceName) of + {error, _Error} -> + ok; + _Data -> + {ok,_} = erlsrv:remove_service(ServiceName), + ok + end. do_remove_release(Root, RelDir, Vsn, Releases) -> % Decide which libs should be removed @@ -1603,8 +1605,7 @@ do_write_file(File, Str, FileOpts) -> case file:open(File, [write | FileOpts]) of {ok, Fd} -> io:put_chars(Fd, Str), - file:close(Fd), - ok; + ok = file:close(Fd); {error, Reason} -> {error, {Reason, File}} end. @@ -1651,9 +1652,9 @@ get_appls([], Res) -> mon_nodes(true) -> - net_kernel:monitor_nodes(true); + ok = net_kernel:monitor_nodes(true); mon_nodes(false) -> - net_kernel:monitor_nodes(false), + ok = net_kernel:monitor_nodes(false), flush(). flush() -> @@ -1691,7 +1692,7 @@ prepare_restart_nt(#release{erts_vsn = EVsn, vsn = Vsn}, {error, _} = Error2 -> throw(Error2); _X -> - erlsrv:disable_service(EVsn, FutureServiceName), + {ok,_} = erlsrv:disable_service(EVsn, FutureServiceName), ErlSrv = filename:nativename(erlsrv:erlsrv(EVsn)), StartDisabled = ErlSrv ++ " start_disabled " ++ FutureServiceName, case heart:set_cmd(StartDisabled) of @@ -1877,8 +1878,7 @@ do_write_release(Dir, RELEASES, NewReleases) -> case file:open(filename:join(Dir, RELEASES), [write]) of {ok, Fd} -> ok = io:format(Fd, "~p.~n", [NewReleases]), - file:close(Fd), - ok; + ok = file:close(Fd); {error, Reason} -> {error, Reason} end. @@ -2010,7 +2010,7 @@ do_rename_files([]) -> %% Remove a list of files. Ignore failure. %%----------------------------------------------------------------- do_remove_files([File|Files]) -> - file:delete(File), + _ = file:delete(File), do_remove_files(Files); do_remove_files([]) -> ok. @@ -2030,7 +2030,8 @@ do_ensure_RELEASES(RelFile) -> %% Make a directory, ignore failures (captured later). %%----------------------------------------------------------------- make_dir(Dir, false) -> - file:make_dir(Dir); + _ = file:make_dir(Dir), + ok; make_dir(Dir, Masters) -> lists:foreach(fun(Master) -> rpc:call(Master, file, make_dir, [Dir]) end, Masters). @@ -2062,12 +2063,12 @@ at_all_masters([], _, _, _) -> %% Ignore {M,F,A} return value. %%----------------------------------------------------------------- takewhile(Master, Masters, M, F, A) -> - lists:takewhile(fun(Ma) when Ma == Master -> - false; - (Ma) -> - rpc:call(Ma, M, F, A), - true - end, Masters), + _ = lists:takewhile(fun(Ma) when Ma == Master -> + false; + (Ma) -> + rpc:call(Ma, M, F, A), + true + end, Masters), ok. consult(File, false) -> file:consult(File); -- cgit v1.2.3 From b81d9bf18cd99b60f4bd964f190f63673e0a9b6b Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 3 Jun 2013 17:47:34 +0200 Subject: [sasl] Remove priv dir after release_handler_SUITE Since introducing unicode paths, the name of the priv_dir will include "unicode characters" and on some platforms (e.g. Windows) these are not so easily removed by the daily cleanup scripts. To avoid lingering directories, the priv_dir is now completly removed by the suite itself (unless there are failed testcases and logs must be saved). --- lib/sasl/test/release_handler_SUITE.erl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 816dc7b36c..b73691310f 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -35,7 +35,8 @@ init_per_suite(Config) -> application:start(sasl), Config. -end_per_suite(_Config) -> +end_per_suite(Config) -> + clean_priv_dir(Config,true), ok. all() -> @@ -163,7 +164,6 @@ end_per_group(release, Config) -> {win32,_} -> delete_all_services(); _ -> ok end, - clean_priv_dir(Config,true), ?t:timetrap_cancel(Dog), Config; end_per_group(_GroupName, Config) -> @@ -1962,7 +1962,11 @@ copy_client(Conf,Master,Sname,Client) -> clean_priv_dir(Conf,Save) -> PrivDir = priv_dir(Conf), - rh_test_lib:clean_dir(PrivDir,Save). + rh_test_lib:clean_dir(PrivDir,Save), + case file:list_dir(PrivDir) of + {ok,[]} -> _ = file:del_dir(PrivDir); + _ -> ok + end. node_name(Sname) when is_atom(Sname) -> {ok,Host} = inet:gethostname(), -- cgit v1.2.3 From 2508a426a07855eea182ecaa623222754776217b Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 25 Jun 2013 10:11:37 +0200 Subject: [sasl] Remove directory with unicode characters after successful test This is to avoid lingering files after test runs on windows, since the cleanup script often does not succeed in removing files with unicode characters. --- lib/sasl/test/systools_SUITE.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 367cab1d77..3921b2d3bb 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -59,6 +59,7 @@ -export([otp_6226_outdir/1]). -export([init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2]). +-export([delete_tree/1]). -import(lists, [foldl/3]). @@ -299,6 +300,11 @@ unicode_script(Config) when is_list(Config) -> %% 3. path (directory name where unicode_app.tgz is extracted) true = lists:member({path,[P1]},Instr), + %% If all is good, delete the unicode dir to avoid lingering files + %% on windows. + rpc:call(Node,code,add_pathz,[filename:dirname(code:which(?MODULE))]), + rpc:call(Node,?MODULE,delete_tree,[UnicodeLibDir]), + ok. unicode_script(cleanup,Config) -> -- cgit v1.2.3 From d42e6f24eec74299253039f969b69c532877ceb9 Mon Sep 17 00:00:00 2001 From: crownedgrouse Date: Sat, 13 Jul 2013 23:58:44 +0200 Subject: Add Fd usage in rb logging rb was only accepting physical filenames as log file. This patch allow rb to accept now any io_device, valid registered name, except standard_error which is replaced by standard_io. Creation of two new exported functions : rb:log_list/0-1 that print in log file if existing, otherwise on standard_io. Add new functions documentation and tests in rb_SUITE. --- lib/sasl/doc/src/rb.xml | 35 +++++++++++++++++++++++------ lib/sasl/src/rb.erl | 56 +++++++++++++++++++++++++++++++--------------- lib/sasl/test/rb_SUITE.erl | 32 +++++++++++++++++++++++++- 3 files changed, 97 insertions(+), 26 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml index 3da825878e..bfde58eac5 100644 --- a/lib/sasl/doc/src/rb.xml +++ b/lib/sasl/doc/src/rb.xml @@ -137,6 +137,25 @@

+ + + log_list() + log_list(Type) + Log reports list + + Type = type() + type() = error | error_report | info_msg | info_report | + warning_msg | warning_report | crash_report | + supervisor_report | progress + + +

Same as list/0 or list/1 functions + but result is printed to logfile, if set, otherwise to standard_io. +

+

If no Type is given, all reports are listed. +

+
+
rescan() rescan(Options) @@ -172,7 +191,7 @@ Options = [opt()] opt() = {start_log, FileName} | {max, MaxNoOfReports} | {report_dir, DirString} | {type, ReportType} | {abort_on_error, Bool} - FileName = string() | standard_io + FileName = string() | atom() | pid() MaxNoOfReports = int() | all DirString = string() ReportType = type() | [type()] | all @@ -185,11 +204,13 @@ reports can be browsed. When the rb_server is started, the files in the specified directory are scanned. The other functions assume that the server has - started. + started.

-

{start_log, FileName} starts logging to file. All - reports will be printed to the named file. The default is - standard_io. +

{start_log, FileName} starts logging to file, + registered name or io_device. All reports will be printed + to the named file. The default is standard_io. + The option {start_log, standard_error} is not allowed and + will be replaced by default standard_io.

{max, MaxNoOfReports}. Controls how many reports the rb_server should read on start-up. This option is @@ -226,11 +247,11 @@ start_log(FileName) Redirect all output to FileName - FileName = string() + FileName = string() | atom() | pid()

Redirects all report output from the RB tool to the - specified file. + specified file, registered name or io_device.

diff --git a/lib/sasl/src/rb.erl b/lib/sasl/src/rb.erl index 8004ef2c5a..767932e659 100644 --- a/lib/sasl/src/rb.erl +++ b/lib/sasl/src/rb.erl @@ -22,7 +22,7 @@ %% External exports -export([start/0, start/1, stop/0, rescan/0, rescan/1]). --export([list/0, list/1, show/0, show/1, grep/1, filter/1, filter/2, start_log/1, stop_log/0]). +-export([list/0, list/1, log_list/0, log_list/1, show/0, show/1, grep/1, filter/1, filter/2, start_log/1, stop_log/0]). -export([h/0, help/0]). %% Internal exports @@ -62,6 +62,9 @@ rescan(Options) -> list() -> list(all). list(Type) -> call({list, Type}). +log_list() -> log_list(all). +log_list(Type) -> call({log_list, Type}). + show() -> call(show). @@ -93,6 +96,8 @@ help() -> io:format("rb:help() - print this help~n"), io:format("rb:list() - list all reports~n"), io:format("rb:list(Type) - list all reports of type Type~n"), + io:format("rb:log_list() - log list of all reports~n"), + io:format("rb:log_list(Type) - log list of all reports of type Type~n"), io:format(" currently supported types are:~n"), print_types(), io:format("rb:grep(RegExp) - print reports containing RegExp.~n"), @@ -113,7 +118,7 @@ help() -> io:format("rb:show(Number) - print report no Number~n"), io:format("rb:show(Type) - print all reports of type Type~n"), io:format("rb:show() - print all reports~n"), - io:format("rb:start_log(File) - redirect all reports to file~n"), + io:format("rb:start_log(File) - redirect all reports to file or io_device~n"), io:format("rb:stop_log() - close the log file and redirect to~n"), io:format(" standard_io~n"), io:format("rb:stop - stop the rb_server~n"). @@ -207,7 +212,10 @@ handle_call({rescan, Options}, _From, State) -> handle_call(_, _From, #state{data = undefined}) -> {reply, {error, no_data}, #state{}}; handle_call({list, Type}, _From, State) -> - print_list(State#state.data, Type), + print_list(standard_io, State#state.data, Type), + {reply, ok, State}; +handle_call({log_list, Type}, _From, State) -> + print_list(State#state.device, State#state.data, Type), {reply, ok, State}; handle_call({start_log, FileName}, _From, State) -> NewDevice = open_log_file(FileName), @@ -262,7 +270,16 @@ code_change(_OldVsn, State, _Extra) -> %% Returns: A Device for later use in call to io:format %%----------------------------------------------------------------- open_log_file(standard_io) -> standard_io; -open_log_file(FileName) -> +open_log_file(Fd) when is_atom(Fd),Fd=/=standard_error -> + case whereis(Fd) of + undefined -> io:format("rb: Registered name not found '~s'.~n", + [Fd]), + io:format("rb: Using standard_io~n"), + open_log_file(standard_io); + Pid -> open_log_file(Pid) + end; +open_log_file(Fd) when is_pid(Fd)-> Fd; +open_log_file(FileName) when is_list(FileName) -> case file:open(FileName, [write,append]) of {ok, Fd} -> Fd; Error -> @@ -270,7 +287,10 @@ open_log_file(FileName) -> [FileName, Error]), io:format("rb: Using standard_io~n"), standard_io - end. + end; +open_log_file(standard_error) -> + io:format("rb: Using standard_io~n"), + standard_io. close_device(Fd) when is_pid(Fd) -> catch file:close(Fd); @@ -550,18 +570,18 @@ local_time_to_universal_time({Date,Time}) -> end. -print_list(Data, Type) -> +print_list(Fd, Data, Type) -> Header = {"No", "Type", "Process", "Date Time"}, Width = find_width([Header | Data], 0)+1, DateWidth = find_date_width([Header | Data], 0) +1, Format = lists:concat(["~4s~20s ~", Width, "s~20s~n"]), - io:format(Format, tuple_to_list(Header)), - io:format(Format, ["==", "====", "=======", "==== ===="]), - print_list(Data, Type, Width, DateWidth). -print_list([], _, _, _) -> true; -print_list([H|T], Type, Width, DateWidth) -> - print_one_report(H, Type, Width, DateWidth), - print_list(T, Type, Width, DateWidth). + io:format(Fd, Format, tuple_to_list(Header)), + io:format(Fd, Format, ["==", "====", "=======", "==== ===="]), + print_list(Fd, Data, Type, Width, DateWidth). +print_list(_, [], _, _, _) -> true; +print_list(Fd, [H|T], Type, Width, DateWidth) -> + print_one_report(Fd, H, Type, Width, DateWidth), + print_list(Fd, T, Type, Width, DateWidth). find_width([], Width) -> Width; find_width([H|T], Width) -> @@ -578,22 +598,22 @@ find_date_width([H|T], Width) -> true -> find_date_width(T, Width) end. -print_one_report({No, RealType, ShortDescr, Date, _Fname, _FilePos}, +print_one_report(Fd, {No, RealType, ShortDescr, Date, _Fname, _FilePos}, WantedType, Width, DateWidth) -> if WantedType == all -> - print_short_descr(No, RealType, ShortDescr, Date, Width, + print_short_descr(Fd, No, RealType, ShortDescr, Date, Width, DateWidth); WantedType == RealType -> - print_short_descr(No, RealType, ShortDescr, Date, Width, + print_short_descr(Fd, No, RealType, ShortDescr, Date, Width, DateWidth); true -> ok end. -print_short_descr(No, Type, ShortDescr, Date, Width, DateWidth) -> +print_short_descr(Fd, No, Type, ShortDescr, Date, Width, DateWidth) -> Format = lists:concat(["~4w~20w ~", Width, "s~", DateWidth,"s~n"]), - io:format(Format, [No, + io:format(Fd, Format, [No, Type, io_lib:format("~s", [ShortDescr]), Date]). diff --git a/lib/sasl/test/rb_SUITE.erl b/lib/sasl/test/rb_SUITE.erl index b0e43be3a2..453f992850 100644 --- a/lib/sasl/test/rb_SUITE.erl +++ b/lib/sasl/test/rb_SUITE.erl @@ -362,18 +362,48 @@ start_stop_log(Config) -> StdioResult = [_|_] = capture(fun() -> rb:show(1) end), {ok,<<>>} = file:read_file(OutFile), - %% Start log and check that show is printed to log and not to standad_io + %% Start log and check that show is printed to log and not to standard_io ok = rb:start_log(OutFile), [] = capture(fun() -> rb:show(1) end), {ok,Bin} = file:read_file(OutFile), true = (Bin =/= <<>>), + %% Start log with atom standard_io and check that show is printed to standard_io + ok = rb:stop_log(), + ok = file:write_file(OutFile,[]), + ok = rb:start_log(standard_io), + StdioResult = [_|_] = capture(fun() -> rb:show(1) end), + {ok,<<>>} = file:read_file(OutFile), + + %% Start log and check that show is printed to iodevice log and not to standard_io + ok = rb:stop_log(), + ok = file:write_file(OutFile,[]), + {ok, IoOutFile} = file:open(OutFile,[write]), + ok = rb:start_log(IoOutFile), + [] = capture(fun() -> rb:show(1) end), + {ok,Bin} = file:read_file(OutFile), + true = (Bin =/= <<>>), + ok = file:close(IoOutFile), + %% Stop log and check that show is printed to standard_io and not to log ok = rb:stop_log(), ok = file:write_file(OutFile,[]), StdioResult = capture(fun() -> rb:show(1) end), {ok,<<>>} = file:read_file(OutFile), + %% Start log and check that list is printed to log and not to standard_io + ok = file:write_file(OutFile,[]), + ok = rb:start_log(OutFile), + [] = capture(fun() -> rb:log_list() end), + {ok,Bin2} = file:read_file(OutFile), + true = (Bin2 =/= <<>>), + + %% Stop log and check that list is printed to standard_io and not to log + ok = rb:stop_log(), + ok = file:write_file(OutFile,[]), + StdioResult2 = capture(fun() -> rb:log_list() end), + {ok,<<>>} = file:read_file(OutFile), + %% Test that standard_io is used if log file can not be opened ok = rb:start_log(filename:join(nonexistingdir,"newfile.txt")), StdioResult = capture(fun() -> rb:show(1) end), -- cgit v1.2.3 From 14f1d3037fff02118b8a3d4bb8a86c3df2b24077 Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Thu, 1 Aug 2013 10:57:59 +0200 Subject: kernel: sasl: fixed rb.xml docs --- lib/sasl/doc/src/rb.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml index bfde58eac5..b94914d8f9 100644 --- a/lib/sasl/doc/src/rb.xml +++ b/lib/sasl/doc/src/rb.xml @@ -137,7 +137,6 @@

- log_list() log_list(Type) -- cgit v1.2.3 From 20641fe0f2ea745873fc7557448d3a7deb1bd639 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 16 Sep 2013 20:11:53 +0200 Subject: Prepare release --- lib/sasl/doc/src/notes.xml | 15 +++++++++++++++ lib/sasl/vsn.mk | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index a3260a5b93..b114f1f492 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -30,6 +30,21 @@

This document describes the changes made to the SASL application.

+
SASL 2.3.3 + +
Improvements and New Features + + +

+ Add Fd usage in rb logging. Thanks to Eric Pailleau.

+

+ Own Id: OTP-11252

+
+
+
+ +
+
SASL 2.3.2
Fixed Bugs and Malfunctions diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index 551c833446..f90ab51a47 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.3.2 +SASL_VSN = 2.3.3 -- cgit v1.2.3 From bc966c32bfb52467f4fd527995c110c0a980527c Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 1 Oct 2013 14:16:21 +0200 Subject: sasl: Add no_dot_erlang start script Sometimes it is wanted to start erlang without loading the user dependent .erlang file, for example in scripts and configure tests. --- lib/sasl/src/systools_make.erl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index b2e95fdbee..bab88552f9 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -1135,10 +1135,10 @@ generate_script(Output, Release, Appls, Flags) -> load_appl_mods(Appls, Mandatory ++ Preloaded, PathFlag, Variables) ++ [{path, create_path(Appls, PathFlag, Variables)}] ++ - create_kernel_procs(Appls) ++ - create_load_appls(Appls) ++ - create_start_appls(Appls) ++ - script_end() + create_kernel_procs(Appls) ++ + create_load_appls(Appls) ++ + create_start_appls(Appls) ++ + script_end(lists:member(no_dot_erlang, Flags)) }, ScriptFile = Output ++ ".script", @@ -1229,9 +1229,12 @@ create_load_appls([]) -> %%______________________________________________________________________ %% The final part of the script. -script_end() -> +script_end(false) -> %% Do not skip loading of $HOME/.erlang [{apply, {c, erlangrc, []}}, - {progress, started}]. + {progress, started}]; +script_end(true) -> %% Ignore loading of $HOME/.erlang + [{progress, started}]. + %%----------------------------------------------------------------- %% Function: sort_appls(Appls) -> {ok, Appls'} | throw({error, Error}) @@ -2055,6 +2058,9 @@ cas([no_warn_sasl | Args], X) -> %%% no_module_tests (kept for backwards compatibility, but ignored) ---- cas([no_module_tests | Args], X) -> cas(Args, X); +cas([no_dot_erlang | Args], X) -> + cas(Args, X); + %%% ERROR -------------------------------------------------------------- cas([Y | Args], X) -> cas(Args, X++[Y]). -- cgit v1.2.3 From a9340a1692b0ae4d3b3c0328d007ac4a7db5cc75 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 3 Oct 2013 14:32:38 +0200 Subject: sasl: Add no_dot_erlang documentation and tests --- lib/sasl/doc/src/systools.xml | 6 ++++-- lib/sasl/test/release_handler_SUITE.erl | 33 ++++++++++++++++++++++++++++++++- lib/sasl/test/systools_SUITE.erl | 32 +++++++++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/systools.xml b/lib/sasl/doc/src/systools.xml index 84fed0a25f..284047163e 100644 --- a/lib/sasl/doc/src/systools.xml +++ b/lib/sasl/doc/src/systools.xml @@ -5,7 +5,7 @@
1996 - 2011 + 2013 Ericsson AB, All Rights Reserved @@ -139,7 +139,7 @@ Name = string() Opt = src_tests | {path,[Dir]} | local | {variables,[Var]} | exref | - {exref,[App]}] | silent | {outdir,Dir} | no_warn_sasl | + {exref,[App]}] | silent | {outdir,Dir} | no_dot_erlang | no_warn_sasl | warnings_as_errors  Dir = string()  Var = {VarName,Prefix} @@ -252,6 +252,8 @@ Module:format_error(Error).

If the option warnings_as_errors is provided, warnings are treated as errors.

+

If the option no_dot_erlang is provided, the instruction to + load the .erlang file during boot is NOT included.

diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index a56924d5ca..d7369b0ecf 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -64,7 +64,7 @@ cases() -> supervisor_which_children_timeout, release_handler_which_releases, install_release_syntax_check, upgrade_supervisor, upgrade_supervisor_fail, otp_9864, - otp_10463_upgrade_script_regexp]. + otp_10463_upgrade_script_regexp, no_dot_erlang]. groups() -> [{release,[], @@ -1709,6 +1709,37 @@ otp_10463_upgrade_script_regexp(_Config) -> release_handler:upgrade_script(kernel,code:lib_dir(kernel)), ok. +no_dot_erlang(Conf) -> + PrivDir = priv_dir(Conf), + {ok, OrigWd} = file:get_cwd(), + try + ok = file:set_cwd(PrivDir), + + Erl = filename:join([code:root_dir(),"bin","erl"]), + Args = " -noinput -run io put_chars \"TESTOK\" -run erlang halt", + ok = file:write_file(".erlang", <<"io:put_chars(\"DOT_ERLANG_READ\\n\").\n">>), + + case os:cmd(Erl ++ Args) of + "DOT_ERLANG_READ" ++ _ -> ok; + Other1 -> + io:format("Failed: ~s~n",[Erl ++ Args]), + io:format("Expected: ~s ++ _~n",["DOT_ERLANG_READ "]), + io:format("Got: ~s~n",[Other1]), + exit(failed_to_start, test_error) + end, + NO_DOT_ERL = " -boot no_dot_erlang", + case os:cmd(Erl ++ NO_DOT_ERL ++ Args) of + "TESTOK" ++ _ -> ok; + Other2 -> + io:format("Failed: ~s~n",[Erl ++ Args]), + io:format("Expected: ~s~n",["TESTOK"]), + io:format("Got: ~s~n",[Other2]), + exit(failed_to_start, no_dot_erlang) + end + after + _ = file:delete(".erlang"), + ok = file:set_cwd(OrigWd) + end. %%%================================================================= %%% Misceleaneous functions diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 3921b2d3bb..9efc8f8392 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -43,6 +43,7 @@ -export([script_options/1, normal_script/1, unicode_script/1, unicode_script/2, no_mod_vsn_script/1, wildcard_script/1, variable_script/1, no_sasl_script/1, + no_dot_erlang_script/1, abnormal_script/1, src_tests_script/1, crazy_script/1, included_script/1, included_override_script/1, included_fail_script/1, included_bug_script/1, exref_script/1, @@ -79,7 +80,8 @@ groups() -> [{script, [], [script_options, normal_script, unicode_script, no_mod_vsn_script, wildcard_script, variable_script, abnormal_script, - no_sasl_script, src_tests_script, crazy_script, + no_sasl_script, no_dot_erlang_script, + src_tests_script, crazy_script, included_script, included_override_script, included_fail_script, included_bug_script, exref_script, otp_3065_circular_dependenies, included_and_used_sort_script]}, @@ -457,6 +459,34 @@ no_sasl_script(Config) when is_list(Config) -> ok = file:set_cwd(OldDir), ok. +%% make_script: Create script with no_dot_erlang. Check script contents. +no_dot_erlang_script(Config) when is_list(Config) -> + {ok, OldDir} = file:get_cwd(), + + {LatestDir, LatestName} = create_script(latest1_no_sasl,Config), + + DataDir = filename:absname(?copydir), + LibDir = [fname([DataDir, d_normal, lib])], + P = [fname([LibDir, '*', ebin]), + fname([DataDir, lib, kernel, ebin]), + fname([DataDir, lib, stdlib, ebin]), + fname([DataDir, lib, sasl, ebin])], + + ok = file:set_cwd(LatestDir), + + {ok, _ , []} = + systools:make_script(LatestName,[{path, P},silent, no_warn_sasl]), + {ok, [{_, _, LoadDotErlang}]} = read_script_file(LatestName), + [erlangrc] = [E || {apply, {c, E, []}} <- LoadDotErlang], + + {ok, _ , []} = + systools:make_script(LatestName,[{path, P},silent, no_warn_sasl, no_dot_erlang]), + {ok, [{_, _, DoNotLoadDotErlang}]} = read_script_file(LatestName), + [] = [E || {apply, {c, E, []}} <- DoNotLoadDotErlang], + + ok = file:set_cwd(OldDir), + ok. + %% make_script: Do not check date of object file or that source code %% can be found. -- cgit v1.2.3 From e84e886d75698ab6af585959fead3fa3c0ca0168 Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Wed, 16 Oct 2013 23:11:40 +0200 Subject: Don't try to add the log_mf_h handler in sasl unless configured to do so. The functions add_error_logger_mf/1 and delete_error_logger_mf/1 in sasl.erl are designed to do nothing if the handler configuration as returned by get_error_logger_mf/0 is 'undefined'. However, that function returns a triple {undefined,undefined,undefined} when the error_logger_mf_* configurations have not been set. This makes SASL always try to add the log_mf_h handler on startup, passing 'undefined' for each of the Dir, MaxB and MaxF parameters. The gen_event callback function log_mf_h:init/1 will then crash with a function_clause error, causing the handler to be silently removed again. This patch fixes the problem by making get_error_logger_mf/0 return the single atom 'undefined' as it is expected to do. --- lib/sasl/src/sasl.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl index 989f99dc82..fdea6da13e 100644 --- a/lib/sasl/src/sasl.erl +++ b/lib/sasl/src/sasl.erl @@ -82,8 +82,8 @@ get_mf() -> MaxB = get_mf_maxb(), MaxF = get_mf_maxf(), case {Dir, MaxB, MaxF} of - {undefined,undefined,undefined} = R -> - R; + {undefined,undefined,undefined} -> + undefined; {undefined,_,_} -> exit({missing_config, {sasl, error_logger_mf_dir}}); {_,undefined,_} -> -- cgit v1.2.3 From 6d399fa6b09fc620d377b26a48f639cbeaea9d6e Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Wed, 16 Oct 2013 23:59:37 +0200 Subject: Fix confusing documentation about error handlers in SASL The SASL documentation confusingly talks about a handler 'error_logger_mf_h' which doesn't actually exist. The handler is named 'log_mf_h', and it and all other error handlers used by SASL are part of stdlib, not SASL itself. This patch makes the documentation clearer. --- lib/sasl/doc/src/error_logging.xml | 5 +++-- lib/sasl/doc/src/sasl_app.xml | 13 ++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml index 5707bc4d69..f624fed1c7 100644 --- a/lib/sasl/doc/src/error_logging.xml +++ b/lib/sasl/doc/src/error_logging.xml @@ -173,8 +173,9 @@
Report Browser

The report browser is used to browse and format error reports - written by the error logger handler error_logger_mf_h.

-

The error_logger_mf_h handler writes all reports to a + written by the error logger handler log_mf_h defined in + stdlib.

+

The log_mf_h handler writes all reports to a report logging directory. This directory is specified when configuring the SASL application.

If the report browser is diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml index 446baccb08..af9e73027f 100644 --- a/lib/sasl/doc/src/sasl_app.xml +++ b/lib/sasl/doc/src/sasl_app.xml @@ -51,7 +51,7 @@

Error Logger Event Handlers -

The following error logger event handlers are defined in +

The following error logger event handlers are used by the SASL application.

sasl_report_tty_h @@ -62,11 +62,10 @@

Formats and writes supervisor reports, crash report and progress report to a single file.

- error_logger_mf_h + log_mf_h

This error logger writes all events sent to - the error logger to disk. It installs the log_mf_h - event handler in the error_logger process.

+ the error logger to disk.

To activate this event handler, the following three sasl configuration parameters must be set: error_logger_mf_dir, error_logger_mf_maxbytes @@ -109,18 +108,18 @@

Specifies in which directory the files are stored. If this parameter is undefined or false, - the error_logger_mf_h is not installed.

+ the log_mf_h handler is not installed.

]]>

Specifies how large each individual file can be. If this - parameter is undefined, the error_logger_mf_h is not + parameter is undefined, the log_mf_h handler is not installed.

]]>

Specifies how many files are used. If this parameter is - undefined, the error_logger_mf_h is not installed.

+ undefined, the log_mf_h handler is not installed.

0 ]]> -- cgit v1.2.3 From d4c92bf58248124199fac354cdf3fe5fbc727a3f Mon Sep 17 00:00:00 2001 From: Tobias Schlager Date: Thu, 28 Nov 2013 12:39:26 +0100 Subject: Fix boot file generation for intermediate releases. A previous refactoring messed up the paths used in the start.boot file used in intermediate releases generated for emulator upgrades. --- lib/sasl/src/release_handler.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl index c1b715b970..a5a234cbc0 100644 --- a/lib/sasl/src/release_handler.erl +++ b/lib/sasl/src/release_handler.erl @@ -1108,7 +1108,7 @@ new_emulator_make_hybrid_boot(CurrentVsn,ToVsn,TmpVsn,BaseLibs,RelDir,Opts,Maste Args = [ToVsn,Opts], {ok,FromBoot} = read_file(FromBootFile,Masters), {ok,ToBoot} = read_file(ToBootFile,Masters), - {{_,_,KernelPath},{_,_,SaslPath},{_,_,StdlibPath}} = BaseLibs, + {{_,_,KernelPath},{_,_,StdlibPath},{_,_,SaslPath}} = BaseLibs, Paths = {filename:join(KernelPath,"ebin"), filename:join(StdlibPath,"ebin"), filename:join(SaslPath,"ebin")}, -- cgit v1.2.3 From 652d0d2d784afdb0d42502bdf2831776a0e52ad8 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 6 Dec 2013 15:13:08 +0100 Subject: [sasl] Test bugfix in branch 'schlagert/fix_emulator_upgrades' OTP-11529 --- lib/sasl/test/release_handler_SUITE_data/start | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE_data/start b/lib/sasl/test/release_handler_SUITE_data/start index 45e526c15f..87275045b1 100755 --- a/lib/sasl/test/release_handler_SUITE_data/start +++ b/lib/sasl/test/release_handler_SUITE_data/start @@ -26,4 +26,4 @@ export HW_WD_DISABLE HEART_COMMAND START_ERL_DATA=${1:-$RELDIR/start_erl.data} -$ROOTDIR/bin/run_erl /tmp/ $ROOTDIR/log "exec $ROOTDIR/bin/start_erl $ROOTDIR $RELDIR $START_ERL_DATA -heart -sname $NODENAME" > $ROOTDIR/log/run_erl.out 2>&1 & +$ROOTDIR/bin/run_erl /tmp/ $ROOTDIR/log "exec $ROOTDIR/bin/start_erl $ROOTDIR $RELDIR $START_ERL_DATA -heart -sname $NODENAME -mode embedded" > $ROOTDIR/log/run_erl.out 2>&1 & -- cgit v1.2.3 From 25237481ccccd3ddfa74582dc267632ad618ba30 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 9 Dec 2013 20:12:33 +0100 Subject: Prepare release --- lib/sasl/doc/src/notes.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++ lib/sasl/vsn.mk | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index b114f1f492..48853b2372 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -30,6 +30,56 @@

This document describes the changes made to the SASL application.

+
SASL 2.3.4 + +
Fixed Bugs and Malfunctions + + +

+ Don't try to add the log_mf_h handler in sasl unless + configured to do so. Thanks to Richard Carlsson.

+

+ Own Id: OTP-11464

+
+ +

+ Fix confusing documentation about error handlers in + SASL.(Thanks to Richard Carlsson)

+

+ Own Id: OTP-11507

+
+ +

+ A bug in the mechanism for upgrading core parts of + Erlang/OTP (emulator, kernel, stdlib, sasl) caused a + switch of paths between stdlib and sasl in the + intermediate .script/.boot file. The bug was introduces + along with this upgrade mechanism in R15B. It has now + been corrected. (Thanks to Tobias Schlager)

+

+ Own Id: OTP-11529

+
+
+
+ + +
Improvements and New Features + + +

+ Added a boot file which skips loading the "$HOME/.erlang" + file on startup. Enable by starting erlang with "erl + -boot no_dot_erlang".

+

+ *** INCOMPATIBILITY with false ***

+

+ Own Id: OTP-8479 Aux Id: seq11510

+
+
+
+ +
+
SASL 2.3.3
Improvements and New Features diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index f90ab51a47..d4b8ae94a1 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.3.3 +SASL_VSN = 2.3.4 -- cgit v1.2.3 From 246db8a1ad32b68aab7a2e1fa353563dfbc1b1f3 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 17 Dec 2013 15:16:50 +0100 Subject: [sasl] Fix error printout in release_handler_SUITE to handle unicode path --- lib/sasl/test/release_handler_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 5293381af0..a3db2b23db 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1793,18 +1793,18 @@ no_dot_erlang(Conf) -> case os:cmd(Erl ++ Args) of "DOT_ERLANG_READ" ++ _ -> ok; Other1 -> - io:format("Failed: ~s~n",[Erl ++ Args]), + io:format("Failed: ~ts~n",[Erl ++ Args]), io:format("Expected: ~s ++ _~n",["DOT_ERLANG_READ "]), - io:format("Got: ~s~n",[Other1]), + io:format("Got: ~ts~n",[Other1]), exit(failed_to_start, test_error) end, NO_DOT_ERL = " -boot no_dot_erlang", case os:cmd(Erl ++ NO_DOT_ERL ++ Args) of "TESTOK" ++ _ -> ok; Other2 -> - io:format("Failed: ~s~n",[Erl ++ Args]), + io:format("Failed: ~ts~n",[Erl ++ Args]), io:format("Expected: ~s~n",["TESTOK"]), - io:format("Got: ~s~n",[Other2]), + io:format("Got: ~ts~n",[Other2]), exit(failed_to_start, no_dot_erlang) end after -- cgit v1.2.3 From c0d320e028ce4a4b6af99ad5e20dee8ea95d6fce Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 20 Dec 2013 15:49:39 +0100 Subject: sasl test: Quote executable paths (can contain spaces) --- lib/sasl/test/release_handler_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index a3db2b23db..7e9d7c984a 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1786,7 +1786,7 @@ no_dot_erlang(Conf) -> try ok = file:set_cwd(PrivDir), - Erl = filename:join([code:root_dir(),"bin","erl"]), + Erl = "\"" ++ filename:join([code:root_dir(),"bin","erl"]) ++ "\"", Args = " -noinput -run io put_chars \"TESTOK\" -run erlang halt", ok = file:write_file(".erlang", <<"io:put_chars(\"DOT_ERLANG_READ\\n\").\n">>), -- cgit v1.2.3 From 0e2415e88f494a03ce4e643c134c8378882fbcb1 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 22 Jan 2014 17:03:20 +0100 Subject: Update sasl appup test to work for OTP release 17 --- lib/sasl/test/sasl_SUITE.erl | 93 +++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 44 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index e8f6a4a2eb..e799230338 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2013. All Rights Reserved. +%% Copyright Ericsson AB 2011-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -34,7 +34,7 @@ log_mf_h_env/1]). all() -> - [app_test, appup_test, log_mf_h_env]. + [log_mf_h_env, app_test, appup_test]. groups() -> []. @@ -61,54 +61,60 @@ app_test(Config) when is_list(Config) -> %% Test that appup allows upgrade from/downgrade to a maximum of two %% major releases back. appup_test(_Config) -> + do_appup_tests(create_test_vsns()). + +do_appup_tests({[],[]}) -> + {skip,"no previous releases available"}; +do_appup_tests({OkVsns,NokVsns}) -> application:load(sasl), - {sasl,_,SaslVsn} = lists:keyfind(sasl,1,application:loaded_applications()), - Ebin = filename:join(code:lib_dir(sasl),ebin), - {ok,[{SaslVsn,UpFrom,DownTo}=Appup]} = - file:consult(filename:join(Ebin,"sasl.appup")), - ct:log("~p~n",[Appup]), - {OkVsns,NokVsns} = create_test_vsns(SaslVsn), + {_,_,Vsn} = lists:keyfind(sasl,1,application:loaded_applications()), + AppupFile = filename:join([code:lib_dir(sasl),ebin,"sasl.appup"]), + {ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile), + ct:log("~p~n",[AppupScript]), + ct:log("Testing ok versions: ~p~n",[OkVsns]), check_appup(OkVsns,UpFrom,{ok,[restart_new_emulator]}), check_appup(OkVsns,DownTo,{ok,[restart_new_emulator]}), + ct:log("Testing not ok versions: ~p~n",[NokVsns]), check_appup(NokVsns,UpFrom,error), check_appup(NokVsns,DownTo,error), ok. -create_test_vsns(Current) -> - [XStr,YStr|Rest] = string:tokens(Current,"."), - X = list_to_integer(XStr), - Y = list_to_integer(YStr), - SecondMajor = vsn(X,Y-2), - SecondMinor = SecondMajor ++ ".1.3", - FirstMajor = vsn(X,Y-1), - FirstMinor = FirstMajor ++ ".57", - ThisMajor = vsn(X,Y), - This = - case Rest of - [] -> - []; - ["1"] -> - [ThisMajor]; - _ -> - ThisMinor = ThisMajor ++ ".1", - [ThisMajor,ThisMinor] - end, - OkVsns = This ++ [FirstMajor, FirstMinor, SecondMajor, SecondMinor], - - ThirdMajor = vsn(X,Y-3), - ThirdMinor = ThirdMajor ++ ".10.12", - Illegal = ThisMajor ++ ",1", - Newer1Major = vsn(X,Y+1), - Newer1Minor = Newer1Major ++ ".1", - Newer2Major = ThisMajor ++ "1", - NokVsns = [ThirdMajor,ThirdMinor, - Illegal, - Newer1Major,Newer1Minor, - Newer2Major], - {OkVsns,NokVsns}. - -vsn(X,Y) -> - integer_to_list(X) ++ "." ++ integer_to_list(Y). +create_test_vsns() -> + This = erlang:system_info(otp_release), + FirstMajor = previous_major(This), + SecondMajor = previous_major(FirstMajor), + ThirdMajor = previous_major(SecondMajor), + Ok = sasl_vsn([FirstMajor,SecondMajor]), + Nok0 = sasl_vsn([ThirdMajor]), + Nok = case Ok of + [Ok1|_] -> + [Ok1 ++ ",1" | Nok0]; % illegal + _ -> + Nok0 + end, + {Ok,Nok}. + +previous_major("17") -> + "r16"; +previous_major("r"++Rel) -> + "r"++previous_major(Rel); +previous_major(Rel) -> + integer_to_list(list_to_integer(Rel)-1). + +sasl_vsn([R|Rs]) -> + case test_server:is_release_available(R) of + true -> + {ok,N} = test_server:start_node(prevrel,peer,[{erl,[{release,R}]}]), + _ = rpc:call(N,application,load,[sasl]), + As = rpc:call(N,application,loaded_applications,[]), + {_,_,V} = lists:keyfind(sasl,1,As), + test_server:stop_node(N), + [V|sasl_vsn(Rs)]; + false -> + sasl_vsn(Rs) + end; +sasl_vsn([]) -> + []. check_appup([Vsn|Vsns],Instrs,Expected) -> case systools_relup:appup_search_for_version(Vsn, Instrs) of @@ -119,7 +125,6 @@ check_appup([],_,_) -> ok. - %% OTP-9185 - fail sasl start if some but not all log_mf_h env vars %% are given. log_mf_h_env(Config) -> -- cgit v1.2.3 From cd4993e67866e10ce3b2bd33b6bad093d854c3d0 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Mon, 10 Feb 2014 16:56:45 +0100 Subject: sasl: Fix testcase which didn't work on windows Quoting on Windows is strange --- lib/sasl/test/release_handler_SUITE.erl | 35 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 7e9d7c984a..ad2a8005b9 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2013. All Rights Reserved. +%% Copyright Ericsson AB 2011-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -1781,37 +1781,46 @@ otp_10463_upgrade_script_regexp(_Config) -> ok. no_dot_erlang(Conf) -> - PrivDir = priv_dir(Conf), + PrivDir = ?config(data_dir,Conf), {ok, OrigWd} = file:get_cwd(), try ok = file:set_cwd(PrivDir), - Erl = "\"" ++ filename:join([code:root_dir(),"bin","erl"]) ++ "\"", - Args = " -noinput -run io put_chars \"TESTOK\" -run erlang halt", + {ok, Wd} = file:get_cwd(), + io:format("Dir ~ts~n", [Wd]), + + Erl0 = filename:join([code:root_dir(),"bin","erl"]), + Erl = filename:nativename(Erl0), + Quote = "\"", + Args = " -noinput -run c pwd -run erlang halt", ok = file:write_file(".erlang", <<"io:put_chars(\"DOT_ERLANG_READ\\n\").\n">>), - case os:cmd(Erl ++ Args) of + CMD1 = Quote ++ Erl ++ Quote ++ Args , + case os:cmd(CMD1) of "DOT_ERLANG_READ" ++ _ -> ok; Other1 -> - io:format("Failed: ~ts~n",[Erl ++ Args]), + io:format("Failed: ~ts~n",[CMD1]), io:format("Expected: ~s ++ _~n",["DOT_ERLANG_READ "]), io:format("Got: ~ts~n",[Other1]), - exit(failed_to_start, test_error) + exit({failed_to_start, test_error}) end, NO_DOT_ERL = " -boot no_dot_erlang", - case os:cmd(Erl ++ NO_DOT_ERL ++ Args) of - "TESTOK" ++ _ -> ok; - Other2 -> - io:format("Failed: ~ts~n",[Erl ++ Args]), + CMD2 = Quote ++ Erl ++ Quote ++ NO_DOT_ERL ++ Args, + case lists:prefix(Wd, Other2 = os:cmd(CMD2)) of + true -> ok; + false -> + io:format("Failed: ~ts~n",[CMD2]), io:format("Expected: ~s~n",["TESTOK"]), io:format("Got: ~ts~n",[Other2]), - exit(failed_to_start, no_dot_erlang) + exit({failed_to_start, no_dot_erlang}) end after _ = file:delete(".erlang"), - ok = file:set_cwd(OrigWd) + ok = file:set_cwd(OrigWd), + ok end. + %%%================================================================= %%% Misceleaneous functions %%%================================================================= -- cgit v1.2.3 From 3374b8e20dfafe357dfc6c82adb7357c39b18d86 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 12 Feb 2014 15:04:02 +0100 Subject: Update appups and appup tests for kernel, stdlib and sasl Appups now only support one major release back, and the tests are updated accordingly. Support is also added in tests for giving previous releases in a ct config file, e.g. {otp_releases,[{r15,"/path/to/r15/bin/erl"}, {r16,"/path/to/r16/bin/erl"}, {'17',"/path/to/17/bin/erl"}]}. --- lib/sasl/src/sasl.appup.src | 12 ++++----- lib/sasl/test/sasl_SUITE.erl | 62 ++++++++++++++++++++++++++++---------------- 2 files changed, 44 insertions(+), 30 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index 0c4d80a74f..e789853eea 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -1,7 +1,7 @@ %% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2013. All Rights Reserved. +%% Copyright Ericsson AB 1999-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -16,12 +16,10 @@ %% %% %CopyrightEnd% {"%VSN%", - %% Up from - max two major revisions back + %% Up from - max one major revision back [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17 - {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 - {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}], %% R15 - %% Down to - max two major revisions back + {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}], %% R16 + %% Down to - max one major revision back [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17 - {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 - {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R15 + {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16 }. diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index e799230338..ad63a31cbd 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -22,7 +22,6 @@ %% Default timetrap timeout (set in init_per_testcase). -define(default_timeout, ?t:minutes(1)). --define(application, sasl). %% Test server specific exports -export([all/0,groups/0,init_per_group/2,end_per_group/2]). @@ -58,17 +57,18 @@ app_test(Config) when is_list(Config) -> ?t:app_test(sasl, allow), ok. -%% Test that appup allows upgrade from/downgrade to a maximum of two -%% major releases back. +%% Test that appup allows upgrade from/downgrade to a maximum of one +%% major release back. appup_test(_Config) -> - do_appup_tests(create_test_vsns()). + appup_tests(sasl,create_test_vsns(sasl)). -do_appup_tests({[],[]}) -> +appup_tests(_App,{[],[]}) -> {skip,"no previous releases available"}; -do_appup_tests({OkVsns,NokVsns}) -> - application:load(sasl), - {_,_,Vsn} = lists:keyfind(sasl,1,application:loaded_applications()), - AppupFile = filename:join([code:lib_dir(sasl),ebin,"sasl.appup"]), +appup_tests(App,{OkVsns,NokVsns}) -> + application:load(App), + {_,_,Vsn} = lists:keyfind(App,1,application:loaded_applications()), + AppupFileName = atom_to_list(App) ++ ".appup", + AppupFile = filename:join([code:lib_dir(App),ebin,AppupFileName]), {ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile), ct:log("~p~n",[AppupScript]), ct:log("Testing ok versions: ~p~n",[OkVsns]), @@ -79,13 +79,12 @@ do_appup_tests({OkVsns,NokVsns}) -> check_appup(NokVsns,DownTo,error), ok. -create_test_vsns() -> +create_test_vsns(App) -> This = erlang:system_info(otp_release), FirstMajor = previous_major(This), SecondMajor = previous_major(FirstMajor), - ThirdMajor = previous_major(SecondMajor), - Ok = sasl_vsn([FirstMajor,SecondMajor]), - Nok0 = sasl_vsn([ThirdMajor]), + Ok = app_vsn(App,[FirstMajor]), + Nok0 = app_vsn(App,[SecondMajor]), Nok = case Ok of [Ok1|_] -> [Ok1 ++ ",1" | Nok0]; % illegal @@ -101,19 +100,36 @@ previous_major("r"++Rel) -> previous_major(Rel) -> integer_to_list(list_to_integer(Rel)-1). -sasl_vsn([R|Rs]) -> - case test_server:is_release_available(R) of - true -> - {ok,N} = test_server:start_node(prevrel,peer,[{erl,[{release,R}]}]), - _ = rpc:call(N,application,load,[sasl]), +app_vsn(App,[R|Rs]) -> + OldRel = + case test_server:is_release_available(R) of + true -> + {release,R}; + false -> + case ct:get_config({otp_releases,list_to_atom(R)}) of + undefined -> + false; + Prog0 -> + case os:find_executable(Prog0) of + false -> + false; + Prog -> + {prog,Prog} + end + end + end, + case OldRel of + false -> + app_vsn(App,Rs); + _ -> + {ok,N} = test_server:start_node(prevrel,peer,[{erl,[OldRel]}]), + _ = rpc:call(N,application,load,[App]), As = rpc:call(N,application,loaded_applications,[]), - {_,_,V} = lists:keyfind(sasl,1,As), + {_,_,V} = lists:keyfind(App,1,As), test_server:stop_node(N), - [V|sasl_vsn(Rs)]; - false -> - sasl_vsn(Rs) + [V|app_vsn(App,Rs)] end; -sasl_vsn([]) -> +app_vsn(_App,[]) -> []. check_appup([Vsn|Vsns],Instrs,Expected) -> -- cgit v1.2.3 From 69bb84dfd1ac198f1ddc6998ce039e8e88ffdd18 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 17 Feb 2014 16:34:43 +0100 Subject: Update sasl/test/test_lib.hrl with recent versions of kernel and stdlib --- lib/sasl/test/test_lib.hrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/test_lib.hrl b/lib/sasl/test/test_lib.hrl index 37aa44c198..c8a4e92f24 100644 --- a/lib/sasl/test/test_lib.hrl +++ b/lib/sasl/test/test_lib.hrl @@ -1,3 +1,3 @@ -define(ertsvsn,"4.4"). --define(kernelvsn,"2.15.3"). --define(stdlibvsn,"1.18.3"). +-define(kernelvsn,"2.16.4"). +-define(stdlibvsn,"1.19.4"). -- cgit v1.2.3 From 3cdd158193146c95c1480d6d11ff4cc277649c24 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 18 Feb 2014 13:32:49 +0100 Subject: [sasl] Use restart type from .rel when restarting apps during upgrade Earlier the 'restart_application' upgrade instruction always cause the application to be restarted as permanent. This could cause the system to end up in an unexpected state after an upgrade. This is now corrected. --- lib/sasl/src/systools_rc.erl | 14 ++- lib/sasl/test/systools_rc_SUITE.erl | 168 +++++++++++++++++++++++++++++++++--- 2 files changed, 165 insertions(+), 17 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/systools_rc.erl b/lib/sasl/src/systools_rc.erl index 54c327410d..76f753c3d0 100644 --- a/lib/sasl/src/systools_rc.erl +++ b/lib/sasl/src/systools_rc.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -365,14 +365,22 @@ translate_application_instrs(Script, Appls, PreAppls) -> case lists:keysearch(Appl, #application.name, Appls) of {value, PostApplication} -> PostMods = PostApplication#application.modules, + Type = PostApplication#application.type, + Apply = + case Type of + none -> []; + load -> [{apply, {application, load, + [Appl]}}]; + _ -> [{apply, {application, start, + [Appl, Type]}}] + end, [{apply, {application, stop, [Appl]}}] ++ [{remove, {M, brutal_purge, brutal_purge}} || M <- PreMods] ++ [{purge, PreMods}] ++ [{add_module, M, []} || M <- PostMods] ++ - [{apply, {application, start, - [Appl, permanent]}}]; + Apply; false -> throw({error, {no_such_application, Appl}}) end; diff --git a/lib/sasl/test/systools_rc_SUITE.erl b/lib/sasl/test/systools_rc_SUITE.erl index 0cb6e63cf3..5efab7c028 100644 --- a/lib/sasl/test/systools_rc_SUITE.erl +++ b/lib/sasl/test/systools_rc_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2012. All Rights Reserved. +%% Copyright Ericsson AB 2010-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -436,25 +436,19 @@ translate(Config) when is_list(Config) -> translate_app(Config) when is_list(Config) -> PreApps = - [#application{name = test, - description = "TEST", - vsn = "1.0", - modules = [foo,bar,baz], - regs = [], - mod = {sasl, []}}, + [Test = #application{name = test, + description = "TEST", + vsn = "1.0", + modules = [foo,bar,baz], + regs = [], + mod = {sasl, []}}, #application{name = pelle, description = "PELLE", vsn = "1.0", modules = [pelle, kalle], regs = [], mod = {pelle, []}}], - Apps = - [#application{name = test, - description = "TEST", - vsn = "1.0", - modules = [foo,bar,baz], - regs = [], - mod = {sasl, []}}], + Apps = [Test], %% Simple translation (1) Up1 = [{add_module, foo}, {add_module, bar}], @@ -475,6 +469,56 @@ translate_app(Config) when is_list(Config) -> {load,{baz,brutal_purge,brutal_purge}}, {apply,{application,start,[test,permanent]}}] = X2, + %% Translate add_application with different restart types + %% permanent + Up2_1 = [{add_application, test, permanent}], + {ok, X2_1} = systools_rc:translate_scripts([Up2_1], Apps, []), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,start,[test,permanent]}}] = X2_1, + + %% transient + Up2_2 = [{add_application, test, transient}], + {ok, X2_2} = systools_rc:translate_scripts([Up2_2], Apps, []), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,start,[test,transient]}}] = X2_2, + + %% temporary + Up2_3 = [{add_application, test, temporary}], + {ok, X2_3} = systools_rc:translate_scripts([Up2_3], Apps, []), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,start,[test,temporary]}}] = X2_3, + + %% load + Up2_4 = [{add_application, test, load}], + {ok, X2_4} = systools_rc:translate_scripts([Up2_4], Apps, []), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,load,[test]}}] = X2_4, + + %% none + Up2_5 = [{add_application, test, none}], + {ok, X2_5} = systools_rc:translate_scripts([Up2_5], Apps, []), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}] = X2_5, + %% Simple translation (3) Up3 = [{remove_application, pelle}], {ok, X3} = systools_rc:translate_scripts([Up3], Apps, PreApps), @@ -484,6 +528,102 @@ translate_app(Config) when is_list(Config) -> {remove,{kalle,brutal_purge,brutal_purge}}, {purge,[pelle,kalle]}, {apply,{application,unload,[pelle]}}] = X3, + + %% Simple translation (4) + Up4 = [{restart_application, test}], + {ok, X4} = systools_rc:translate_scripts([Up4], Apps, PreApps), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {apply,{application,stop,[test]}}, + {remove,{foo,brutal_purge,brutal_purge}}, + {remove,{bar,brutal_purge,brutal_purge}}, + {remove,{baz,brutal_purge,brutal_purge}}, + {purge,[foo,bar,baz]}, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,start,[test,permanent]}}] = X4, + + %% Translate restart_application with different restart types + %% permanent + {ok, X4_1} = systools_rc:translate_scripts([Up4], + [Test#application{type=permanent}], + [Test]), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {apply,{application,stop,[test]}}, + {remove,{foo,brutal_purge,brutal_purge}}, + {remove,{bar,brutal_purge,brutal_purge}}, + {remove,{baz,brutal_purge,brutal_purge}}, + {purge,[foo,bar,baz]}, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,start,[test,permanent]}}] = X4_1, + + %% transient + {ok, X4_2} = systools_rc:translate_scripts([Up4], + [Test#application{type=transient}], + [Test]), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {apply,{application,stop,[test]}}, + {remove,{foo,brutal_purge,brutal_purge}}, + {remove,{bar,brutal_purge,brutal_purge}}, + {remove,{baz,brutal_purge,brutal_purge}}, + {purge,[foo,bar,baz]}, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,start,[test,transient]}}] = X4_2, + + %% temporary + {ok, X4_3} = systools_rc:translate_scripts([Up4], + [Test#application{type=temporary}], + [Test]), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {apply,{application,stop,[test]}}, + {remove,{foo,brutal_purge,brutal_purge}}, + {remove,{bar,brutal_purge,brutal_purge}}, + {remove,{baz,brutal_purge,brutal_purge}}, + {purge,[foo,bar,baz]}, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,start,[test,temporary]}}] = X4_3, + + %% load + {ok, X4_4} = systools_rc:translate_scripts([Up4], + [Test#application{type=load}], + [Test]), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {apply,{application,stop,[test]}}, + {remove,{foo,brutal_purge,brutal_purge}}, + {remove,{bar,brutal_purge,brutal_purge}}, + {remove,{baz,brutal_purge,brutal_purge}}, + {purge,[foo,bar,baz]}, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}, + {apply,{application,load,[test]}}] = X4_4, + + %% none + {ok, X4_5} = systools_rc:translate_scripts([Up4], + [Test#application{type=none}], + [Test]), + [{load_object_code,{test,"1.0",[foo,bar,baz]}}, + point_of_no_return, + {apply,{application,stop,[test]}}, + {remove,{foo,brutal_purge,brutal_purge}}, + {remove,{bar,brutal_purge,brutal_purge}}, + {remove,{baz,brutal_purge,brutal_purge}}, + {purge,[foo,bar,baz]}, + {load,{foo,brutal_purge,brutal_purge}}, + {load,{bar,brutal_purge,brutal_purge}}, + {load,{baz,brutal_purge,brutal_purge}}] = X4_5, + ok. -- cgit v1.2.3 From ae91a79057eaa48d93b182f285d122207c429753 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 21 Feb 2014 16:15:08 +0100 Subject: Use default timetrap (30 min) for kernel, stdlib and sasl app tests These tests start new nodes, and they frequently timed out on some slow test hosts. --- lib/sasl/test/sasl_SUITE.erl | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index ad63a31cbd..f4455f7e9b 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -19,10 +19,6 @@ -module(sasl_SUITE). -include_lib("common_test/include/ct.hrl"). - -%% Default timetrap timeout (set in init_per_testcase). --define(default_timeout, ?t:minutes(1)). - %% Test server specific exports -export([all/0,groups/0,init_per_group/2,end_per_group/2]). -export([init_per_testcase/2, end_per_testcase/2]). @@ -46,11 +42,8 @@ end_per_group(_GroupName, Config) -> init_per_testcase(_Case, Config) -> - Dog=test_server:timetrap(?default_timeout), - [{watchdog, Dog}|Config]. -end_per_testcase(_Case, Config) -> - Dog=?config(watchdog, Config), - test_server:timetrap_cancel(Dog), + Config. +end_per_testcase(_Case, _Config) -> ok. app_test(Config) when is_list(Config) -> -- cgit v1.2.3 From 22ff87a0c8db877e3ce53b6ff915dcc6a75c5c0c Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 10 Mar 2014 17:15:38 +0100 Subject: Introduce runtime_dependencies in .app files Most dependencies introduced are exactly the dependencies to other applications found by xref. That is, there might be real dependencies missing. There might also be pure debug dependencies listed that probably should be removed. Each application has to be manually inspected in order to ensure that all real dependencies are listed. All dependencies introduced are to application versions used in OTP 17.0. This since the previously used version scheme wasn't designed for this, and in order to minimize the work of introducing the dependencies. --- lib/sasl/src/sasl.app.src | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src index 8c814cfaf5..8e95197a2a 100644 --- a/lib/sasl/src/sasl.app.src +++ b/lib/sasl/src/sasl.app.src @@ -44,5 +44,7 @@ {applications, [kernel, stdlib]}, {env, [{sasl_error_logger, tty}, {errlog_type, all}]}, - {mod, {sasl, []}}]}. + {mod, {sasl, []}}, + {runtime_dependencies, ["tools-2.6.14","stdlib-2.0","kernel-3.0", + "erts-6.0"]}]}. -- cgit v1.2.3 From f149194f227fd593757ff2c750b82b62f9a6e8aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 19 Mar 2014 15:19:19 +0100 Subject: sasl: Fix crash in systools_make:format_error/1 The crash occurred when systools:make_script/2 raises the 'duplicate_modules' error. Depending on the 'silent' option, systools_make:format_error/1 is called to either format and display an error message, or return a tuple containing the error properties. When displaying a 'duplicate_modules' error message, format_error/1 receives a list of applications providing the same module(s): [ {{Mod,App1,_}, {Mod,App2,_}}, ... ] However, before this fix, format_error/1 expected the following structure, leading to a 'function_clause' exception: [ {{Mod,_,App1,_,_}, {Mod,_,App2,_,_}}, ... ] The crash never occurred with the 'silent' option, because the error and its properties are returned as is to the caller. --- lib/sasl/src/systools_make.erl | 2 +- lib/sasl/test/systools_SUITE.erl | 34 +++++++++++++++++++++- .../d_duplicate_modules/lib/app1-1.0/ebin/app1.app | 7 +++++ .../d_duplicate_modules/lib/app1-1.0/src/myapp.erl | 2 ++ .../d_duplicate_modules/lib/app2-1.0/ebin/app2.app | 7 +++++ .../d_duplicate_modules/lib/app2-1.0/src/myapp.erl | 2 ++ 6 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app create mode 100644 lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl create mode 100644 lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app create mode 100644 lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl (limited to 'lib/sasl') diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index bab88552f9..daa65e32b7 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -2218,7 +2218,7 @@ format_error({undefined_applications,Apps}) -> io_lib:format("Undefined applications: ~p~n",[Apps]); format_error({duplicate_modules,Dups}) -> io_lib:format("Duplicated modules: ~n~ts", - [map(fun({{Mod,_,App1,_,_},{Mod,_,App2,_,_}}) -> + [map(fun({{Mod,App1,_},{Mod,App2,_}}) -> io_lib:format("\t~w specified in ~w and ~w~n", [Mod,App1,App2]) end, Dups)]); diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 9efc8f8392..d7e01d74c0 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -47,6 +47,7 @@ abnormal_script/1, src_tests_script/1, crazy_script/1, included_script/1, included_override_script/1, included_fail_script/1, included_bug_script/1, exref_script/1, + duplicate_modules_script/1, otp_3065_circular_dependenies/1, included_and_used_sort_script/1]). -export([tar_options/1, normal_tar/1, no_mod_vsn_tar/1, system_files_tar/1, system_files_tar/2, invalid_system_files_tar/1, @@ -84,6 +85,7 @@ groups() -> src_tests_script, crazy_script, included_script, included_override_script, included_fail_script, included_bug_script, exref_script, + duplicate_modules_script, otp_3065_circular_dependenies, included_and_used_sort_script]}, {tar, [], [tar_options, normal_tar, no_mod_vsn_tar, system_files_tar, @@ -822,6 +824,33 @@ no_hipe({ok, Value}) -> {ok, Value} end. +%% duplicate_modules_script: Check that make_script rejects two +%% applications providing the same module. +duplicate_modules_script(Config) when is_list(Config) -> + {ok, OldDir} = file:get_cwd(), + + {LatestDir, LatestName} = create_script(duplicate_modules,Config), + + DataDir = filename:absname(?copydir), + + ok = file:set_cwd(LatestDir), + LibDir = fname([DataDir, d_duplicate_modules, lib]), + P = [fname([LibDir, 'app1-1.0', ebin]), + fname([LibDir, 'app2-1.0', ebin])], + + %% Check wrong app vsn + error = systools:make_script(LatestName, [{path, P}]), + {error, + systools_make, + {duplicate_modules, [ + {{myapp,app1,_}, {myapp,app2,_}} + ] + } + } = systools:make_script(LatestName, [silent, {path, P}]), + + ok = file:set_cwd(OldDir), + ok. + %% tar_options: Check illegal tar options. tar_options(Config) when is_list(Config) -> {'EXIT',{{badarg,[{path,["Path",12,"Another"]}]}, _}} = @@ -2186,7 +2215,10 @@ create_script(current_all_future_sasl,Config) -> do_create_script(current_all_future_sasl,Config,current,Apps); create_script({unicode,RelVsn},Config) -> Apps = core_apps(current) ++ [{ua,"1.0"}], - do_create_script(unicode,RelVsn,Config,current,Apps). + do_create_script(unicode,RelVsn,Config,current,Apps); +create_script(duplicate_modules,Config) -> + Apps = core_apps(current) ++ [{app1,"1.0"},{app2,"1.0"}], + do_create_script(duplicate_modules,Config,current,Apps). do_create_script(Id,Config,ErtsVsn,AppVsns) -> diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app new file mode 100644 index 0000000000..dea9257f2f --- /dev/null +++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app @@ -0,0 +1,7 @@ +{application, app1, + [{description, "Application 1"}, + {vsn, "1.0"}, + {modules, [myapp]}, + {registered, []}, + {applications, []}, + {env, []}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl new file mode 100644 index 0000000000..bf2ab7c79c --- /dev/null +++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl @@ -0,0 +1,2 @@ +-module(myapp). +-vsn("1.0"). diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app new file mode 100644 index 0000000000..476750d8b2 --- /dev/null +++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app @@ -0,0 +1,7 @@ +{application, app2, + [{description, "Application 2"}, + {vsn, "1.0"}, + {modules, [myapp]}, + {registered, []}, + {applications, []}, + {env, []}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl new file mode 100644 index 0000000000..bf2ab7c79c --- /dev/null +++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl @@ -0,0 +1,2 @@ +-module(myapp). +-vsn("1.0"). -- cgit v1.2.3 From 8eb20d1fb0eb3a3b96d5e80e2e2617f893ef6986 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 20 Feb 2014 16:45:28 +0100 Subject: Add info about upgrade of core applications In ref man for appup and in system documentation, design prinsiples, add a warning related to upgrade when version of erts, kernel, stdlib or sasl is changed. This will cause an emulator restart where new version of emulator and core applications will startup together with old versions of other applications. Care must be taken to avoid problems due to backwards incompatibility. --- lib/sasl/doc/src/appup.xml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml index 85fcbed3ba..95f315d269 100644 --- a/lib/sasl/doc/src/appup.xml +++ b/lib/sasl/doc/src/appup.xml @@ -4,7 +4,7 @@
- 19972013 + 19972014 Ericsson AB. All Rights Reserved. @@ -84,6 +84,9 @@ version identifier must be specified as a binary, e.g.

<<"2\\.1\\.[0-9]+">>

will match all versions 2.1.x, where x is any number.

+

Note that the regular expression must match the complete + version string, so the above example will work for for + e.g. 2.1.1, but not for 2.1.1.1

@@ -339,7 +342,7 @@ restart_new_emulator version of erts, kernel, stdlib and sasl are used when the emulator restarts. Only one restart_new_emulator instruction is allowed in the relup, and it shall be placed - first. systools:make_relup3,4 + first. systools:make_relup/3,4 will ensure this when the relup is generated. The rest of the relup script is executed after the restart as a part of the boot script.

@@ -347,11 +350,25 @@ restart_new_emulator completed. To programatically find out if the upgrade is complete, call - release_handler:which_releases and check if the + release_handler:which_releases/0,1 and check if the expected release has status current.

The new release must still be made permanent after the upgrade is completed. Otherwise, the old emulator is started in case of an emulator restart.

+ +

As stated above, the restart_new_emulator + instruction causes the emulator to be restarted with new + versions of erts, kernel, stdlib and + sasl. All other applications, however, will at startup + be running their old versions in this new emulator. In most + cases this is no problem, but every now and then there will be + incompatible changes to the core applications which may cause + trouble in this setting. Such incompatible changes (when + functions are removed) are normally preceded by a deprecation + over two major releases. To make sure your application is not + crashed by an incompatible change, always remove any call to + deprecated functions as soon as possible.

+
 restart_emulator
     
-- cgit v1.2.3 From 8e4b29f081a604fb4b55ddfcadb7476b6d0b1e1b Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 27 Mar 2014 15:31:41 +0100 Subject: Improve printout of command when encoding is utf-8 In release_handler_SUITE, print command with ~ts instead of ~tp in case it contains unicode characters. --- lib/sasl/test/release_handler_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index ad2a8005b9..2d108a6cad 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -2563,7 +2563,7 @@ start_nodes(Conf,Snames,Tag) -> start_node_unix(Sname,NodeDir) -> Script = filename:join([NodeDir,"bin","start"]), - ?t:format("Starting ~p: ~tp~n", [Sname,Script]), + ?t:format("Starting ~p: ~ts~n", [Sname,Script]), case rh_test_lib:cmd(Script,[],[{"NODENAME",atom_to_list(Sname)}]) of ok -> {ok,node_name(Sname)}; -- cgit v1.2.3 From 8b7ed9a291692b1f4858ecdf9b2b340403ce2564 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 27 Mar 2014 15:34:06 +0100 Subject: Add debug printouts in release_handler_SUITE:upgrade_gg --- lib/sasl/test/release_handler_SUITE.erl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 2d108a6cad..55a467a4d5 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -2417,9 +2417,28 @@ check_gg_info(Node,OtherAlive,OtherDead,Synced) -> ?t:format("~ncheck_gg_info failed for ~p: ~p~nwhen GGI was: ~p~n" "and GI was: ~p~n", [Node,E,GGI,GI]), + %% An attempt to find out if it is only a timing issue + %% that makes this fail every now and then: + try_again_check(Node,GGI,GI,1), ?t:fail("check_gg_info failed") end. +try_again_check(_Node,_GGI,_GI,6) -> + ok; +try_again_check(Node,GGI,GI,N) -> + timer:sleep(1000), + case {rpc:call(Node,global_group,info,[]), + rpc:call(Node,global,info,[])} of + {GGI,GI} -> + ?t:format("~nAfter one more sek, GGI and GI are still the same"), + try_again_check(Node,GGI,GI,N+1); + {NewGGI,NewGI} -> + ?t:format("~nAfter one more sek:~nNew GGI: ~p~nNew GI: ~p~n", + [NewGGI,NewGI]), + try_again_check(Node,NewGGI,NewGI,N+1) + end. + + do_check_gg_info(OtherAlive,OtherDead,Synced,GGI,GI) -> {_,gg1} = lists:keyfind(own_group_name,1,GGI), {_,synced} = lists:keyfind(state,1,GGI), -- cgit v1.2.3 From 10f7058251f6992db460c4378d465f43cd6b14a1 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 2 Apr 2014 17:58:14 +0200 Subject: Stop nodes after test cases in release_handler_SUITE Test cases 'release_handler_which_releases' and 'upgrade_supervisor' did not terminate the nodes they started. This might be the cause of failing test cases further down the suite. This has been corrected. --- lib/sasl/test/release_handler_SUITE.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 55a467a4d5..1d8bf45289 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -667,6 +667,9 @@ release_handler_which_releases(Conf) -> ok. +release_handler_which_releases(cleanup,_Conf) -> + stop_node(node_name(release_handler_which_releases)). + %%----------------------------------------------------------------- %% Ticket: OTP-2740 %% Slogan: vsn not numeric doesn't work so good in release_handling @@ -1365,6 +1368,9 @@ upgrade_supervisor(Conf) when is_list(Conf) -> ok. +upgrade_supervisor(cleanup,_Condf) -> + stop_node(node_name(upgrade_supervisor)). + %% Check that if the supervisor fails, then the upgrade is rolled back %% and an ok error message is returned upgrade_supervisor_fail(Conf) when is_list(Conf) -> -- cgit v1.2.3 From c65821b677b4ebbc05192da9b8a48d32e53b3cfe Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 19 Feb 2014 17:24:27 +0100 Subject: Add documentation about upgrade The example of how to create a first target system, which is located in the System Principles document, is now extended to also include an example of code upgrade. A new chapter is added to System Principles explaining different issues when upgrade includes new versions applications within Erlang/OTP. --- lib/sasl/examples/src/target_system.erl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/examples/src/target_system.erl b/lib/sasl/examples/src/target_system.erl index fb9e9aaaaf..a0ae016791 100644 --- a/lib/sasl/examples/src/target_system.erl +++ b/lib/sasl/examples/src/target_system.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2013. All Rights Reserved. +%% Copyright Ericsson AB 2011-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -65,7 +65,7 @@ create(RelFileName,SystoolsOpts) -> [RelFileName, RelFileName]), make_script(RelFileName,SystoolsOpts), - TarFileName = filename:join(Dir,RelFileName ++ ".tar.gz"), + TarFileName = RelFileName ++ ".tar.gz", io:fwrite("Creating tar file ~tp ...~n", [TarFileName]), make_tar(RelFileName,SystoolsOpts), @@ -100,6 +100,12 @@ create(RelFileName,SystoolsOpts) -> copy_file(filename:join([ErtsBinDir, "to_erl"]), filename:join([TmpBinDir, "to_erl"]), [preserve]), + %% This is needed if 'start' script created from 'start.src' shall + %% be used as it points out this directory as log dir for 'run_erl' + TmpLogDir = filename:join([TmpDir, "log"]), + io:fwrite("Creating temporary directory ~tp ...~n", [TmpLogDir]), + ok = file:make_dir(TmpLogDir), + StartErlDataFile = filename:join([TmpDir, "releases", "start_erl.data"]), io:fwrite("Creating ~tp ...~n", [StartErlDataFile]), StartErlData = io_lib:fwrite("~s ~s~n", [ErtsVsn, RelVsn]), @@ -115,6 +121,7 @@ create(RelFileName,SystoolsOpts) -> erl_tar:add(Tar, filename:join(TmpDir,ErtsDir), ErtsDir, []), erl_tar:add(Tar, filename:join(TmpDir,"releases"), "releases", []), erl_tar:add(Tar, filename:join(TmpDir,"lib"), "lib", []), + erl_tar:add(Tar, filename:join(TmpDir,"log"), "log", []), erl_tar:close(Tar), %% file:set_cwd(Cwd), io:fwrite("Removing directory ~tp ...~n",[TmpDir]), @@ -136,6 +143,11 @@ install(RelFileName, RootDir) -> subst_src_scripts(["erl", "start", "start_erl"], ErtsBinDir, BinDir, [{"FINAL_ROOTDIR", RootDir}, {"EMU", "beam"}], [preserve]), + %%! Workaround for pre OTP 17.0: start.src and start_erl.src did + %%! not have correct permissions, so the above 'preserve' option did not help + ok = file:change_mode(filename:join(BinDir,"start"),8#0755), + ok = file:change_mode(filename:join(BinDir,"start_erl"),8#0755), + io:fwrite("Creating the RELEASES file ...\n"), create_RELEASES(RootDir, filename:join([RootDir, "releases", filename:basename(RelFileName)])). -- cgit v1.2.3 From f719d0fe308f00b85f92c29d7cdf9b0dc20d98a2 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 7 Apr 2014 19:52:48 +0200 Subject: Update release notes --- lib/sasl/doc/src/notes.xml | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 09d97cbe7b..2928a12d22 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -30,6 +30,64 @@

This document describes the changes made to the SASL application.

+
SASL 2.4 + +
Fixed Bugs and Malfunctions + + +

+ The upgrade instruction 'restart_application' would + earlier ignore the restart type configured in the .rel + file and always restart the application as permanent. + This is now changed, and the restart type from the .rel + file is used. If restart type is 'load', the application + will only be loaded and not started. If the restart type + is 'none', the application will not be loaded nor + started, but all modules in the application will be + loaded. (Thanks to Tobias Schlager for reporting this + problem)

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-11716

+
+ +

+ If systools:make_script/2 failed with reason + duplicate_modules, and the silent flag was + not used, a crash with reason function_clause + would occur when systools tried to format the + error message. This has been corrected. (Thanks to + Jean-Sébastien Pédron)

+

+ Own Id: OTP-11819

+
+
+
+ + +
Improvements and New Features + + +

+ Calls to erlang:open_port/2 with 'spawn' are updated to + handle space in the command path.

+

+ Own Id: OTP-10842

+
+ +

+ Some more documentation is added to explain the behavior + when an upgrade includes new versions of ERTS, Kernel, + STDLIB or SASL.

+

+ Own Id: OTP-11717

+
+
+
+ +
+
SASL 2.3.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 14de5f76687ec5b45e53ca1fa22885429ed3b875 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 4 Apr 2014 16:55:44 +0200 Subject: Don't allow slave nodes to survive their test case The slave node from release_handler_SUITE:upgrade_supervisor_fail sometimes survives its test case. Or rather, it is unexpectedly restarted. Every now and then, on a slow machine, this confuses the next test case since test_server:start_node might return the old node name instead of the new. This has been corrected by using {error_action,reboot} in release_handler_SUITE:upgrade_supervisor_fail - to make sure the slave node is really terminated on rollback. --- lib/sasl/test/release_handler_SUITE.erl | 35 +++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 1d8bf45289..8a635796b7 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1410,18 +1410,41 @@ upgrade_supervisor_fail(Conf) when is_list(Conf) -> {error,{code_change_failed,_Pid,a_sup,_Vsn, {error,{invalid_shutdown,brutal_kil}}}} = - rpc:call(Node, release_handler, install_release, [RelVsn2]), - - %% Check that the upgrade is terminated - normally this would mean - %% rollback, but since this testcase is very simplified the node - %% is not started with heart supervision and will therefore not be - %% restarted. So we just check that the node goes down. + rpc:call(Node, release_handler, install_release, + [RelVsn2, [{error_action,reboot}]]), + + %% Check that the upgrade is terminated - normally this would be a + %% rollback, but + %% + %% 1. Default rollback is done with init:restart(), which does not + %% reboot the emulator, it only restarts the system inside the + %% running erlang node. + %% + %% 2. This does not work well on a slave node since, if timing is + %% right (bad), the slave node will get the nodedown from its + %% master (because distribution is terminated as part of + %% init:restart()) and then it will do halt() and thus never be + %% restarted (see slave:wloop/1) + %% + %% 3. Sometimes, though, init:restart() will manage to finish its + %% job before the nodedown is received, making the node + %% actually restart - in which case it might very well confuse + %% the next test case. + %% + %% 4. So, to avoid unstability we use {error_action,reboot} above, + %% to ensure that the node is actually stopped. Of course, in a + %% real system this must be used together with heart + %% supervision, and then the node will be restarted anyway. But + %% here in this simple test case we are satisfied to see that + %% the node terminates. receive {nodedown,Node} -> ok after 10000 -> ct:fail(failed_upgrade_never_restarted_node) end, ok. +upgrade_supervisor_fail(cleanup,_Condf) -> + stop_node(node_name(upgrade_supervisor_fail)). %% Test upgrade and downgrade of applications eval_appup(Conf) when is_list(Conf) -> -- cgit v1.2.3 From dc48952a651aaea4682848e674f7ad30e441146d Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 7 Apr 2014 14:09:33 +0200 Subject: Skip test when needed applications are missing On some test hosts a lot of applications are skipped from the erlang installation in order to make test go faster. systools_SUITE:app_start_type_relup uses a few applications which therefore might not exist. This commit make sure the test is skipped (instead of fail) if some of the needed applications are missing. --- lib/sasl/test/systools_SUITE.erl | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 1d3a71e94e..49a4303e0b 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2013. All Rights Reserved. +%% Copyright Ericsson AB 2012-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -1615,9 +1615,19 @@ no_sasl_relup(Config) when is_list(Config) -> %% make_relup: Check that application start type is used in relup app_start_type_relup(Config) when is_list(Config) -> + %% This might fail if some applications are not available, if so + %% skip the test case. + try create_script(latest_app_start_type2,Config) of + {Dir2,Name2} -> + app_start_type_relup(Dir2,Name2,Config) + catch throw:{error,Reason} -> + {skip,Reason} + end. + +app_start_type_relup(Dir2,Name2,Config) -> PrivDir = ?config(priv_dir, Config), {Dir1,Name1} = create_script(latest_app_start_type1,Config), - {Dir2,Name2} = create_script(latest_app_start_type2,Config), + Release1 = filename:join(Dir1,Name1), Release2 = filename:join(Dir2,Name2), @@ -2242,9 +2252,13 @@ app_vsns(AppVsns) -> [{App,app_vsn(App,Vsn)} || {App,Vsn} <- AppVsns] ++ [{App,app_vsn(App,Vsn),Type} || {App,Vsn,Type} <- AppVsns]. app_vsn(App,current) -> - application:load(App), - {ok,Vsn} = application:get_key(App,vsn), - Vsn; + case application:load(App) of + Ok when Ok==ok; Ok=={error,{already_loaded,App}} -> + {ok,Vsn} = application:get_key(App,vsn), + Vsn; + Error -> + throw(Error) + end; app_vsn(_App,Vsn) -> Vsn. -- cgit v1.2.3 From a220bedd7d19b1918d83b55bb84f38db19689c4b Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 22 Apr 2014 14:14:37 +0200 Subject: Update kernel, stdlib and sasl appup files for Erlang/OTP-18 --- lib/sasl/src/sasl.appup.src | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index e789853eea..af04d007ac 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -17,9 +17,7 @@ %% %CopyrightEnd% {"%VSN%", %% Up from - max one major revision back - [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17 - {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}], %% R16 + [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}], % OTP-17 %% Down to - max one major revision back - [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17 - {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16 + [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}] % OTP-17 }. -- cgit v1.2.3 From 5e1cfb2f2a296778c400c4afd47571bceb86d4ca Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 22 Apr 2014 15:29:02 +0200 Subject: Update kernel, stdlib and sasl appup tests Add test of update instructions from current major to current minor. Earlier only previous major to current was tested. --- lib/sasl/test/sasl_SUITE.erl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index f4455f7e9b..e91d220daf 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -73,10 +73,10 @@ appup_tests(App,{OkVsns,NokVsns}) -> ok. create_test_vsns(App) -> - This = erlang:system_info(otp_release), - FirstMajor = previous_major(This), + ThisMajor = erlang:system_info(otp_release), + FirstMajor = previous_major(ThisMajor), SecondMajor = previous_major(FirstMajor), - Ok = app_vsn(App,[FirstMajor]), + Ok = app_vsn(App,[ThisMajor,FirstMajor]), Nok0 = app_vsn(App,[SecondMajor]), Nok = case Ok of [Ok1|_] -> @@ -87,9 +87,9 @@ create_test_vsns(App) -> {Ok,Nok}. previous_major("17") -> - "r16"; -previous_major("r"++Rel) -> - "r"++previous_major(Rel); + "r16b"; +previous_major("r16b") -> + "r15b"; previous_major(Rel) -> integer_to_list(list_to_integer(Rel)-1). -- cgit v1.2.3 From c45b158cec83f689b90ea04194e8fe5be08c811e Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 25 Apr 2014 09:46:37 +0200 Subject: Update sasl/test/test_lib.hrl with recent versions of kernel and stdlib --- lib/sasl/test/test_lib.hrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/test_lib.hrl b/lib/sasl/test/test_lib.hrl index c8a4e92f24..b16c4ac34c 100644 --- a/lib/sasl/test/test_lib.hrl +++ b/lib/sasl/test/test_lib.hrl @@ -1,3 +1,3 @@ -define(ertsvsn,"4.4"). --define(kernelvsn,"2.16.4"). --define(stdlibvsn,"1.19.4"). +-define(kernelvsn,"3.0"). +-define(stdlibvsn,"2.0"). -- cgit v1.2.3 From 74e9bb75f2e1014cf46b58d6696eb70eb3e7b201 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 5 May 2014 11:18:02 +0200 Subject: Fix regexp in release_handler test so versions are correctly replaced In order to fake an earlier release to upgrade from, version numbers are replaced in some .app files. This commit adds a backslash before the dot in the pattern to replace, so the dot is not mistaken for a wildcard. --- lib/sasl/test/release_handler_SUITE.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 8a635796b7..bd7414fbb4 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -2292,8 +2292,8 @@ create_p1g(Conf,TargetDir) -> ok. fix_version(SystemLib,App) -> - FromVsn = vsn(App,current), - ToVsn = vsn(App,old), + FromVsn = re:replace(vsn(App,current),"\\.","\\\\.",[{return,binary}]), + ToVsn = re:replace(vsn(App,old),"\\.","\\\\.",[{return,binary}]), Rootname = filename:join([SystemLib,app_dir(App,old),ebin,atom_to_list(App)]), AppFile = Rootname ++ ".app", -- cgit v1.2.3 From da15f706159db83100dde62b2e3069ae46e88c09 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 1 Jul 2014 15:25:33 +0200 Subject: Fix bug in alarm_handler documentation The documentation erroneously specified that clear_alarm/1 would clear *all* alarms with id AlarmId. This is now corrected according to the implementation - only the latest received alarm with the given AlarmId is cleared. --- lib/sasl/doc/src/alarm_handler.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/alarm_handler.xml b/lib/sasl/doc/src/alarm_handler.xml index ab3041137e..e4def7c7f5 100644 --- a/lib/sasl/doc/src/alarm_handler.xml +++ b/lib/sasl/doc/src/alarm_handler.xml @@ -5,7 +5,7 @@
1996 - 2013 + 2014 Ericsson AB, All Rights Reserved @@ -87,7 +87,9 @@ AlarmId = term() -

Clears all alarms with id AlarmId. +

Sends the clear_alarm event to all event handlers.

+

When receiving this event, the default simple handler + clears the latest received alarm with id AlarmId.

@@ -109,8 +111,10 @@ AlarmDescription = term() -

Sets an alarm with id AlarmId. This id is used at a - later stage when the alarm is cleared. +

Sends the set_alarm event to all event handlers.

+

When receiving this event, the default simple handler + stores the alarm. The AlarmId identifies the alarm + and is used when the alarm is cleared.

-- cgit v1.2.3 From 2191e216a95d3cb41edd7ad2069e3b2d88b907e7 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 15 Sep 2014 12:00:20 +0200 Subject: Update version numbers --- lib/sasl/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index da8cbc5130..4259a2d76c 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.4 +SASL_VSN = 2.4.1 -- cgit v1.2.3 From 950d808c97a4c5b579f4f1cc16b95f2d419d3505 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 15 Sep 2014 12:02:14 +0200 Subject: Update release notes --- lib/sasl/doc/src/notes.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 2928a12d22..95d7c6fa50 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -30,6 +30,26 @@

This document describes the changes made to the SASL application.

+
SASL 2.4.1 + +
Fixed Bugs and Malfunctions + + +

+ The documentation erroneously specified that + alarm_handler:clear_alarm/1 would clear + all alarms with id AlarmId. This is now + corrected according to the implementation - only the + latest received alarm with the given AlarmId is + cleared by the simple default handler.

+

+ Own Id: OTP-12025

+
+
+
+ +
+
SASL 2.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 201b95c1fe992be2c7fdb6759a7e490105fdf510 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 25 Sep 2014 10:05:50 +0200 Subject: Do not test appup of core apps for upgrade from current vsn The appup tests for kernel, stdlib and sasl tests that the appup file allows upgrade from the previous and current major release to the current release. If, in the current release, the application version was not changed compared to the previous release, then we would still test that the appup supported the upgrade (i.e. from current release to current release). This is now changed, in order to avoid test failures on patch releases where kernel, stdlib and sasl are not changed. --- lib/sasl/test/sasl_SUITE.erl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index e91d220daf..d7b99d506e 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -57,17 +57,29 @@ appup_test(_Config) -> appup_tests(_App,{[],[]}) -> {skip,"no previous releases available"}; -appup_tests(App,{OkVsns,NokVsns}) -> +appup_tests(App,{OkVsns0,NokVsns}) -> application:load(App), {_,_,Vsn} = lists:keyfind(App,1,application:loaded_applications()), AppupFileName = atom_to_list(App) ++ ".appup", AppupFile = filename:join([code:lib_dir(App),ebin,AppupFileName]), {ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile), ct:log("~p~n",[AppupScript]), - ct:log("Testing ok versions: ~p~n",[OkVsns]), + OkVsns = + case OkVsns0 -- [Vsn] of + OkVsns0 -> + OkVsns0; + Ok -> + ct:log("Current version, ~p, is same as in previous release.~n" + "Removing this from the list of ok versions.", + [Vsn]), + Ok + end, + ct:log("Testing that appup allows upgrade from these versions: ~p~n", + [OkVsns]), check_appup(OkVsns,UpFrom,{ok,[restart_new_emulator]}), check_appup(OkVsns,DownTo,{ok,[restart_new_emulator]}), - ct:log("Testing not ok versions: ~p~n",[NokVsns]), + ct:log("Testing that appup does not allow upgrade from these versions: ~p~n", + [NokVsns]), check_appup(NokVsns,UpFrom,error), check_appup(NokVsns,DownTo,error), ok. -- cgit v1.2.3 From a4290bb363fb6f1c593886d4f10a5868d7c9d3b8 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 15 Oct 2014 18:31:13 +0200 Subject: [sasl] Remove undocumented upgrade instruction The upgrade instruction 'remove_module' was added in OTP R7B (and possibly in a patch in R5B or R6B, ticket OTP-3477), and translates to the low level instruction 'remove', but adds the parameter DepMods (modules on which Mod is dependent). The ticket says that "remove_module should be added for symmetry with the add_module instruction". remove_module was never documented or tested, and it was never mentioned in a release note. It therefore seems to be low risk in removing it. The correct instruction to use when removing a module is {delete_module,Mod} which was added in OTP R10B and which is also documented and tested. This translates to low level instructions 'remove' and 'purge' i.e. the module is brutally purged after setting the current code to old. This hardcoded brutal purge is the reason why PrePurge and PostPurge parameters can not be given with the delete_module instruction. The parameter DepMods which was inclued in the remove_module instruction does not exist for delete_module. From the documentation's point of view, this is the same for add_module, and thus the two instructions {add_module,Mod} and {delete_module,Mod} are now symmetric. However, in the code there is a second instruction for adding a module, {add_module,Mod,DepMods}, which is not documented. To add symmetry even for this, {delete_module,Mod,DepMods} is now also added. Documentation is added for all instructions. --- lib/sasl/doc/src/appup.xml | 13 +++++ lib/sasl/src/systools_rc.erl | 28 +++++----- .../test/release_handler_SUITE_data/lib/README | 2 +- .../lib/b-2.0/ebin/b.appup | 6 +-- lib/sasl/test/systools_rc_SUITE.erl | 62 +++++++++++++++++++++- 5 files changed, 91 insertions(+), 20 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml index 95f315d269..f0f41b0c7e 100644 --- a/lib/sasl/doc/src/appup.xml +++ b/lib/sasl/doc/src/appup.xml @@ -180,15 +180,28 @@ Mod when upgrading, and vice versa when downgrading.

 {add_module, Mod}
+{add_module, Mod, DepMods}
   Mod = atom()
+  DepMods = [Mod]
     

Loads a new module Mod.

+

DepMods defaults to [] and defines which other modules + Mod is dependent on. In relup, instructions + related to these modules will come before the instruction for + loading Mod when upgrading, and vice versa when + downgrading.

 {delete_module, Mod}
+{delete_module, Mod, DepMods}
   Mod = atom()
     

Deletes a module Mod using the low-level instructions remove and purge.

+

DepMods defaults to [] and defines which other modules + Mod is dependent on. In relup, instructions + related to these modules will come before the instruction for + removing Mod when upgrading, and vice versa when + downgrading.

 {add_application, Application}
 {add_application, Application, Type}
diff --git a/lib/sasl/src/systools_rc.erl b/lib/sasl/src/systools_rc.erl
index 76f753c3d0..11e097996c 100644
--- a/lib/sasl/src/systools_rc.erl
+++ b/lib/sasl/src/systools_rc.erl
@@ -32,7 +32,6 @@
 %% {load_module, Mod, PrePurge, PostPurge, [Mod]}
 %% {add_module, Mod}
 %% {add_module, Mod, [Mod]}
-%% {remove_module, Mod, PrePurge, PostPurge, [Mod]}
 %% {restart_application, Appl}
 %% {add_application, Appl, Type}
 %% {remove_application, Appl}
@@ -59,7 +58,7 @@
 
 %% High-level instructions that contain dependencies
 %%
--define(DEP_INSTRS, [update, load_module, add_module, remove_module]).
+-define(DEP_INSTRS, [update, load_module, add_module, delete_module]).
 
 %%-----------------------------------------------------------------
 %% translate_scripts(Scripts, Appls, PreAppls) -> Res
@@ -107,9 +106,6 @@ expand_script([I|Script]) ->
 	     {update, Mod, Change, Mods} when Change==soft,
 					      is_list(Mods) ->
 		 {update, Mod, Change, brutal_purge,brutal_purge, Mods};
-	     {delete_module, Mod} ->
-		 [{remove, {Mod, brutal_purge, brutal_purge}},
-		  {purge, [Mod]}];
 	     {add_application, Application} ->
 		 {add_application, Application, permanent};
 	     _ ->
@@ -301,6 +297,8 @@ normalize_instrs(Script) ->
 		       PostPurge, Mods};
 		 ({add_module, Mod}) ->
 		      {add_module, Mod, []};
+		 ({delete_module, Mod}) ->
+		      {delete_module, Mod, []};
 		 (I) ->
 		      I
 	      end, Script).
@@ -412,7 +410,7 @@ translate_add_module_instrs(Before, After) ->
 %%-----------------------------------------------------------------
 
 %%-----------------------------------------------------------------
-%% Translates update, load_module and remove_module, and reorder the
+%% Translates update, load_module and delete_module, and reorder the
 %% instructions according to dependencies. Leaves other instructions
 %% unchanged.
 %%-----------------------------------------------------------------
@@ -538,7 +536,7 @@ get_dependent_instructions(G, WCs, Mod) ->
 %% Instructions are in order of dependency.
 %% Appls = [#application]
 %%
-%% Instructions translated are: update, load_module, and remove_module 
+%% Instructions translated are: update, load_module, and delete_module
 %%
 %% Before =	[{load_object_code, ...}]
 %% After = 	[{suspend, ...}] ++ CodeInstrs ++ [{resume, ...}]
@@ -576,17 +574,19 @@ translate_dep_to_low(Mode, Instructions, Appls) ->
 				end, RevUpdateMods)}]
 	end,
 
-    LoadRemoveInstrs = 
+    LoadRemoveInstrs0 =
 	filtermap(fun({update, Mod, _, _, _, PreP, PostP, _}) ->
 			  {true, {load, {Mod, PreP, PostP}}};
 		     ({load_module, Mod, PreP, PostP, _}) ->
 			  {true, {load, {Mod, PreP, PostP}}};
-		     ({remove_module, Mod, PreP, PostP, _}) ->
-			  {true, {remove, {Mod, PreP, PostP}}};
+		     ({delete_module, Mod, _}) ->
+			  {true,[{remove, {Mod, brutal_purge, brutal_purge}},
+				 {purge, [Mod]}]};
 		     (_) -> false
 		  end,
 		  Instructions),
-    RevLoadRemoveInstrs = lists:reverse(LoadRemoveInstrs),
+    LoadRemoveInstrs = lists:flatten(LoadRemoveInstrs0),
+    RevLoadRemoveInstrs = lists:flatten(lists:reverse(LoadRemoveInstrs0)),
 
     %% The order of loading object code is unimportant. The order
     %% chosen is the order of dependency.
@@ -781,10 +781,10 @@ check_op({add_module, Mod, Mods}) ->
     check_mod(Mod),
     check_list(Mods),
     lists:foreach(fun(M) -> check_mod(M) end, Mods);
-check_op({remove_module, Mod, PrePurge, PostPurge, Mods}) ->
+check_op({delete_module, Mod}) ->
+    check_mod(Mod);
+check_op({delete_module, Mod, Mods}) ->
     check_mod(Mod),
-    check_purge(PrePurge),
-    check_purge(PostPurge),
     check_list(Mods),
     lists:foreach(fun(M) -> check_mod(M) end, Mods);
 check_op({remove_application, Appl}) ->
diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/README b/lib/sasl/test/release_handler_SUITE_data/lib/README
index ffb8c5120b..5d17950b0b 100644
--- a/lib/sasl/test/release_handler_SUITE_data/lib/README
+++ b/lib/sasl/test/release_handler_SUITE_data/lib/README
@@ -21,7 +21,7 @@ start version, includes b_lib and b_server
 
 b-2.0:
 can be upgraded to from b-1.0.
-Removes b_lib (soft_purge) and updates b_server (brutal_purge)
+Removes b_lib (brutal_purge) and updates b_server (soft_purge)
 * The diff in purge method is important for test "check_and_purge", in
   order to check that the purge option to check_install_release works
   for both methods.
diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/b-2.0/ebin/b.appup b/lib/sasl/test/release_handler_SUITE_data/lib/b-2.0/ebin/b.appup
index 001255a88c..9df590e63f 100644
--- a/lib/sasl/test/release_handler_SUITE_data/lib/b-2.0/ebin/b.appup
+++ b/lib/sasl/test/release_handler_SUITE_data/lib/b-2.0/ebin/b.appup
@@ -1,6 +1,6 @@
 %% -*- erlang -*-
 {"2.0",
- [{"1.0",[{remove_module,b_lib,soft_purge,soft_purge,[]},
-	  {update,b_server,{advanced,[]}}]}],
+ [{"1.0",[{delete_module,b_lib},
+	  {update,b_server,{advanced,[]},soft_purge,soft_purge,[]}]}],
  [{"1.0",[{add_module,b_lib},
-	  {update,b_server,{advanced,[]}}]}]}.
+	  {update,b_server,{advanced,[]},soft_purge,soft_purge,[]}]}]}.
diff --git a/lib/sasl/test/systools_rc_SUITE.erl b/lib/sasl/test/systools_rc_SUITE.erl
index 5efab7c028..1afef986d2 100644
--- a/lib/sasl/test/systools_rc_SUITE.erl
+++ b/lib/sasl/test/systools_rc_SUITE.erl
@@ -22,14 +22,16 @@
 -include_lib("sasl/src/systools.hrl").
 -export([all/0,groups/0,init_per_group/2,end_per_group/2, 
 	 syntax_check/1, translate/1, translate_app/1,
-	 translate_emulator_restarts/1]).
+	 translate_emulator_restarts/1,
+	 translate_add_delete_module/1]).
 
 %%-----------------------------------------------------------------
 %% erl -compile systools_rc_SUITE @i ../src/ @i ../../test_server/include/
 %% c(systools_rc_SUITE, [{i, "../src"}, {i, "../../test_server/include"}]).
 %%-----------------------------------------------------------------
 all() -> 
-    [syntax_check, translate, translate_app, translate_emulator_restarts].
+    [syntax_check, translate, translate_app, translate_emulator_restarts,
+     translate_add_delete_module].
 
 groups() -> 
     [].
@@ -707,3 +709,59 @@ translate_emulator_restarts(_Config) ->
      restart_emulator] = X6,
 
     ok.
+
+translate_add_delete_module(_Config) ->
+    PreApps =
+	[#application{name = test,
+		      description = "TEST",
+		      vsn = "0.1",
+		      modules = [foo,bar,baz,old_mod],
+		      regs = [],
+		      mod = {sasl, []}}],
+    Apps =
+	[#application{name = test,
+		      description = "TEST",
+		      vsn = "1.0",
+		      modules = [foo,bar,baz,new_mod],
+		      regs = [],
+		      mod = {sasl, []}}],
+    S1 = [
+	  {delete_module, old_mod},
+	  {add_module, new_mod},
+	  {load_module, foo}
+	 ],
+    {ok, X1} = systools_rc:translate_scripts([S1], Apps, PreApps),
+    [{load_object_code,{test,"1.0",[new_mod,foo]}},
+     point_of_no_return,
+     {remove,{old_mod,brutal_purge,brutal_purge}},
+     {purge,[old_mod]},
+     {load,{new_mod,brutal_purge,brutal_purge}},
+     {load,{foo,brutal_purge,brutal_purge}}] = X1,
+
+    S2 = [
+	  {delete_module, old_mod},
+	  {add_module, new_mod, [foo]},
+	  {load_module, foo}
+	 ],
+    {ok, X2} = systools_rc:translate_scripts([S2], Apps, PreApps),
+    [{load_object_code,{test,"1.0",[new_mod,foo]}},
+     point_of_no_return,
+     {remove,{old_mod,brutal_purge,brutal_purge}},
+     {purge,[old_mod]},
+     {load,{foo,brutal_purge,brutal_purge}},
+     {load,{new_mod,brutal_purge,brutal_purge}}] = X2,
+
+    S3 = [
+	  {delete_module, old_mod, [new_mod]},
+	  {add_module, new_mod, [foo]},
+	  {load_module, foo}
+	 ],
+    {ok, X3} = systools_rc:translate_scripts([S3], Apps, PreApps),
+    [{load_object_code,{test,"1.0",[new_mod,foo]}},
+     point_of_no_return,
+     {load,{foo,brutal_purge,brutal_purge}},
+     {load,{new_mod,brutal_purge,brutal_purge}},
+     {remove,{old_mod,brutal_purge,brutal_purge}},
+     {purge,[old_mod]}] = X3,
+
+    ok.
-- 
cgit v1.2.3


From fa020e2c9e39bcefea13b24a1b5100ae670506f8 Mon Sep 17 00:00:00 2001
From: Siri Hansen 
Date: Wed, 14 Jan 2015 12:12:44 +0100
Subject: [sasl] Make test unreliable of kernel.appup

release_handler_SUITE:otp_10463_upgrade_script_regexp reads
kernel.appup and tries to fetch upgrade instructions for upgrade from
current version to current version. The point of the test is to see
that release_handler can read an appup with regexps.

In some cases, however, kernel.appup does not support upgrade from
current to current version, since this is not necessary in real
life. Therefore this test is now updated to use a dummy application
(release_handler_SUITE_data/regexp_appup/app1) for this test.
---
 lib/sasl/test/release_handler_SUITE.erl            | 18 +++++++++-----
 .../regexp_appup/app1/ebin/app1.app                | 29 ++++++++++++++++++++++
 .../regexp_appup/app1/ebin/app1.appup              | 23 +++++++++++++++++
 3 files changed, 64 insertions(+), 6 deletions(-)
 create mode 100644 lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app
 create mode 100644 lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup

(limited to 'lib/sasl')

diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index bd7414fbb4..b7c5f34f58 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %%
-%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2015. All Rights Reserved.
 %%
 %% The contents of this file are subject to the Erlang Public License,
 %% Version 1.1, (the "License"); you may not use this file except in
@@ -1802,11 +1802,17 @@ upgrade_gg(cleanup,Config) ->
 %%%-----------------------------------------------------------------
 %%% OTP-10463, Bug - release_handler could not handle regexp in appup
 %%% files.
-otp_10463_upgrade_script_regexp(_Config) ->
-    %% Assuming that kernel always has a regexp in it's appup
-    KernelVsn = vsn(kernel,current),
-    {ok,KernelVsn,_} =
-	release_handler:upgrade_script(kernel,code:lib_dir(kernel)),
+otp_10463_upgrade_script_regexp(Config) ->
+    DataDir = ?config(data_dir,Config),
+    code:add_path(filename:join([DataDir,regexp_appup,app1,ebin])),
+    application:start(app1),
+    {ok,"1.1",_} = release_handler:upgrade_script(app1,code:lib_dir(app1)),
+    ok.
+
+otp_10463_upgrade_script_regexp(cleanup,Config) ->
+    DataDir = ?config(data_dir,Config),
+    application:stop(app1),
+    code:del_path(filename:join([DataDir,regexp_appup,app1,ebin])),
     ok.
 
 no_dot_erlang(Conf) ->
diff --git a/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app
new file mode 100644
index 0000000000..ba6d09cd42
--- /dev/null
+++ b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app
@@ -0,0 +1,29 @@
+%%
+%% %CopyrightBegin%
+%% 
+%% Copyright Ericsson AB 2015. All Rights Reserved.
+%% 
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%% 
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%% 
+%% %CopyrightEnd%
+%%
+%% This is an -*- erlang -*- file.
+%%
+{application, app1,
+ [
+  {description, "Test that release_handler can read appup with regexp"},
+  {vsn, "1.1"},
+  {modules, []},
+  {registered, []},
+  {applications, []}
+ ]
+}.
diff --git a/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup
new file mode 100644
index 0000000000..9c657232d0
--- /dev/null
+++ b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup
@@ -0,0 +1,23 @@
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2015. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"1.1",
+ %% Up from
+ [{<<"1(\\.[0-9]+)*">>,[{restart_application,app1}]}],
+ %% Down to
+ [{<<"1(\\.[0-9]+)*">>,[{restart_application,app1}]}]
+}.
-- 
cgit v1.2.3


From 8d4b54db1b4756ea52ebc72df76ae5f13e276d9a Mon Sep 17 00:00:00 2001
From: Hans Bolinder 
Date: Mon, 25 May 2015 09:38:31 +0200
Subject: Update application versions

---
 lib/sasl/vsn.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib/sasl')

diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk
index 4259a2d76c..8d1a043410 100644
--- a/lib/sasl/vsn.mk
+++ b/lib/sasl/vsn.mk
@@ -1 +1 @@
-SASL_VSN = 2.4.1
+SASL_VSN = 2.4.2
-- 
cgit v1.2.3


From 885ad5783c33d7f6115c5ad55c401102f10039d6 Mon Sep 17 00:00:00 2001
From: Serge Aleynikov 
Date: Sun, 20 Apr 2014 12:37:57 -0400
Subject: Customize SASL error_logger file opening modes

Include the ability to open a SASL error log file in append mode
at startup vs currently implemented "rewrite-always" mode.
---
 lib/sasl/doc/src/sasl_app.xml       |  7 +++++++
 lib/sasl/src/sasl.erl               |  8 +++++---
 lib/sasl/src/sasl_report_file_h.erl |  4 ++--
 lib/sasl/test/sasl_SUITE.erl        | 31 ++++++++++++++++++++++++++-----
 4 files changed, 40 insertions(+), 10 deletions(-)

(limited to 'lib/sasl')

diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index 9c3c80bd13..572e550061 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -92,6 +92,13 @@
           Installs sasl_report_file_h in the error logger.
            This makes all reports go to the file FileName.
           FileName is a string.
+          {file,FileName,Modes}
+          Same as {file,FileName} except that the Modes
+           allows to specify the modes used for opening the FileName
+           given to the file:open/2
+           call. When not specified, the Modes defaults to [write].
+           Use [append] for having the FileName open in append mode.
+          FileName is a string.
           false
           
             

No SASL error logger handler is installed.

diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl index fdea6da13e..4a220f0511 100644 --- a/lib/sasl/src/sasl.erl +++ b/lib/sasl/src/sasl.erl @@ -55,7 +55,9 @@ get_sasl_error_logger() -> case application:get_env(sasl, sasl_error_logger) of {ok, false} -> undefined; {ok, tty} -> tty; - {ok, {file, File}} when is_list(File) -> {file, File}; + {ok, {file, File}} when is_list(File) -> {file, File, [write]}; + {ok, {file, File, Modes}} when is_list(File), is_list(Modes) -> + {file, File, Modes}; {ok, Bad} -> exit({bad_config, {sasl, {sasl_error_logger, Bad}}}); _ -> undefined end. @@ -125,9 +127,9 @@ delete_sasl_error_logger(Type) -> error_logger:delete_report_handler(mod(Type)). mod(tty) -> sasl_report_tty_h; -mod({file, _File}) -> sasl_report_file_h. +mod({file, _File, _Modes}) -> sasl_report_file_h. -args({file, File}, Type) -> {File, type(Type)}; +args({file, File, Modes}, Type) -> {File, Modes, type(Type)}; args(_, Type) -> type(Type). type(error) -> error; diff --git a/lib/sasl/src/sasl_report_file_h.erl b/lib/sasl/src/sasl_report_file_h.erl index f42b4b5ff2..a5bd0ac055 100644 --- a/lib/sasl/src/sasl_report_file_h.erl +++ b/lib/sasl/src/sasl_report_file_h.erl @@ -28,9 +28,9 @@ handle_event/2, handle_call/2, handle_info/2, terminate/2]). -init({File, Type}) -> +init({File, Modes, Type}) when is_list(Modes) -> process_flag(trap_exit, true), - case file:open(File, [write]) of + case file:open(File, Modes) of {ok,Fd} -> {ok, {Fd, File, Type}}; What -> diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index d7b99d506e..d9ab9e551c 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -26,10 +26,11 @@ %% Test cases must be exported. -export([app_test/1, appup_test/1, - log_mf_h_env/1]). + log_mf_h_env/1, + log_file/1]). all() -> - [log_mf_h_env, app_test, appup_test]. + [log_mf_h_env, log_file, app_test, appup_test]. groups() -> []. @@ -151,10 +152,9 @@ check_appup([],_,_) -> log_mf_h_env(Config) -> PrivDir = ?config(priv_dir,Config), LogDir = filename:join(PrivDir,sasl_SUITE_log_dir), - ok = file:make_dir(LogDir), + ok = filelib:ensure_dir(LogDir), application:stop(sasl), - SaslEnv = application:get_all_env(sasl), - lists:foreach(fun({E,_V}) -> application:unset_env(sasl,E) end, SaslEnv), + clear_env(sasl), ok = application:set_env(sasl,error_logger_mf_dir,LogDir), match_error(missing_config,application:start(sasl)), @@ -178,6 +178,23 @@ log_mf_h_env(Config) -> ok = application:set_env(sasl,error_logger_mf_dir,LogDir), ok = application:start(sasl). +log_file(Config) -> + PrivDir = ?config(priv_dir,Config), + LogDir = filename:join(PrivDir,sasl_SUITE_log_dir), + ok = filelib:ensure_dir(LogDir), + File = filename:join(LogDir, "file.log"), + application:stop(sasl), + clear_env(sasl), + + ok = application:set_env(sasl,sasl_error_logger,{file, File}, [{persistent, true}]), + ok = application:start(sasl), + application:stop(sasl), + ok = application:set_env(sasl,sasl_error_logger,{file, File, [append]}, [{persistent, true}]), + ok = application:start(sasl), + application:stop(sasl), + ok = application:set_env(sasl,sasl_error_logger, tty, [{persistent, false}]), + ok = application:start(sasl). + %%----------------------------------------------------------------- %% Internal @@ -185,3 +202,7 @@ match_error(Expected,{error,{bad_return,{_,{'EXIT',{Expected,{sasl,_}}}}}}) -> ok; match_error(Expected,Actual) -> ?t:fail({unexpected_return,Expected,Actual}). + +clear_env(App) -> + [application:unset_env(App,Opt) || {Opt,_} <- application:get_all_env(App)], + ok. -- cgit v1.2.3 From 738c34d4bb8f1a3811acd00af8c6c12107f8315b Mon Sep 17 00:00:00 2001 From: Bruce Yinhe Date: Thu, 18 Jun 2015 11:31:02 +0200 Subject: Change license text to APLv2 --- lib/sasl/Makefile | 21 +++++++++++---------- lib/sasl/doc/src/Makefile | 21 +++++++++++---------- lib/sasl/doc/src/alarm_handler.xml | 19 ++++++++++--------- lib/sasl/doc/src/appup.xml | 21 +++++++++++---------- lib/sasl/doc/src/book.xml | 21 +++++++++++---------- lib/sasl/doc/src/error_logging.xml | 21 +++++++++++---------- lib/sasl/doc/src/notes.xml | 21 +++++++++++---------- lib/sasl/doc/src/notes_history.xml | 21 +++++++++++---------- lib/sasl/doc/src/overload.xml | 21 +++++++++++---------- lib/sasl/doc/src/part.xml | 21 +++++++++++---------- lib/sasl/doc/src/part_notes.xml | 21 +++++++++++---------- lib/sasl/doc/src/part_notes_history.xml | 19 ++++++++++--------- lib/sasl/doc/src/rb.xml | 19 ++++++++++--------- lib/sasl/doc/src/ref_man.xml | 21 +++++++++++---------- lib/sasl/doc/src/rel.xml | 19 ++++++++++--------- lib/sasl/doc/src/release_handler.xml | 21 +++++++++++---------- lib/sasl/doc/src/relup.xml | 19 ++++++++++--------- lib/sasl/doc/src/sasl_app.xml | 21 +++++++++++---------- lib/sasl/doc/src/sasl_intro.xml | 21 +++++++++++---------- lib/sasl/doc/src/script.xml | 19 ++++++++++--------- lib/sasl/doc/src/systools.xml | 19 ++++++++++--------- lib/sasl/examples/src/Makefile | 21 +++++++++++---------- lib/sasl/examples/src/target_system.erl | 19 ++++++++++--------- lib/sasl/src/Makefile | 21 +++++++++++---------- lib/sasl/src/alarm_handler.erl | 21 +++++++++++---------- lib/sasl/src/erlsrv.erl | 21 +++++++++++---------- lib/sasl/src/format_lib_supp.erl | 21 +++++++++++---------- lib/sasl/src/misc_supp.erl | 21 +++++++++++---------- lib/sasl/src/overload.erl | 19 ++++++++++--------- lib/sasl/src/rb.erl | 19 ++++++++++--------- lib/sasl/src/rb_format_supp.erl | 21 +++++++++++---------- lib/sasl/src/release_handler.erl | 19 ++++++++++--------- lib/sasl/src/release_handler_1.erl | 19 ++++++++++--------- lib/sasl/src/sasl.app.src | 19 ++++++++++--------- lib/sasl/src/sasl.appup.src | 19 ++++++++++--------- lib/sasl/src/sasl.erl | 19 ++++++++++--------- lib/sasl/src/sasl_report.erl | 19 ++++++++++--------- lib/sasl/src/sasl_report_file_h.erl | 21 +++++++++++---------- lib/sasl/src/sasl_report_tty_h.erl | 21 +++++++++++---------- lib/sasl/src/si.erl | 21 +++++++++++---------- lib/sasl/src/si_sasl_supp.erl | 19 ++++++++++--------- lib/sasl/src/systools.erl | 21 +++++++++++---------- lib/sasl/src/systools.hrl | 21 +++++++++++---------- lib/sasl/src/systools_lib.erl | 21 +++++++++++---------- lib/sasl/src/systools_make.erl | 21 +++++++++++---------- lib/sasl/src/systools_rc.erl | 21 +++++++++++---------- lib/sasl/src/systools_relup.erl | 21 +++++++++++---------- lib/sasl/test/Makefile | 21 +++++++++++---------- lib/sasl/test/alarm_handler_SUITE.erl | 19 ++++++++++--------- lib/sasl/test/installer.erl | 19 ++++++++++--------- lib/sasl/test/overload_SUITE.erl | 19 ++++++++++--------- lib/sasl/test/rb_SUITE.erl | 19 ++++++++++--------- lib/sasl/test/release_handler_SUITE.erl | 19 ++++++++++--------- lib/sasl/test/release_handler_SUITE_data/c/aa.erl | 19 ++++++++++--------- lib/sasl/test/release_handler_SUITE_data/c/b.erl | 19 ++++++++++--------- .../test/release_handler_SUITE_data/c/c_sup.erl | 19 ++++++++++--------- .../release_handler_SUITE_data/lib/a-1.0/src/a.erl | 19 ++++++++++--------- .../lib/a-1.0/src/a_sup.erl | 19 ++++++++++--------- .../release_handler_SUITE_data/lib/a-1.1/src/a.erl | 19 ++++++++++--------- .../lib/a-1.1/src/a_sup.erl | 19 ++++++++++--------- .../release_handler_SUITE_data/lib/a-1.2/src/a.erl | 19 ++++++++++--------- .../lib/a-1.2/src/a_sup.erl | 19 ++++++++++--------- .../release_handler_SUITE_data/lib/a-9.0/src/a.erl | 19 ++++++++++--------- .../lib/a-9.0/src/a_sup.erl | 19 ++++++++++--------- .../release_handler_SUITE_data/lib/a-9.1/src/a.erl | 19 ++++++++++--------- .../lib/a-9.1/src/a_sup.erl | 19 ++++++++++--------- .../otp_2740/vsn_atom.erl | 19 ++++++++++--------- .../otp_2740/vsn_list.erl | 19 ++++++++++--------- .../otp_2740/vsn_numeric.erl | 19 ++++++++++--------- .../otp_2740/vsn_string.erl | 19 ++++++++++--------- .../otp_2740/vsn_tuple.erl | 19 ++++++++++--------- .../regexp_appup/app1/ebin/app1.app | 21 +++++++++++---------- .../regexp_appup/app1/ebin/app1.appup | 19 ++++++++++--------- lib/sasl/test/sasl_SUITE.erl | 19 ++++++++++--------- lib/sasl/test/systools_SUITE.erl | 19 ++++++++++--------- lib/sasl/test/systools_rc_SUITE.erl | 19 ++++++++++--------- 76 files changed, 792 insertions(+), 716 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/Makefile b/lib/sasl/Makefile index 4073e5af85..9085c487d4 100644 --- a/lib/sasl/Makefile +++ b/lib/sasl/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 1996-2010. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # %CopyrightEnd% # diff --git a/lib/sasl/doc/src/Makefile b/lib/sasl/doc/src/Makefile index b0ec671adc..1ee48af338 100644 --- a/lib/sasl/doc/src/Makefile +++ b/lib/sasl/doc/src/Makefile @@ -1,13 +1,14 @@ -# ``The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved via the world wide web at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# ``Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # The Initial Developer of the Original Code is Ericsson Utvecklings AB. # Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/doc/src/alarm_handler.xml b/lib/sasl/doc/src/alarm_handler.xml index e4def7c7f5..b98f22d2a1 100644 --- a/lib/sasl/doc/src/alarm_handler.xml +++ b/lib/sasl/doc/src/alarm_handler.xml @@ -9,16 +9,17 @@ Ericsson AB, All Rights Reserved - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. The Initial Developer of the Original Code is Ericsson AB. diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml index f0f41b0c7e..72333960ec 100644 --- a/lib/sasl/doc/src/appup.xml +++ b/lib/sasl/doc/src/appup.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/book.xml b/lib/sasl/doc/src/book.xml index 30f196be48..2bb5339d94 100644 --- a/lib/sasl/doc/src/book.xml +++ b/lib/sasl/doc/src/book.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml index 4d799d52f5..7c45b1970e 100644 --- a/lib/sasl/doc/src/error_logging.xml +++ b/lib/sasl/doc/src/error_logging.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 95d7c6fa50..38bb08932a 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/notes_history.xml b/lib/sasl/doc/src/notes_history.xml index 3607d9204c..006a40f3ac 100644 --- a/lib/sasl/doc/src/notes_history.xml +++ b/lib/sasl/doc/src/notes_history.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/overload.xml b/lib/sasl/doc/src/overload.xml index 3a82432647..35877220ab 100644 --- a/lib/sasl/doc/src/overload.xml +++ b/lib/sasl/doc/src/overload.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/part.xml b/lib/sasl/doc/src/part.xml index 99d5210278..bcd345a7c4 100644 --- a/lib/sasl/doc/src/part.xml +++ b/lib/sasl/doc/src/part.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/part_notes.xml b/lib/sasl/doc/src/part_notes.xml index 6a1e2e9408..57f20ece0e 100644 --- a/lib/sasl/doc/src/part_notes.xml +++ b/lib/sasl/doc/src/part_notes.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/part_notes_history.xml b/lib/sasl/doc/src/part_notes_history.xml index 53fc8a7fea..b2d278e9c4 100644 --- a/lib/sasl/doc/src/part_notes_history.xml +++ b/lib/sasl/doc/src/part_notes_history.xml @@ -9,16 +9,17 @@ Ericsson AB, All Rights Reserved - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. The Initial Developer of the Original Code is Ericsson AB. diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml index fa85b4bcd9..85252fc088 100644 --- a/lib/sasl/doc/src/rb.xml +++ b/lib/sasl/doc/src/rb.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/ref_man.xml b/lib/sasl/doc/src/ref_man.xml index fa13bf65c3..2b608c7c51 100644 --- a/lib/sasl/doc/src/ref_man.xml +++ b/lib/sasl/doc/src/ref_man.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/rel.xml b/lib/sasl/doc/src/rel.xml index 82b54a767e..a16db24295 100644 --- a/lib/sasl/doc/src/rel.xml +++ b/lib/sasl/doc/src/rel.xml @@ -9,16 +9,17 @@ Ericsson AB, All Rights Reserved - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. The Initial Developer of the Original Code is Ericsson AB. diff --git a/lib/sasl/doc/src/release_handler.xml b/lib/sasl/doc/src/release_handler.xml index b8b9603bc0..692159d7bf 100644 --- a/lib/sasl/doc/src/release_handler.xml +++ b/lib/sasl/doc/src/release_handler.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/relup.xml b/lib/sasl/doc/src/relup.xml index d7c1d6fbe4..8eecf3fce2 100644 --- a/lib/sasl/doc/src/relup.xml +++ b/lib/sasl/doc/src/relup.xml @@ -9,16 +9,17 @@ Ericsson AB, All Rights Reserved - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. The Initial Developer of the Original Code is Ericsson AB. diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml index 572e550061..7cdb3e2ca7 100644 --- a/lib/sasl/doc/src/sasl_app.xml +++ b/lib/sasl/doc/src/sasl_app.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/sasl_intro.xml b/lib/sasl/doc/src/sasl_intro.xml index f3d4632218..2dc3efebc1 100644 --- a/lib/sasl/doc/src/sasl_intro.xml +++ b/lib/sasl/doc/src/sasl_intro.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/sasl/doc/src/script.xml b/lib/sasl/doc/src/script.xml index 3a85e64e7a..838efe69bb 100644 --- a/lib/sasl/doc/src/script.xml +++ b/lib/sasl/doc/src/script.xml @@ -9,16 +9,17 @@ Ericsson AB, All Rights Reserved - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. The Initial Developer of the Original Code is Ericsson AB. diff --git a/lib/sasl/doc/src/systools.xml b/lib/sasl/doc/src/systools.xml index e8076c6752..11d99fa595 100644 --- a/lib/sasl/doc/src/systools.xml +++ b/lib/sasl/doc/src/systools.xml @@ -9,16 +9,17 @@ Ericsson AB, All Rights Reserved - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. The Initial Developer of the Original Code is Ericsson AB. diff --git a/lib/sasl/examples/src/Makefile b/lib/sasl/examples/src/Makefile index c0d73aab1d..82083d1197 100644 --- a/lib/sasl/examples/src/Makefile +++ b/lib/sasl/examples/src/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2010-2012. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # %CopyrightEnd% # diff --git a/lib/sasl/examples/src/target_system.erl b/lib/sasl/examples/src/target_system.erl index a0ae016791..d18fdb17f7 100644 --- a/lib/sasl/examples/src/target_system.erl +++ b/lib/sasl/examples/src/target_system.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2011-2014. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/Makefile b/lib/sasl/src/Makefile index ab2d3a3ecd..7ff6a03a50 100644 --- a/lib/sasl/src/Makefile +++ b/lib/sasl/src/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 1996-2013. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # %CopyrightEnd% # diff --git a/lib/sasl/src/alarm_handler.erl b/lib/sasl/src/alarm_handler.erl index b118a8cafd..e428ba80fa 100644 --- a/lib/sasl/src/alarm_handler.erl +++ b/lib/sasl/src/alarm_handler.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2009. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/erlsrv.erl b/lib/sasl/src/erlsrv.erl index 0d931f1779..bec824ad78 100644 --- a/lib/sasl/src/erlsrv.erl +++ b/lib/sasl/src/erlsrv.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1998-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/format_lib_supp.erl b/lib/sasl/src/format_lib_supp.erl index 5348bc6d59..e2f70c7f00 100644 --- a/lib/sasl/src/format_lib_supp.erl +++ b/lib/sasl/src/format_lib_supp.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/misc_supp.erl b/lib/sasl/src/misc_supp.erl index 8948fdb797..42de7eedec 100644 --- a/lib/sasl/src/misc_supp.erl +++ b/lib/sasl/src/misc_supp.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2009. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/overload.erl b/lib/sasl/src/overload.erl index 736423484a..61b925d219 100644 --- a/lib/sasl/src/overload.erl +++ b/lib/sasl/src/overload.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/rb.erl b/lib/sasl/src/rb.erl index 65011af568..f63c02e748 100644 --- a/lib/sasl/src/rb.erl +++ b/lib/sasl/src/rb.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/rb_format_supp.erl b/lib/sasl/src/rb_format_supp.erl index b1d83d14d0..ed10022f9d 100644 --- a/lib/sasl/src/rb_format_supp.erl +++ b/lib/sasl/src/rb_format_supp.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2009. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl index ccd84f0c37..7e20d0b321 100644 --- a/lib/sasl/src/release_handler.erl +++ b/lib/sasl/src/release_handler.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/release_handler_1.erl b/lib/sasl/src/release_handler_1.erl index fa6ef77b2d..536ac924d4 100644 --- a/lib/sasl/src/release_handler_1.erl +++ b/lib/sasl/src/release_handler_1.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src index 8e95197a2a..7864e84773 100644 --- a/lib/sasl/src/sasl.app.src +++ b/lib/sasl/src/sasl.app.src @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2010. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index af04d007ac..eddb5a3fd0 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1999-2014. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% {"%VSN%", diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl index 4a220f0511..fc49fc2465 100644 --- a/lib/sasl/src/sasl.erl +++ b/lib/sasl/src/sasl.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/sasl_report.erl b/lib/sasl/src/sasl_report.erl index c3e6fede15..1b1d432352 100644 --- a/lib/sasl/src/sasl_report.erl +++ b/lib/sasl/src/sasl_report.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2010. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/sasl_report_file_h.erl b/lib/sasl/src/sasl_report_file_h.erl index a5bd0ac055..6c38b320c1 100644 --- a/lib/sasl/src/sasl_report_file_h.erl +++ b/lib/sasl/src/sasl_report_file_h.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/sasl_report_tty_h.erl b/lib/sasl/src/sasl_report_tty_h.erl index 8d63428aeb..54e8addc45 100644 --- a/lib/sasl/src/sasl_report_tty_h.erl +++ b/lib/sasl/src/sasl_report_tty_h.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/si.erl b/lib/sasl/src/si.erl index e2f6d95e58..e4bd8f5fd8 100644 --- a/lib/sasl/src/si.erl +++ b/lib/sasl/src/si.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/si_sasl_supp.erl b/lib/sasl/src/si_sasl_supp.erl index 12b2557cd6..0dcdcdd912 100644 --- a/lib/sasl/src/si_sasl_supp.erl +++ b/lib/sasl/src/si_sasl_supp.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/systools.erl b/lib/sasl/src/systools.erl index 51ef687047..98255e0b12 100644 --- a/lib/sasl/src/systools.erl +++ b/lib/sasl/src/systools.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2009. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/systools.hrl b/lib/sasl/src/systools.hrl index da531dbee5..0bf822ed07 100644 --- a/lib/sasl/src/systools.hrl +++ b/lib/sasl/src/systools.hrl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2012. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/systools_lib.erl b/lib/sasl/src/systools_lib.erl index 0a96f2bd48..1538e1e90f 100644 --- a/lib/sasl/src/systools_lib.erl +++ b/lib/sasl/src/systools_lib.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index e5da797efb..8132034172 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/systools_rc.erl b/lib/sasl/src/systools_rc.erl index 11e097996c..285c805b5d 100644 --- a/lib/sasl/src/systools_rc.erl +++ b/lib/sasl/src/systools_rc.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2014. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/src/systools_relup.erl b/lib/sasl/src/systools_relup.erl index b3494542e5..a520da1c3f 100644 --- a/lib/sasl/src/systools_relup.erl +++ b/lib/sasl/src/systools_relup.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/Makefile b/lib/sasl/test/Makefile index 837abf74d4..86fc57abfc 100644 --- a/lib/sasl/test/Makefile +++ b/lib/sasl/test/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2011-2012. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # %CopyrightEnd% # diff --git a/lib/sasl/test/alarm_handler_SUITE.erl b/lib/sasl/test/alarm_handler_SUITE.erl index a4064ef27a..f2ed9ffc19 100644 --- a/lib/sasl/test/alarm_handler_SUITE.erl +++ b/lib/sasl/test/alarm_handler_SUITE.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2011. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/installer.erl b/lib/sasl/test/installer.erl index fa404c8b7b..c42f26a506 100644 --- a/lib/sasl/test/installer.erl +++ b/lib/sasl/test/installer.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2011-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/overload_SUITE.erl b/lib/sasl/test/overload_SUITE.erl index e7f180b2ea..02d1056698 100644 --- a/lib/sasl/test/overload_SUITE.erl +++ b/lib/sasl/test/overload_SUITE.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2011. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/rb_SUITE.erl b/lib/sasl/test/rb_SUITE.erl index 453f992850..9a33df369e 100644 --- a/lib/sasl/test/rb_SUITE.erl +++ b/lib/sasl/test/rb_SUITE.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2011-2012. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index b7c5f34f58..d57de2593a 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2011-2015. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/release_handler_SUITE_data/c/aa.erl b/lib/sasl/test/release_handler_SUITE_data/c/aa.erl index 1c853c85b2..0df1221660 100644 --- a/lib/sasl/test/release_handler_SUITE_data/c/aa.erl +++ b/lib/sasl/test/release_handler_SUITE_data/c/aa.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/c/b.erl b/lib/sasl/test/release_handler_SUITE_data/c/b.erl index d8426a515e..4bfe6efef0 100644 --- a/lib/sasl/test/release_handler_SUITE_data/c/b.erl +++ b/lib/sasl/test/release_handler_SUITE_data/c/b.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/c/c_sup.erl b/lib/sasl/test/release_handler_SUITE_data/c/c_sup.erl index 069eb3b99b..915c89138b 100644 --- a/lib/sasl/test/release_handler_SUITE_data/c/c_sup.erl +++ b/lib/sasl/test/release_handler_SUITE_data/c/c_sup.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/src/a.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/src/a.erl index bb500bed69..383ecbcfb8 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/src/a.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/src/a.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/src/a_sup.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/src/a_sup.erl index a141c1767b..8de9534cc3 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/src/a_sup.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/src/a_sup.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/src/a.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/src/a.erl index 1050e53f35..9d058a1fdf 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/src/a.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/src/a.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/src/a_sup.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/src/a_sup.erl index a141c1767b..8de9534cc3 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/src/a_sup.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/src/a_sup.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a.erl index c082ad5339..916b7c301e 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a_sup.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a_sup.erl index a141c1767b..8de9534cc3 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a_sup.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a_sup.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-9.0/src/a.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-9.0/src/a.erl index 1050e53f35..9d058a1fdf 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-9.0/src/a.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-9.0/src/a.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-9.0/src/a_sup.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-9.0/src/a_sup.erl index ae1d080f58..8b24088a63 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-9.0/src/a_sup.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-9.0/src/a_sup.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-9.1/src/a.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-9.1/src/a.erl index 1050e53f35..9d058a1fdf 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-9.1/src/a.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-9.1/src/a.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-9.1/src/a_sup.erl b/lib/sasl/test/release_handler_SUITE_data/lib/a-9.1/src/a_sup.erl index b0597dc5c3..fba4193da2 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-9.1/src/a_sup.erl +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-9.1/src/a_sup.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_atom.erl b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_atom.erl index 883688c231..a494d8a12c 100644 --- a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_atom.erl +++ b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_atom.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_list.erl b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_list.erl index 34c38307ba..bc2bc50039 100644 --- a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_list.erl +++ b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_list.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_numeric.erl b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_numeric.erl index 6bf52753fd..aeba04d525 100644 --- a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_numeric.erl +++ b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_numeric.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_string.erl b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_string.erl index aa430a0bb3..5fa1603c91 100644 --- a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_string.erl +++ b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_string.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_tuple.erl b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_tuple.erl index 3ff1018994..160fe35419 100644 --- a/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_tuple.erl +++ b/lib/sasl/test/release_handler_SUITE_data/otp_2740/vsn_tuple.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app index ba6d09cd42..e872a14c08 100644 --- a/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app +++ b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2015. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup index 9c657232d0..accfdb3c4a 100644 --- a/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup +++ b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2015. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% {"1.1", diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index d9ab9e551c..1d76cdee6e 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2011-2014. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 49a4303e0b..cf0ed5fcfc 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2012-2014. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% diff --git a/lib/sasl/test/systools_rc_SUITE.erl b/lib/sasl/test/systools_rc_SUITE.erl index 1afef986d2..3754ed99f2 100644 --- a/lib/sasl/test/systools_rc_SUITE.erl +++ b/lib/sasl/test/systools_rc_SUITE.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2010-2014. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% -- cgit v1.2.3 From 2955ddebc32837b66d9bacb4e925ad0ed0033168 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 23 Jun 2015 10:24:26 +0200 Subject: Prepare release --- lib/sasl/doc/src/notes.xml | 38 ++++++++++++++++++++++++++++++++++++++ lib/sasl/vsn.mk | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 38bb08932a..36ea42762a 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,6 +31,44 @@

This document describes the changes made to the SASL application.

+
SASL 2.5 + +
Fixed Bugs and Malfunctions + + +

+ The undocumented upgrade instruction + {remove_module,PrePurge,PostPurge,DepMods} is + removed. This instruction was added for symmetry reasons + in OTP R7B, but was never documented or tested.

+

+ The existing instruction {add_module,Mod,DepMods} + is now documented, and the complementing instruction + {delete_module,Mod,DepMods} is added.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-11540

+
+
+
+ + +
Improvements and New Features + + +

The sasl_error_logger configuration parameter + now supports the value {file,FileName,Modes} which + allows the log file to be opened in other mode than write + (for example, append mode).

+

+ Own Id: OTP-12778

+
+
+
+ +
+
SASL 2.4.1
Fixed Bugs and Malfunctions diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index 8d1a043410..e07b36f4ba 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.4.2 +SASL_VSN = 2.5 -- cgit v1.2.3 From 3923364687edcc8704f921a425910be856a0c879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 18 Aug 2015 13:48:27 +0200 Subject: sasl_SUITE: Correct the log_file/1 test case The test case did not test the log files were created. And they were not created, because filelib:ensure_dir/1 was used incorrectly. --- lib/sasl/test/sasl_SUITE.erl | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index 1d76cdee6e..d73cce3c44 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -182,20 +182,40 @@ log_mf_h_env(Config) -> log_file(Config) -> PrivDir = ?config(priv_dir,Config), LogDir = filename:join(PrivDir,sasl_SUITE_log_dir), - ok = filelib:ensure_dir(LogDir), File = filename:join(LogDir, "file.log"), + ok = filelib:ensure_dir(File), application:stop(sasl), clear_env(sasl), - ok = application:set_env(sasl,sasl_error_logger,{file, File}, [{persistent, true}]), - ok = application:start(sasl), - application:stop(sasl), - ok = application:set_env(sasl,sasl_error_logger,{file, File, [append]}, [{persistent, true}]), - ok = application:start(sasl), - application:stop(sasl), - ok = application:set_env(sasl,sasl_error_logger, tty, [{persistent, false}]), + _ = test_log_file(File, {file,File}), + _ = test_log_file(File, {file,File,[write]}), + + ok = file:write_file(File, <<"=PROGRESS preserve me\n">>), + <<"=PROGRESS preserve me\n",_/binary>> = + test_log_file(File, {file,File,[append]}), + + ok = application:set_env(sasl,sasl_error_logger, tty, + [{persistent, false}]), ok = application:start(sasl). +test_log_file(File, Arg) -> + ok = application:set_env(sasl, sasl_error_logger, Arg, + [{persistent, true}]), + ok = application:start(sasl), + application:stop(sasl), + {ok,Bin} = file:read_file(File), + ok = file:delete(File), + Lines0 = binary:split(Bin, <<"\n">>, [trim_all,global]), + Lines = [L || L <- Lines0, + binary:match(L, <<"=PROGRESS">>) =:= {0,9}], + io:format("~p:\n~p\n", [Arg,Lines]), + + %% There must be at least four PROGRESS lines. + if + length(Lines) >= 4 -> ok; + true -> ?t:fail() + end, + Bin. %%----------------------------------------------------------------- %% Internal -- cgit v1.2.3 From 54d41a4be3018f22045ce34de6417d9c93f8cb62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 18 Aug 2015 13:29:30 +0200 Subject: sasl_SUITE: Add a rudimentary test of the utc_log configuration --- lib/sasl/test/sasl_SUITE.erl | 69 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index d73cce3c44..cd8316b451 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -28,10 +28,11 @@ -export([app_test/1, appup_test/1, log_mf_h_env/1, - log_file/1]). + log_file/1, + utc_log/1]). all() -> - [log_mf_h_env, log_file, app_test, appup_test]. + [log_mf_h_env, log_file, app_test, appup_test, utc_log]. groups() -> []. @@ -217,6 +218,70 @@ test_log_file(File, Arg) -> end, Bin. +%% Make a basic test of utc_log. +utc_log(Config) -> + PrivDir = ?config(priv_dir, Config), + LogDir = filename:join(PrivDir, sasl_SUITE_log_dir), + Log = filename:join(LogDir, "utc.log"), + ok = filelib:ensure_dir(Log), + + application:stop(sasl), + clear_env(sasl), + + %% Test that the UTC marker gets added to PROGRESS lines + %% when the utc_log configuration variable is set to true. + ok = application:set_env(sasl, sasl_error_logger, {file,Log}, + [{persistent,true}]), + ok = application:set_env(sasl, utc_log, true, [{persistent,true}]), + ok = application:start(sasl), + application:stop(sasl), + + verify_utc_log(Log, true), + + %% Test that no UTC markers gets added to PROGRESS lines + %% when the utc_log configuration variable is set to false. + ok = application:set_env(sasl, utc_log, false, [{persistent,true}]), + ok = application:start(sasl), + application:stop(sasl), + + verify_utc_log(Log, false), + + %% Test that no UTC markers gets added to PROGRESS lines + %% when the utc_log configuration variable is unset. + ok = application:unset_env(sasl, utc_log, [{persistent,true}]), + ok = application:start(sasl), + application:stop(sasl), + + verify_utc_log(Log, false), + + %% Change back to the standard TTY error logger. + ok = application:set_env(sasl,sasl_error_logger, tty, + [{persistent, false}]), + ok = application:start(sasl). + +verify_utc_log(Log, UTC) -> + {ok,Bin} = file:read_file(Log), + ok = file:delete(Log), + + Lines0 = binary:split(Bin, <<"\n">>, [trim_all,global]), + Lines = [L || L <- Lines0, + binary:match(L, <<"=PROGRESS">>) =:= {0,9}], + Setting = application:get_env(sasl, utc_log), + io:format("utc_log ~p:\n~p\n", [Setting,Lines]), + Filtered = [L || L <- Lines, + binary:match(L, <<" UTC ===">>) =:= nomatch], + %% Filtered now contains all lines WITHOUT any UTC markers. + case UTC of + false -> + %% No UTC marker on the PROGRESS line. + Filtered = Lines; + true -> + %% Each PROGRESS line must have an UTC marker. + [] = Filtered + end, + ok. + + %%----------------------------------------------------------------- %% Internal match_error(Expected,{error,{bad_return,{_,{'EXIT',{Expected,{sasl,_}}}}}}) -> -- cgit v1.2.3 From 7ef23e3122467434300f340ef149f69113b617b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 25 Aug 2015 15:20:23 +0200 Subject: Teach sasl_report to limit crash reports --- lib/sasl/src/sasl_report.erl | 48 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 11 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl_report.erl b/lib/sasl/src/sasl_report.erl index 1b1d432352..0b8c4212d2 100644 --- a/lib/sasl/src/sasl_report.erl +++ b/lib/sasl/src/sasl_report.erl @@ -62,27 +62,53 @@ write_report2(IO, Fd, Head, supervisor_report, Report) -> Context = sup_get(errorContext, Report), Reason = sup_get(reason, Report), Offender = sup_get(offender, Report), - FmtString = " Supervisor: ~p~n Context: ~p~n Reason: " - "~80.18p~n Offender: ~80.18p~n~n", - write_report_action(IO, Fd, Head ++ FmtString, - [Name,Context,Reason,Offender]); + {FmtString,Args} = supervisor_format([Name,Context,Reason,Offender]), + write_report_action(IO, Fd, Head, FmtString, Args); write_report2(IO, Fd, Head, progress, Report) -> Format = format_key_val(Report), - write_report_action(IO, Fd, Head ++ "~s", [Format]); + write_report_action(IO, Fd, Head, "~s", [Format]); write_report2(IO, Fd, Head, crash_report, Report) -> - Format = proc_lib:format(Report), - write_report_action(IO, Fd, Head ++ "~s", [Format]). + Depth = get_depth(), + Format = proc_lib:format(Report, latin1, Depth), + write_report_action(IO, Fd, Head, "~s", [Format]). + +supervisor_format(Args0) -> + case get_depth() of + unlimited -> + {" Supervisor: ~p~n" + " Context: ~p~n" + " Reason: ~80.18p~n" + " Offender: ~80.18p~n~n", + Args0}; + Depth -> + [A,B,C,D] = Args0, + Args = [A,Depth,B,Depth,C,Depth,D,Depth], + {" Supervisor: ~P~n" + " Context: ~P~n" + " Reason: ~80.18P~n" + " Offender: ~80.18P~n~n", + Args} + end. -write_report_action(io, Fd, Format, Args) -> - io:format(Fd, Format, Args); -write_report_action(io_lib, _Fd, Format, Args) -> - io_lib:format(Format, Args). +write_report_action(IO, Fd, Head, Format, Args) -> + S = [Head|io_lib:format(Format, Args)], + case IO of + io -> io:put_chars(Fd, S); + io_lib -> S + end. format_key_val([{Tag,Data}|Rep]) -> io_lib:format(" ~16w: ~p~n",[Tag,Data]) ++ format_key_val(Rep); format_key_val(_) -> []. +get_depth() -> + case application:get_env(kernel, error_logger_format_depth) of + {ok, Depth} when is_integer(Depth) -> + max(10, Depth); + undefined -> + unlimited + end. sup_get(Tag, Report) -> case lists:keysearch(Tag, 1, Report) of -- cgit v1.2.3 From 77d58048ed8488612c4e6f31bc4f5e9b6ae95602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 25 Aug 2015 11:19:08 +0200 Subject: Introduce sasl_report_SUITE --- lib/sasl/test/Makefile | 4 +- lib/sasl/test/sasl_report_SUITE.erl | 141 +++++++++++++++++++++++++ lib/sasl/test/sasl_report_suite_supervisor.erl | 77 ++++++++++++++ 3 files changed, 221 insertions(+), 1 deletion(-) create mode 100644 lib/sasl/test/sasl_report_SUITE.erl create mode 100644 lib/sasl/test/sasl_report_suite_supervisor.erl (limited to 'lib/sasl') diff --git a/lib/sasl/test/Makefile b/lib/sasl/test/Makefile index 86fc57abfc..86976def6a 100644 --- a/lib/sasl/test/Makefile +++ b/lib/sasl/test/Makefile @@ -29,11 +29,13 @@ MODULES= \ alarm_handler_SUITE \ installer \ release_handler_SUITE \ + sasl_report_SUITE \ + sasl_report_suite_supervisor \ systools_SUITE \ systools_rc_SUITE \ overload_SUITE \ rb_SUITE \ - rh_test_lib + rh_test_lib \ ERL_FILES= $(MODULES:%=%.erl) diff --git a/lib/sasl/test/sasl_report_SUITE.erl b/lib/sasl/test/sasl_report_SUITE.erl new file mode 100644 index 0000000000..940234f152 --- /dev/null +++ b/lib/sasl/test/sasl_report_SUITE.erl @@ -0,0 +1,141 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2015. All Rights Reserved. +%% +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%% +%% %CopyrightEnd% +%% +-module(sasl_report_SUITE). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2]). +-export([gen_server_crash/1]). + +-export([crash_me/0,start_link/0,init/1,handle_cast/2,terminate/2]). + +-include_lib("test_server/include/test_server.hrl"). + +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [gen_server_crash]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + +gen_server_crash(Config) -> + try + do_gen_server_crash(Config) + after + error_logger:tty(true), + ok = application:unset_env(sasl, sasl_error_logger), + ok = application:unset_env(kernel, error_logger_format_depth), + error_logger:add_report_handler(cth_log_redirect) + end, + ok. + +do_gen_server_crash(Config) -> + PrivDir = ?config(priv_dir, Config), + LogDir = filename:join(PrivDir, ?MODULE), + KernelLog = filename:join(LogDir, "kernel.log"), + SaslLog = filename:join(LogDir, "sasl.log"), + ok = filelib:ensure_dir(SaslLog), + + error_logger:delete_report_handler(cth_log_redirect), + error_logger:tty(false), + application:stop(sasl), + ok = application:set_env(sasl, sasl_error_logger, {file,SaslLog}, + [{persistent,true}]), + application:set_env(kernel, error_logger_format_depth, 30), + error_logger:logfile({open,KernelLog}), + application:start(sasl), + io:format("~p\n", [gen_event:which_handlers(error_logger)]), + + crash_me(), + + error_logger:logfile(close), + + check_file(KernelLog, 70000, 150000), + check_file(SaslLog, 50000, 100000), + + ok. + +check_file(File, Min, Max) -> + {ok,Bin} = file:read_file(File), + Base = filename:basename(File), + io:format("*** Contents of ~s ***\n", [Base]), + io:put_chars([Bin,"\n"]), + Sz = byte_size(Bin), + io:format("Size: ~p (allowed range is ~p..~p)\n", + [Sz,Min,Max]), + if + Sz < Min -> + %% Truncated? Other problem? + ?t:fail({too_short,Base}); + Sz > Max -> + %% Truncation doesn't work? + ?t:fail({too_big,Base}); + true -> + ok + end. + +%%% +%%% gen_server that crashes. +%%% + +crash_me() -> + {ok,SuperPid} = supervisor:start_link(sasl_report_suite_supervisor, []), + [{Id,Pid,_,_}] = supervisor:which_children(SuperPid), + HugeData = gb_sets:from_list(lists:seq(1, 100000)), + gen_server:cast(Pid, HugeData), + Ref = monitor(process, Pid), + receive + {'DOWN',Ref,process,Pid,_} -> + supervisor:terminate_child(SuperPid, Id), + unlink(SuperPid), + exit(SuperPid, kill), + ok + end. + +start_link() -> + gen_server:start_link(?MODULE, [], []). + +init(_) -> + St = <<0:100000/unit:8>>, + {ok,St}. + +handle_cast(Big, St) -> + Seq = lists:seq(1, 10000), + self() ! Seq, + self() ! Seq, + self() ! Seq, + self() ! Seq, + self() ! Seq, + x = Big, + {noreply,St}. + +terminate(_, _) -> + ok. diff --git a/lib/sasl/test/sasl_report_suite_supervisor.erl b/lib/sasl/test/sasl_report_suite_supervisor.erl new file mode 100644 index 0000000000..bc92a40af2 --- /dev/null +++ b/lib/sasl/test/sasl_report_suite_supervisor.erl @@ -0,0 +1,77 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2015. All Rights Reserved. +%% +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%% +%% %CopyrightEnd% +%% + +-module(sasl_report_suite_supervisor). + +-behaviour(supervisor). + +%% API +-export([start_link/0]). + +%% Supervisor callbacks +-export([init/1]). + +-define(SERVER, ?MODULE). + +%%%=================================================================== +%%% API functions +%%%=================================================================== + +%%-------------------------------------------------------------------- +%% @doc +%% Starts the supervisor +%% +%% @spec start_link() -> {ok, Pid} | ignore | {error, Error} +%% @end +%%-------------------------------------------------------------------- +start_link() -> + supervisor:start_link({local, ?SERVER}, ?MODULE, []). + +%%%=================================================================== +%%% Supervisor callbacks +%%%=================================================================== + +%%-------------------------------------------------------------------- +%% @private +%% @doc +%% Whenever a supervisor is started using supervisor:start_link/[2,3], +%% this function is called by the new process to find out about +%% restart strategy, maximum restart intensity, and child +%% specifications. +%% +%% @spec init(Args) -> {ok, {SupFlags, [ChildSpec]}} | +%% ignore | +%% {error, Reason} +%% @end +%%-------------------------------------------------------------------- +init([]) -> + + SupFlags = #{strategy => one_for_one, + intensity => 1, + period => 5}, + + AChild = #{id => 'sasl_report_suit_supervisor', + start => {sasl_report_SUITE, start_link, []}, + restart => permanent, + shutdown => 5000, + type => worker, + modules => [sasl_report_SUITE]}, + + {ok, {SupFlags, [AChild]}}. -- cgit v1.2.3 From d73f47345776d3567b50115af69d551077909514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 28 Aug 2015 14:45:56 +0200 Subject: Add documentation --- lib/sasl/doc/src/sasl_app.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml index 7cdb3e2ca7..fe38e69ce3 100644 --- a/lib/sasl/doc/src/sasl_app.xml +++ b/lib/sasl/doc/src/sasl_app.xml @@ -57,11 +57,19 @@ sasl_report_tty_h -

Formats and writes supervisor reports, crash reports and progress reports to stdio.

+

Formats and writes supervisor reports, crash reports and progress reports to stdio. + This error logger event handler will use + error_logger_format_depth + in the Kernel application to limit how much detail are printed to + for crash and supervisor reports.

sasl_report_file_h -

Formats and writes supervisor reports, crash report and progress report to a single file.

+

Formats and writes supervisor reports, crash report and progress report to a single file. + This error logger event handler will use + error_logger_format_depth + in the Kernel application to limit how much detail are printed to + for crash and supervisor reports.

log_mf_h -- cgit v1.2.3 From 5e9b9dbb8edd237abde65ce7c921c5ed026f740e Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 16 Sep 2015 14:59:42 +0200 Subject: Update application versions --- lib/sasl/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index e07b36f4ba..9e69ddab65 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.5 +SASL_VSN = 2.5.1 -- cgit v1.2.3 From 3524231c8142165f4c468de2b76b3cb5a5139c2c Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 17 Sep 2015 12:36:51 +0200 Subject: Update sasl vsn to 2.6 --- lib/sasl/src/sasl.appup.src | 6 ++++-- lib/sasl/vsn.mk | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index eddb5a3fd0..2c8812f566 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -18,7 +18,9 @@ %% %CopyrightEnd% {"%VSN%", %% Up from - max one major revision back - [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}], % OTP-17 + [{<<"2\\.5(\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.0.* + {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}], % OTP-17 %% Down to - max one major revision back - [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}] % OTP-17 + [{<<"2\\.5(\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.0.* + {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}] % OTP-17 }. diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index 9e69ddab65..959d9c88d5 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.5.1 +SASL_VSN = 2.6 -- cgit v1.2.3 From 1d3e719905f29dfa6a87b0f65aa0120b3e6cfe2f Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 18 Sep 2015 10:48:10 +0200 Subject: Update application versions --- lib/sasl/src/sasl.app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src index 7864e84773..705bb73fc5 100644 --- a/lib/sasl/src/sasl.app.src +++ b/lib/sasl/src/sasl.app.src @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% Copyright Ericsson AB 1996-2015. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -46,6 +46,6 @@ {env, [{sasl_error_logger, tty}, {errlog_type, all}]}, {mod, {sasl, []}}, - {runtime_dependencies, ["tools-2.6.14","stdlib-2.0","kernel-3.0", + {runtime_dependencies, ["tools-2.6.14","stdlib-2.6","kernel-4.1", "erts-6.0"]}]}. -- cgit v1.2.3 From 6738d356a279835222b951fd213ed4cf9897eb7e Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 21 Sep 2015 17:09:23 +0200 Subject: Prepare release --- lib/sasl/doc/src/notes.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 36ea42762a..5945ef6490 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,6 +31,32 @@

This document describes the changes made to the SASL application.

+
SASL 2.6 + +
Improvements and New Features + + +

A mechanism for limiting the amount of text that the + built-in error logger events will produce has been + introduced. It is useful for limiting both the size of + log files and the CPU time used to produce them.

+

This mechanism is experimental in the sense that it + may be changed if it turns out that it does not solve the + problem it is supposed to solve. In that case, there may + be backward incompatible improvements to this + mechanism.

+

See the documentation for the config parameter + error_logger_format_depth in the Kernel + application for information about how to turn on this + feature.

+

+ Own Id: OTP-12864

+
+
+
+ +
+
SASL 2.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From d8ff1e37c38c37304fb44ba6618da141e4d08c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 12 Oct 2015 12:21:15 +0200 Subject: Remove the deprecated webtool application --- lib/sasl/test/systools_SUITE.erl | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index cf0ed5fcfc..825a7f6e86 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1640,25 +1640,21 @@ app_start_type_relup(Dir2,Name2,Config) -> %% ?t:format("Dn: ~p",[DownInstructions]), [{load_object_code, {mnesia, _, _}}, {load_object_code, {runtime_tools, _, _}}, - {load_object_code, {webtool, _, _}}, {load_object_code, {snmp, _, _}}, {load_object_code, {xmerl, _, _}}, point_of_no_return | UpInstructionsT] = UpInstructions, true = lists:member({apply,{application,start,[mnesia,permanent]}}, UpInstructionsT), true = lists:member({apply,{application,start,[runtime_tools,transient]}}, UpInstructionsT), - true = lists:member({apply,{application,start,[webtool,temporary]}}, UpInstructionsT), true = lists:member({apply,{application,load,[snmp]}}, UpInstructionsT), false = lists:any(fun({apply,{application,_,[xmerl|_]}}) -> true; (_) -> false end, UpInstructionsT), [point_of_no_return | DownInstructionsT] = DownInstructions, true = lists:member({apply,{application,stop,[mnesia]}}, DownInstructionsT), true = lists:member({apply,{application,stop,[runtime_tools]}}, DownInstructionsT), - true = lists:member({apply,{application,stop,[webtool]}}, DownInstructionsT), true = lists:member({apply,{application,stop,[snmp]}}, DownInstructionsT), true = lists:member({apply,{application,stop,[xmerl]}}, DownInstructionsT), true = lists:member({apply,{application,unload,[mnesia]}}, DownInstructionsT), true = lists:member({apply,{application,unload,[runtime_tools]}}, DownInstructionsT), - true = lists:member({apply,{application,unload,[webtool]}}, DownInstructionsT), true = lists:member({apply,{application,unload,[snmp]}}, DownInstructionsT), true = lists:member({apply,{application,unload,[xmerl]}}, DownInstructionsT), ok. @@ -2207,7 +2203,6 @@ create_script(latest_app_start_type1,Config) -> create_script(latest_app_start_type2,Config) -> OtherApps = [{mnesia,current,permanent}, {runtime_tools,current,transient}, - {webtool,current,temporary}, {snmp,current,load}, {xmerl,current,none}], Apps = core_apps(current) ++ OtherApps, -- cgit v1.2.3 From f84858101803153a04caeb1b300b80e376fc105d Mon Sep 17 00:00:00 2001 From: xsipewe Date: Fri, 2 Oct 2015 13:01:27 +0200 Subject: sasl: Editorial changes --- lib/sasl/doc/src/alarm_handler.xml | 84 ++-- lib/sasl/doc/src/appup.xml | 449 +++++++++++---------- lib/sasl/doc/src/book.xml | 4 +- lib/sasl/doc/src/error_logging.xml | 215 +++++----- lib/sasl/doc/src/overload.xml | 124 +++--- lib/sasl/doc/src/part.xml | 5 +- lib/sasl/doc/src/rb.xml | 285 +++++++------- lib/sasl/doc/src/ref_man.xml | 4 +- lib/sasl/doc/src/rel.xml | 91 ++--- lib/sasl/doc/src/release_handler.xml | 743 +++++++++++++++++++---------------- lib/sasl/doc/src/relup.xml | 70 ++-- lib/sasl/doc/src/sasl_app.xml | 178 +++++---- lib/sasl/doc/src/sasl_intro.xml | 38 +- lib/sasl/doc/src/script.xml | 157 ++++---- lib/sasl/doc/src/systools.xml | 347 ++++++++-------- 15 files changed, 1434 insertions(+), 1360 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/alarm_handler.xml b/lib/sasl/doc/src/alarm_handler.xml index b98f22d2a1..68076ba28d 100644 --- a/lib/sasl/doc/src/alarm_handler.xml +++ b/lib/sasl/doc/src/alarm_handler.xml @@ -37,94 +37,92 @@ alarm_handler An Alarm Handling Process -

The alarm handler process is a gen_event event manager - process which receives alarms in the system. This process is not - intended to be a complete alarm handler. It defines a - place to which alarms can be sent. One simple event handler is - installed in the alarm handler at start-up, but users are - encouraged to write and install their own handlers. -

+

The alarm handler process is a + gen_event + event manager process that receives alarms in the system. + This process is not intended to be a complete alarm handler. + It defines a place to which alarms can be sent. One simple event + handler is installed in the alarm handler at startup, but users + are encouraged to write and install their own handlers.

The simple event handler sends all alarms as info reports to - the error logger, and saves all of them in a list which can be - passed to a user defined event handler, which may be installed at - a later stage. The list can grow large if many alarms are - generated. So it is a good reason to install a better user defined - handler. -

-

There are functions to set and clear alarms. The format of - alarms are defined by the user. For example, an event handler - for SNMP could be defined, together with an alarm MIB. -

-

The alarm handler is part of the SASL application. -

+ the error logger, and saves all in a list. This list can be + passed to a user-defined event handler, which can be installed + later. The list can grow large if many alarms are generated. + This is a good reason to install a better user-defined + handler.

+

Functions are provided to set and clear alarms. The alarm + format is defined by the user. For example, an event handler + for SNMP can be defined, together with an alarm Management + Information Base (MIB).

+

The alarm handler is part of the SASL application.

When writing new event handlers for the alarm handler, the - following events must be handled: -

+ following events must be handled:

{set_alarm, {AlarmId, AlarmDescr}}

This event is generated by - alarm_handler:set_alarm({AlarmId, AlarmDecsr}). -

+ alarm_handler:set_alarm({AlarmId, AlarmDecsr}).

{clear_alarm, AlarmId}

This event is - generated by alarm_handler:clear_alarm(AlarmId). -

+ generated by alarm_handler:clear_alarm(AlarmId).

The default simple handler is called alarm_handler and - it may be exchanged by calling gen_event:swap_handler/3 - as gen_event:swap_handler(alarm_handler, {alarm_handler, swap}, {NewHandler, Args}). NewHandler:init({Args, {alarm_handler, Alarms}}) is called. Refer to gen_event(3) - for further details. -

+ it can be exchanged by calling + gen_event:swap_handler/3 + as gen_event:swap_handler(alarm_handler, {alarm_handler, swap}, + {NewHandler, Args}). NewHandler:init({Args, {alarm_handler, + Alarms}}) is called. For more details, see + gen_event(3) + in STDLIB.

+ clear_alarm(AlarmId) -> void() - Clear the specified alarms + Clears the specified alarms. AlarmId = term() -

Sends the clear_alarm event to all event handlers.

+

Sends event clear_alarm to all event handlers.

When receiving this event, the default simple handler - clears the latest received alarm with id AlarmId. -

+ clears the latest received alarm with id AlarmId.

+ get_alarms() -> [alarm()] - Get all active alarms + Gets all active alarms.

Returns a list of all active alarms. This function can only - be used when the simple handler is installed. -

+ be used when the simple handler is installed.

+ set_alarm(alarm()) - Set an alarm with an id + Sets an alarm with an id. alarm() = {AlarmId, AlarmDescription} AlarmId = term() AlarmDescription = term() -

Sends the set_alarm event to all event handlers.

+

Sends event set_alarm to all event handlers.

When receiving this event, the default simple handler - stores the alarm. The AlarmId identifies the alarm - and is used when the alarm is cleared. -

+ stores the alarm. AlarmId identifies the alarm + and is used when the alarm is cleared.

See Also -

error_logger(3), gen_event(3) -

+

error_logger(3), + gen_event(3)

diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml index 72333960ec..b54d2adb19 100644 --- a/lib/sasl/doc/src/appup.xml +++ b/lib/sasl/doc/src/appup.xml @@ -29,78 +29,85 @@
appup - Application upgrade file. + Application upgrade file

The application upgrade file defines how an application is upgraded or downgraded in a running system.

-

This file is used by the functions in systools when - generating a release upgrade file relup.

+

This file is used by the functions in + systools + when generating a release upgrade file relup.

- FILE SYNTAX -

The application upgrade file should be called - Application.appup where Application is the name of - the application. The file should be located in the ebin + File Syntax +

The application upgrade file is to be called + Application.appup, where Application is the + application name. The file is to be located in the ebin directory for the application.

The .appup file contains one single Erlang term, which defines the instructions used to upgrade or downgrade - the application. The file has the following syntax:

+ the application. The file has the following syntax:

{Vsn, [{UpFromVsn, Instructions}, ...], - [{DownToVsn, Instructions}, ...]}. - - - -

Vsn = string() is the current version of - the application.

-
- -

UpFromVsn = string() | binary() is an earlier - version of the application to upgrade from. If it is a - string, it will be interpreted as a specific version - number. If it is a binary, it will be interpreted as a - regular expression which can match multiple version - numbers.

-
- -

DownToVsn = string() | binary() is an earlier - version of the application to downgrade to. If it is a - string, it will be interpreted as a specific version - number. If it is a binary, it will be interpreted as a - regular expression which can match multiple version - numbers.

-
- -

Instructions is a list of release upgrade instructions, see below. It is recommended to use + [{DownToVsn, Instructions}, ...]}. + + Vsn = string() +

Current application version.

+ UpFromVsn = string() | binary() +

An earlier + application version to upgrade from. If it is a + string, it is interpreted as a specific version + number. If it is a binary, it is interpreted as a + regular expression that can match multiple version + numbers.

+ DownToVsn = string() | binary() +

An earlier + application version to downgrade to. If it is a + string, it is interpreted as a specific version + number. If it is a binary, it is interpreted as a + regular expression that can match multiple version + numbers.

+ Instructions +

A list of release upgrade instructions, see + Release + Upgrade Instructions. It is recommended to use high-level instructions only. These are automatically translated to low-level instructions by systools when - creating the relup file.

-
-
-

In order to avoid duplication of upgrade instructions it is - allowed to use regular expressions to specify the UpFromVsn - and DownToVsn. To be considered a regular expression, the - version identifier must be specified as a binary, e.g.

- <<"2\\.1\\.[0-9]+">> -

will match all versions 2.1.x, where x is any number.

-

Note that the regular expression must match the complete - version string, so the above example will work for for - e.g. 2.1.1, but not for 2.1.1.1

+ creating the relup file.

+ +

To avoid duplication of upgrade instructions, it is + allowed to use regular expressions to specify UpFromVsn + and DownToVsn. To be considered a regular expression, the + version identifier must be specified as a binary. For example, + the following match all versions 2.1.x, where x is + any number:

+ +<<"2\\.1\\.[0-9]+">> +

Notice that the regular expression must match the complete + version string, so this example works for, for example, + 2.1.1, but not for 2.1.1.1.

- RELEASE UPGRADE INSTRUCTIONS + + Release Upgrade Instructions

Release upgrade instructions are interpreted by the release handler when an upgrade or downgrade is made. For more - information about release handling, refer to OTP Design Principles.

-

A process is said to use a module Mod, if + information about release handling, see + OTP + Design Principles in System Documentation.

+

A process is said to use a module Mod if Mod is listed in the Modules part of the child - specification used to start the process, see supervisor(3). - In the case of gen_event, an event manager process is said to use - Mod if Mod is an installed event handler.

-

High-level instructions

+ specification used to start the process, see + supervisor(3). + In the case of + gen_event, + an event manager process is said to use Mod if Mod + is an installed event handler.

+ +
+ High-Level Instructions
 {update, Mod}
 {update, Mod, supervisor}
@@ -116,52 +123,68 @@
   Change = soft | {advanced,Extra}
     Extra = term()
   PrePurge = PostPurge = soft_purge | brutal_purge
-  DepMods = [Mod]
-    
-

Synchronized code replacement of processes using the module - Mod. All those processes are suspended using - sys:suspend, the new version of the module is loaded and - then the processes are resumed using sys:resume.

-

Change defaults to soft and defines the type of - code change. If it is set to {advanced,Extra}, processes - implemented using gen_server, gen_fsm or gen_event will transform - their internal state by calling the callback function - code_change. Special processes will call the callback + DepMods = [Mod] +

Synchronized code replacement of processes using module + Mod.

+

All those processes are suspended using + sys:suspend, + the new module version is loaded, and + then the processes are resumed using + sys:resume.

+ + Change +

Defaults to soft and defines the type of + code change. If it is set to {advanced,Extra}, implemented + processes using + gen_server, + gen_fsm, or + gen_event + transform their internal state by calling the callback function + code_change. Special processes call the callback function system_code_change/4. In both cases, the term - Extra is passed as an argument to the callback function.

-

PrePurge defaults to brutal_purge and controls - what action to take with processes that are executing old code - before loading the new version of the module. If the value + Extra is passed as an argument to the callback + function.

+ PrePurge +

Defaults to brutal_purge. It controls + what action to take with processes executing old code + before loading the new module version. If the value is brutal_purge, the processes are killed. If the value is - soft_purge, release_handler:install_release/1 - returns {error,{old_processes,Mod}}.

-

PostPurge defaults to brutal_purge and controls + soft_purge, + release_handler:install_release/1 + returns {error,{old_processes,Mod}}.

+ PostPurge +

Defaults to brutal_purge. It controls what action to take with processes that are executing old code - when the new version of the module has been loaded. If the value + when the new module version has been loaded. If the value is brutal_purge, the code is purged when the release is made permanent and the processes are killed. If the value is - soft_purge, the release handler will purge the old code - when no remaining processes execute the code.

-

DepMods defaults to [] and defines which other modules - Mod is dependent on. In relup, instructions for - suspending processes using Mod will come before + soft_purge, the release handler purges the old code + when no remaining processes execute the code.

+ DepMods +

Defaults to [] and defines other modules that + Mod is dependent on. In the relup file, instructions + for suspending processes using Mod come before instructions for suspending processes using modules in - DepMods when upgrading, and vice versa when downgrading. + DepMods when upgrading, and conversely when downgrading. In case of circular dependencies, the order of the instructions in - the appup script is kept.

-

Timeout defines the timeout when suspending processes. - If no value or default is given, the default value for - sys:suspend is used.

-

ModType defaults to dynamic and specifies if - the code is "dynamic", that is if a process using the module does - spontaneously switch to new code, or if it is "static". - When doing an advanced update and upgrading, the new version of a + the appup file is kept.

+ Timeout +

Defines the time-out when suspending processes. + If no value or default is specified, the default value for + sys:suspend + is used.

+ ModType +

Defaults to dynamic. It specifies if + the code is "dynamic", that is, if a process using the module + spontaneously switches to new code, or if it is "static". + When doing an advanced update and upgrade, the new version of a dynamic module is loaded before the process is asked to change code. When downgrading, the process is asked to change code before loading the new version. For static modules, the new version is loaded before the process is asked to change code, both in the case of upgrading and downgrading. Callback modules are - dynamic.

+ dynamic.

+

update with argument supervisor is used when changing the start specification of a supervisor.

@@ -170,239 +193,229 @@
 {load_module, Mod, PrePurge, PostPurge, DepMods}
   Mod = atom()
   PrePurge = PostPurge = soft_purge | brutal_purge
-  DepMods = [Mod]
-    
+ DepMods = [Mod]

Simple code replacement of the module Mod.

-

See update above for a description of PrePurge and - PostPurge.

-

DepMods defaults to [] and defines which other modules - Mod is dependent on. In relup, instructions for - loading these modules will come before the instruction for loading - Mod when upgrading, and vice versa when downgrading.

+

For a description of PrePurge and PostPurge, + see update above.

+

DepMods defaults to [] and defines which other modules + Mod is dependent on. In the relup file, instructions for + loading these modules come before the instruction for loading + Mod when upgrading, and conversely when downgrading.

 {add_module, Mod}
 {add_module, Mod, DepMods}
   Mod = atom()
-  DepMods = [Mod]
-    
+ DepMods = [Mod]

Loads a new module Mod.

-

DepMods defaults to [] and defines which other modules - Mod is dependent on. In relup, instructions - related to these modules will come before the instruction for - loading Mod when upgrading, and vice versa when +

DepMods defaults to [] and defines which other modules + Mod is dependent on. In the relup file, instructions + related to these modules come before the instruction for + loading Mod when upgrading, and conversely when downgrading.

 {delete_module, Mod}
 {delete_module, Mod, DepMods}
-  Mod = atom()
-    
+ Mod = atom()

Deletes a module Mod using the low-level instructions remove and purge.

-

DepMods defaults to [] and defines which other modules - Mod is dependent on. In relup, instructions - related to these modules will come before the instruction for - removing Mod when upgrading, and vice versa when +

DepMods defaults to [] and defines which other modules + Mod is dependent on. In the relup file, instructions + related to these modules come before the instruction for + removing Mod when upgrading, and conversely when downgrading.

 {add_application, Application}
 {add_application, Application, Type}
   Application = atom()
-  Type = permanent | transient | temporary | load | none
-    
+ Type = permanent | transient | temporary | load | none

Adding an application means that the modules defined by the modules key in the .app file are loaded using add_module.

Type defaults to permanent and specifies the start type of the application. If Type = permanent | transient | temporary, - the application will be loaded and started in the corresponding way, - see application(3). If Type = load, the application will - only be loaded. If Type = none, the application will be neither - loaded nor started, although the code for its modules will be loaded.

+ the application is loaded and started in the corresponding way, see + application(3). + If Type = load, the application is only loaded. + If Type = none, the application is not loaded and not + started, although the code for its modules is loaded.

 {remove_application, Application}
-  Application = atom()
-    
+ Application = atom()

Removing an application means that the application is stopped, - the modules are unloaded using delete_module and then + the modules are unloaded using delete_module, and then the application specification is unloaded from the application controller.

 {restart_application, Application}
-  Application = atom()
-    
+ Application = atom()

Restarting an application means that the application is - stopped and then started again similar to using the instructions + stopped and then started again, similar to using the instructions remove_application and add_application in sequence.

-

Low-level instructions

+
+ +
+ Low-Level Instructions
 {load_object_code, {App, Vsn, [Mod]}}
   App = Mod = atom()
-  Vsn = string()
-    
-

Reads each Mod from the directory App-Vsn/ebin as - a binary. It does not load the modules. The instruction should be - placed first in the script in order to read all new code from file - to make the suspend-load-resume cycle less time consuming. After - this instruction has been executed, the code server with the new - version of App.

+ Vsn = string() +

Reads each Mod from directory App-Vsn/ebin as + a binary. It does not load the modules. The instruction is to be + placed first in the script to read all new code from the file + to make the suspend-load-resume cycle less time-consuming.

-point_of_no_return
-    
+point_of_no_return

If a crash occurs after this instruction, the system cannot - recover and is restarted from the old version of the release. - The instruction must only occur once in a script. It should be + recover and is restarted from the old release version. + The instruction must only occur once in a script. It is to be placed after all load_object_code instructions.

 {load, {Mod, PrePurge, PostPurge}}
   Mod = atom()
-  PrePurge = PostPurge = soft_purge | brutal_purge
-    
+ PrePurge = PostPurge = soft_purge | brutal_purge

Before this instruction occurs, Mod must have been loaded using load_object_code. This instruction loads the module. - PrePurge is ignored. See the high-level instruction - update for a description of PostPurge.

+ PrePurge is ignored. For a description of PostPurge, + see the high-level instruction update earlier.

 {remove, {Mod, PrePurge, PostPurge}}
   Mod = atom()
-  PrePurge = PostPurge = soft_purge | brutal_purge
-    
+ PrePurge = PostPurge = soft_purge | brutal_purge

Makes the current version of Mod old. - PrePurge is ignored. See the high-level instruction - update for a description of PostPurge.

+ PrePurge is ignored. For a description of PostPurge, + see the high-level instruction update earlier.

 {purge, [Mod]}
-  Mod = atom()
-    
-

Purges each module Mod, that is removes the old code. - Note that any process executing purged code is killed.

+ Mod = atom() +

Purges each module Mod, that is, removes the old code. + Notice that any process executing purged code is killed.

 {suspend, [Mod | {Mod, Timeout}]}
   Mod = atom()
-  Timeout = int()>0 | default | infinity
-    
+ Timeout = int()>0 | default | infinity

Tries to suspend all processes using a module Mod. If a - process does not respond, it is ignored. This may cause + process does not respond, it is ignored. This can cause the process to die, either because it crashes when it spontaneously switches to new code, or as a result of a purge operation. If no Timeout is specified or default is - given, the default value for sys:suspend is used.

+ specified, the default value for + sys:suspend + is used.

 {resume, [Mod]}
-  Mod = atom()
-    
+ Mod = atom()

Resumes all suspended processes using a module Mod.

 {code_change, [{Mod, Extra}]}
 {code_change, Mode, [{Mod, Extra}]}
   Mod = atom()
   Mode = up | down
-  Extra = term()
-    
+ Extra = term()

Mode defaults to up and specifies if it is an - upgrade or downgrade.

-

This instruction sends a code_change system message to - all processes using a module Mod by calling the function - sys:change_code, passing the term Extra as argument.

+ upgrade or downgrade. This instruction sends a code_change + system message to all processes using a module Mod by + calling function + sys:change_code, + passing term Extra as argument.

 {stop, [Mod]}
-  Mod = atom()
-    
+ Mod = atom()

Stops all processes using a module Mod by calling - supervisor:terminate_child/2. The instruction is useful + supervisor:terminate_child/2. + This instruction is useful when the simplest way to change code is to stop and restart the - processes which run the code.

+ processes that run the code.

 {start, [Mod]}
-  Mod = atom()
-    
+ Mod = atom()

Starts all stopped processes using a module Mod by calling - supervisor:restart_child/2.

+ supervisor:restart_child/2.

 {sync_nodes, Id, [Node]}
 {sync_nodes, Id, {M, F, A}}
   Id = term()
   Node = node()
   M = F = atom()
-  A = [term()]
-    
+ A = [term()]

apply(M, F, A) must return a list of nodes.

-

The instruction synchronizes the release installation with other - nodes. Each Node must evaluate this command, with the same +

This instruction synchronizes the release installation with other + nodes. Each Node must evaluate this command with the same Id. The local node waits for all other nodes to evaluate - the instruction before execution continues. In case a node goes + the instruction before execution continues. If a node goes down, it is considered to be an unrecoverable error, and the local node is restarted from the old release. There is no - timeout for this instruction, which means that it may hang + time-out for this instruction, which means that it can hang forever.

 {apply, {M, F, A}}
   M = F = atom()
-  A = [term()]
-    
-

Evaluates apply(M, F, A). If the instruction appears - before the point_of_no_return instruction, a failure is - caught. release_handler:install_release/1 then returns - {error,{'EXIT',Reason}}, unless {error,Error} is - thrown or returned. Then it returns {error,Error}.

-

If the instruction appears after the point_of_no_return - instruction, and the function call fails, the system is - restarted.

+ A = [term()] +

Evaluates apply(M, F, A).

+

If the instruction appears before instruction + point_of_no_return, a failure is caught. + release_handler:install_release/1 + then returns {error,{'EXIT',Reason}}, unless {error,Error} + is thrown or returned. Then it returns {error,Error}.

+

If the instruction appears after instruction + point_of_no_return and the function call fails, the + system is restarted.

-restart_new_emulator
-    
-

This instruction is used when erts, kernel, stdlib or sasl is +restart_new_emulator +

This instruction is used when the application ERTS, + Kernel, STDLIB, or SASL is upgraded. It shuts down the current emulator and starts a new one. All processes are terminated gracefully, and the new - version of erts, kernel, stdlib and sasl are used when the - emulator restarts. Only one restart_new_emulator - instruction is allowed in the relup, and it shall be placed - first. systools:make_relup/3,4 - will ensure this when the relup is generated. The rest of the - relup script is executed after the restart as a part of the boot - script.

-

An info report will be written when the upgrade is - completed. To programatically find out if the upgrade is - complete, + version of ERTS, Kernel, STDLIB, and + SASL are used when the emulator restarts. + Only one restart_new_emulator instruction is allowed + in the relup file, and it must be placed first. + systools:make_relup/3,4 + ensures this when the relup file is generated. The rest of the + instructions in the relup file is executed after the + restart as a part of the boot script.

+

An info report is written when the upgrade is completed. + To programmatically determine if the upgrade is complete, call - release_handler:which_releases/0,1 and check if the + release_handler:which_releases/0,1 and check if the expected release has status current.

The new release must still be made permanent after the upgrade - is completed. Otherwise, the old emulator is started in case of + is completed, otherwise the old emulator is started if there is an emulator restart.

-

As stated above, the restart_new_emulator - instruction causes the emulator to be restarted with new - versions of erts, kernel, stdlib and - sasl. All other applications, however, will at startup - be running their old versions in this new emulator. In most - cases this is no problem, but every now and then there will be - incompatible changes to the core applications which may cause - trouble in this setting. Such incompatible changes (when - functions are removed) are normally preceded by a deprecation - over two major releases. To make sure your application is not - crashed by an incompatible change, always remove any call to - deprecated functions as soon as possible.

+

As stated earlier, instruction restart_new_emulator + causes the emulator to be restarted with new versions of + ERTS, Kernel, STDLIB, and SASL. + However, all other applications do at startup run their old + versions in this new emulator. This is usually no problem, + but every now and then incompatible changes occur to the + core applications, which can cause + trouble in this setting. Such incompatible changes (when + functions are removed) are normally preceded by a deprecation + over two major releases. To ensure that your application is not + crashed by an incompatible change, always remove any call to + deprecated functions as soon as possible.

-restart_emulator
-    
+restart_emulator

This instruction is similar to restart_new_emulator, - except it shall be placed at the end of the relup script. It is - not related to an upgrade of the emulator or the core + except it must be placed at the end of the relup file. + It is not related to an upgrade of the emulator or the core applications, but can be used by any application when a complete - reboot of the system is reqiured. When generating the - relup, systools:make_relup/3,4 + reboot of the system is required.

+

When generating the relup file, + systools:make_relup/3,4 ensures that there is only one restart_emulator - instruction and that it is the last instruction of the - relup.

+ instruction and that it is the last instruction in the + relup file.

+
- SEE ALSO -

relup(4), - release_handler(3), - supervisor(3), - systools(3)

+ See Also +

release_handler(3), + relup(4), + supervisor(3), + systools(3)

diff --git a/lib/sasl/doc/src/book.xml b/lib/sasl/doc/src/book.xml index 2bb5339d94..624c32a66f 100644 --- a/lib/sasl/doc/src/book.xml +++ b/lib/sasl/doc/src/book.xml @@ -22,7 +22,7 @@
- System Application Support Libraries (SASL) + System Architecture Support Libraries (SASL) OTP Team 1999-04-22 @@ -31,7 +31,7 @@
- System Application Support Libraries (SASL) + System Architecture Support Libraries (SASL) diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml index 7c45b1970e..46b12f3872 100644 --- a/lib/sasl/doc/src/error_logging.xml +++ b/lib/sasl/doc/src/error_logging.xml @@ -31,89 +31,93 @@ 1999-04-13 B error_logging.xml -
-

The SASL application introduces three types of reports:

+
+

The SASL application introduces three types of reports:

- supervisor report - progress report - crash report. + Supervisor report + Progress report + Crash report -

When the SASL application is started, it adds a handler that - formats and writes these reports, as specified in the - configuration parameters for sasl, i.e the environment variables - in the SASL application specification, which is found in the - .app file of SASL. See - sasl(Application), and app(File) - in the Kernel Reference Manual - for the details.

+

When the SASL application is started, it adds a handler that + formats and writes these reports, as specified in the configuration + parameters for SASL, that is, the environment variables + in the SASL application specification, which is found in the + .app file of SASL. For details, see the + sasl(6) application in the + Reference Manual and the app(4) + file in the Kernel Reference Manual.

Supervisor Report -

A supervisor report is issued when a supervised child terminates in - an unexpected way. A supervisor report contains the following +

A supervisor report is issued when a supervised child terminates + unexpectedly. A supervisor report contains the following items:

- Supervisor. - The name of the reporting supervisor. - Context. - Indicates in which phase the child terminated + Supervisor +

Name of the reporting supervisor.

+ Context +

Indicates in which phase the child terminated from the supervisor's point of view. This can be - start_error, child_terminated, or - shutdown_error. - Reason. - The termination reason. - Offender. - The start specification for the child. + start_error, child_terminated, or + shutdown_error.

+ Reason +

Termination reason.

+ Offender +

Start specification for the child.

Progress Report -

A progress report is issued whenever a supervisor starts or - restarts. A progress report contains the following items:

+

A progress report is issued when a supervisor starts or + restarts a child. A progress report contains the following items:

- Supervisor. - The name of the reporting supervisor. - Started. - The start specification for the successfully - started child. + Supervisor +

Name of the reporting supervisor.

+ Started +

Start specification for the successfully + started child.

Crash Report -

Processes started with the proc_lib:spawn or - proc_lib:spawn_link functions are wrapped within a - catch. A crash report is issued whenever such a process - terminates with an unexpected reason, which is any reason other - than normal or shutdown. Processes using the - gen_server and gen_fsm behaviours are examples of - such processes. A crash report contains the following items:

+

Processes started with functions + proc_lib:spawn or + proc_lib:spawn_link + are wrapped within a catch. A crash report is issued when such + a process terminates with an unexpected reason, which is any reason + other than normal, shutdown, or {shutdown,Term}. + Processes using behaviors + gen_server or + gen_fsm + are examples of such processes. A crash report contains the following items:

- Crasher. - Information about the crashing process is reported, such - as initial function call, exit reason, and message queue. - Neighbours. - Information about processes which are linked to the crashing + Crasher +

Information about the crashing process, such + as initial function call, exit reason, and message queue.

+ Neighbours +

Information about processes that are linked to the crashing process and do not trap exits. These processes are the - neighbours which will terminate because of this process + neighbours that terminate because of this process crash. The information gathered is the same as the information - for Crasher, shown in the previous item. + for Crasher, described in the previous item.

- An Example -

The following example shows the reports which are generated - when a process crashes. The example process is an + Example +

The following example shows the reports generated + when a process crashes. The example process is a permanent process supervised by the test_sup supervisor. A division by zero is executed and the error is first reported by the faulty process. A crash report is - generated as the process was started using the - proc_lib:spawn/3 function. The supervisor generates a - supervisor report showing the process that has crashed, and then a + generated, as the process was started using function + proc_lib:spawn/3. + The supervisor generates a + supervisor report showing the crashed process. A progress report is generated when the process is finally - re-started.

+ restarted.

         =ERROR REPORT==== 27-May-1996::13:38:56 ===
         <0.63.0>: Divide by zero !
@@ -146,7 +150,6 @@
         {shutdown,200},
         {child_type,worker}]
         
-        
         =PROGRESS REPORT==== 27-May-1996::13:38:56 ===
         Supervisor: {local,test_sup}
         Started:  [{pid,<0.64.0>},
@@ -154,64 +157,66 @@
         {mfa,{test,t,[]}},
         {restart_type,permanent},
         {shutdown,200},
-        {child_type,worker}]
-      
+ {child_type,worker}]
Multi-File Error Report Logging -

Multi-file error report logging is used to store error messages, - which are received by the error_logger. The error messages +

Multi-file error report logging is used to store error messages + received by error_logger. The error messages are stored in several files and each file is smaller than a - specified amount of kilobytes, and no more than a specified number - of files exist at the same time. The logging is very fast because + specified number of kilobytes. No more than a specified number + of files exist at the same time. The logging is very fast, as each error message is written as a binary term.

-

Refer to - sasl application in the Reference Manual for more details.

+

For more details, see the + sasl(6) + application in the Reference Manual.

Report Browser

The report browser is used to browse and format error reports - written by the error logger handler log_mf_h defined in - stdlib.

+ written by the error logger handler + log_mf_h + defined in STDLIB.

The log_mf_h handler writes all reports to a - report logging directory. This directory is specified when - configuring the SASL application.

+ report logging directory, which is specified when + configuring the SASL application.

If the report browser is - used off-line, the reports can be copied to another directory - which is specified when starting the browser. If no such directory - is specified, the browser reads reports from the SASL + used offline, the reports can be copied to another directory + specified when starting the browser. If no such directory + is specified, the browser reads reports from the SASL error_logger_mf_dir.

- Starting the Report Browser -

Start the rb_server with the function - rb:start([Options]) as shown in the following - example:

+ Starting Report Browser +

Start the rb_server with function + rb:start([Options]) + as shown in the following example:

-
-        5>rb:start([{max, 20}]).
+        5> rb:start([{max, 20}]).
         rb: reading report...done.
         rb: reading report...done.
         rb: reading report...done.
         rb: reading report...done.
-      
+ {ok,<0.199.0>}
- On-line Help -

Enter the command rb:help(). to access the report - browser on-line help system.

+ Online Help +

Enter command + rb:help() + to access the report browser online help system.

- List Reports in the Server -

The function rb:list() lists all loaded reports:

+ List Reports in Server +

Use function + rb:list() + to list all loaded reports:

-
-        4>rb:list().
+        4> rb:list().
         No                Type          Process       Date     Time
         ==                ====          =======       ====     ====
         20            progress         <0.17.0> 1996-10-16 16:14:54
@@ -234,17 +239,15 @@
         3            progress         <0.14.0> 1996-10-16 16:16:36
         2               error         <0.15.0> 1996-10-16 16:17:04
         1            progress         <0.14.0> 1996-10-16 16:17:09
-        ok
-      
+ ok
Show Reports -

To show details of a specific report, use the function - rb:show(Number):

+

Use function + rb:show(Number) + to show details of a specific report:

-
-10> rb:show(1).
 7> rb:show(4).
         
 PROGRESS REPORT  <0.20.0>                                   1996-10-16 16:16:36
@@ -259,7 +262,7 @@ started
 {child_type,worker}]
         
 ok
-8> rb:show(9).
+8> rb:show(9).
         
 CRASH REPORT  <0.24.0>                                      1996-10-16 16:16:21
 ===============================================================================
@@ -287,19 +290,17 @@ heap_size                                                                610
 stack_size                                                               142
 reductions                                                                54
 
-ok
-      
+ok
- Search the Reports -

It is possible to show all reports which contain a common - pattern. Suppose a process crashes because it tries to call a - non-existing function release_handler:mbj_func. We could - then show reports as follows:

+ Search Reports +

All reports containing a common pattern can be shown. + Suppose a process crashes because it tries to call a + non-existing function release_handler:mbj_func/1. + The reports can then be shown as follows:

-
-12>rb:grep("mbj_func").          
+12> rb:grep("mbj_func").
 Found match in report number 11
         
 ERROR REPORT  <0.24.0>                                      1996-10-16 16:16:21
@@ -368,19 +369,17 @@ restart_type                                                       permanent
 shutdown                                                                2000
 child_type                                                            worker
         
-ok
-      
+ok
- Stop the Server -

Stop the rb_server with the function - rb:stop():

+ Stop Server +

Use function + rb:stop() + to stop the rb_server:

-
-13>rb:stop().
-ok
-      
+13> rb:stop(). +ok
diff --git a/lib/sasl/doc/src/overload.xml b/lib/sasl/doc/src/overload.xml index 35877220ab..5c3d00afeb 100644 --- a/lib/sasl/doc/src/overload.xml +++ b/lib/sasl/doc/src/overload.xml @@ -35,98 +35,88 @@ overload An Overload Regulation Process -

overload is a process which indirectly regulates CPU +

overload is a process that indirectly regulates the CPU usage in the system. The idea is that a main application calls - the request/0 function before starting a major job, and + function + request/0 + before starting a major job and proceeds with the job if the return value is positive; otherwise - the job must not be started. -

-

overload is part of the sasl application, and all - configuration parameters are defined there. -

-

A set of two intensities are maintained, the total intensity and the accept intensity. For that purpose - there are two configuration parameters, the MaxIntensity - and the Weight value (both are measured in 1/second). -

+ the job must not be started.

+

overload is part of the SASL application and all + configuration parameters are defined there.

+

A set of two intensities are maintained, the total intensity + and the accept intensity. For that purpose, + there are two configuration parameters, MaxIntensity + and Weight; both are measured in 1/second.

Then total and accept intensities are calculated as follows. Assume that the time of the current call to - request/0 is T(n), and that the time of the - previous call was T(n-1). -

+ request/0 is T(n) and that the time of the + previous call was T(n-1).

The current total intensity, denoted - TI(n), is calculated according to the formula, -

-

TI(n) = exp(-Weight*(T(n) - T(n-1)) * TI(n-1) + Weight, -

-

where TI(n-1) is the previous total intensity. -

+ TI(n), is calculated according to the formula

+

TI(n) = exp(-Weight*(T(n) - T(n-1)) * TI(n-1) + Weight,

+

where TI(n-1) is the previous total intensity.

The current accept intensity, denoted - AI(n), is determined by the formula, -

-

AI(n) = exp(-Weight*(T(n) - T(n-1)) * AI(n-1) + Weight, -

-

where AI(n-1) is the previous accept intensity, - provided that the value of exp(-Weight*(T(n) - T(n-1)) * AI(n-1) is less than MaxIntensity; otherwise the - value is -

-

AI(n) = exp(-Weight*(T(n) - T(n-1)) * AI(n-1). -

+ AI(n), is determined by the formula

+

AI(n) = exp(-Weight*(T(n) - T(n-1)) * AI(n-1) + Weight,

+

where AI(n-1) is the previous accept intensity, + if the value of exp(-Weight*(T(n) - T(n-1)) * AI(n-1) + is less than MaxIntensity. Otherwise the value is

+

AI(n) = exp(-Weight*(T(n) - T(n-1)) * AI(n-1)

The value of configuration parameter Weight controls the - speed with which the calculations of intensities will react to + speed with which the calculations of intensities react to changes in the underlying input intensity. The inverted value of - Weight, -

-

T = 1/Weight

-

can be thought of as the "time constant" - of the intensity calculation formulas. For example, if Weight = 0.1, then a change in the underlying input intensity will be - reflected in the total and accept intensities within - approximately 10 seconds. -

+ Weight, T = 1/Weight, can be thought of as the + "time constant" of the intensity calculation formulas. For example, + if Weight = 0.1, a change in the underlying input intensity is + reflected in total intensity and accept intensity within + about 10 seconds.

The overload process defines one alarm, which it sets using - alarm_handler:set_alarm(Alarm). Alarm is defined - as: -

+ alarm_handler:set_alarm(Alarm). Alarm is defined + as follows:

{overload, []} -

This alarm is set when the current accept intensity exceeds - MaxIntensity. -

+

This alarm is set when the current accept intensity exceeds + MaxIntensity.

-

A new overload alarm is not set until the current accept - intensity has fallen below MaxIntensity. To prevent the - overload process from generating a lot of set/reset alarms, the - alarm is not reset until the current accept intensity has fallen - below 75% of MaxIntensity, and it is not until then that - the alarm can be set again. -

+

A new request is not accepted until the current accept + intensity has fallen below MaxIntensity. To prevent the + overload process from generating many set/reset alarms, the + alarm is not reset until the current accept intensity has fallen + below 75% of MaxIntensity; it is not until then that + the alarm can be set again.

+ request() -> accept | reject - Request to proceed with current job + Requests to proceed with current job.

Returns accept or reject depending on the - current value of the accept intensity.

+ current value of the accept intensity.

The application - calling this function should be processed with the job in + calling this function is to proceed with the job in question if the return value is accept; otherwise it - should not continue with that job. -

+ is not to continue with that job.

+ get_overload_info() -> OverloadInfo - Return current overload information data + Returns current overload information data. - OverloadInfo = [{total_intensity, TotalIntensity}, {accept_intensity, AcceptIntensity}, {max_intensity, MaxIntensity}, {weight, Weight}, {total_requests, TotalRequests}, {accepted_requests, AcceptedRequests}]. + OverloadInfo = [{total_intensity, TotalIntensity}, + {accept_intensity, AcceptIntensity}, {max_intensity, + MaxIntensity}, {weight, Weight}, {total_requests, + TotalRequests}, {accepted_requests, AcceptedRequests}]. TotalIntensity = float() > 0 AcceptIntensity = float() > 0 MaxIntensity = float() > 0 @@ -135,18 +125,22 @@ AcceptedRequests = integer() -

Returns the current total and accept intensities, the - configuration parameters, and absolute counts of the total - number of requests, and accepted number of requests (since - the overload process was started).

+

Returns:

+ + Current total and accept intensities + Configuration parameters + Absolute counts of the total number of requests + Accepted number of requests (since the overload + process was started) +
See Also -

alarm_handler(3), sasl(3) -

+

alarm_handler(3), + sasl(6)

diff --git a/lib/sasl/doc/src/part.xml b/lib/sasl/doc/src/part.xml index bcd345a7c4..2f47a8ad80 100644 --- a/lib/sasl/doc/src/part.xml +++ b/lib/sasl/doc/src/part.xml @@ -30,8 +30,9 @@ part.xml
-

The System Architecture Support Libraries, SASL, - provides support for alarm and release handling etc.

+

The System Architecture Support Libraries SASL application + provides support for alarm handling, release handling, and + related functions.

diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml index 85252fc088..e16e9f5a62 100644 --- a/lib/sasl/doc/src/rb.xml +++ b/lib/sasl/doc/src/rb.xml @@ -35,241 +35,252 @@ rb The Report Browser Tool -

The Report Browser (RB) tool makes it possible to browse and +

The Report Browser (RB) tool is used to browse and format error reports written by the error logger handler - log_mf_h. -

+ log_mf_h + in STDLIB.

+ filter(Filters) filter(Filters, Dates) - Filter reports and displays them on the screen + Filters reports and displays them on the screen. Filters = [filter()] - filter() = {Key, Value} | {Key, Value, no} | {Key, RegExp, re} | {Key, RegExp, re, no} + filter() = {Key, Value} | {Key, Value, no} | {Key, RegExp, re} | + {Key, RegExp, re, no} Key = term() Value = term() - RegExp = string() | {string, Options} | mp(), {mp(), Options} + RegExp = string() | {string(), Options} | re:mp() | {re:mp(), Options} Dates = {DateFrom, DateTo} | {DateFrom, from} | {DateTo, to} - DateFrom = DateTo = {date(), time()} - date() and time() are the same type as in the calendar module + DateFrom = DateTo = calendar:datetime() -

This function displays the reports that match the provided filters.

-

- When a filter includes the no atom it will exclude the reports that match - that filter. -

-

- The reports are matched using the proplists module. The report must be a proplist - to be matched against any of the filters(). -

-

- If the filter is of the form {Key, RegExp, re} the report must contain an element with - key = Key and Value must match the RegExp regular expression. -

-

- If the Dates parameter is provided, then the reports are filtered according to the date - when they occurred. If Dates is of the form {DateFrom, from} then reports that occurred - after DateFrom are displayed. -

-

- If Dates is of the form {DateTo, to} then reports that occurred before DateTo - are displayed. -

-

- If two Dates are provided, then reports that occurred between those dates are returned. -

-

- If you only want to filter only by dates, then you can provide the empty list as the Filters - parameter. -

-

- See rb:grep/1 for more information on the RegExp parameter. -

+

Displays the reports that match the provided filters.

+

When a filter includes the no atom, it excludes the + reports that match that filter.

+

The reports are matched using the + proplists + module in STDLIB. The report must be a proplist + to be matched against any of the filters.

+

If the filter has the form {Key, RegExp, re}, the + report must contain an element with key equal to Key and + the value must match the regular expression RegExp.

+

If parameter Dates is specified, the reports are filtered + according to the date when they occurred. If Dates has + the form {DateFrom, from}, reports that occurred after + DateFrom are displayed.

+

If Dates has the form {DateTo, to}, reports that + occurred before DateTo are displayed.

+

If two Dates are specified, reports that occurred between + those dates are returned.

+

To filter only by dates, specify the empty list as the Filters + parameter.

+

For details about parameter RegExp, see rb:grep/1.

+

For details about data type mp(), see + re:mp().

+

For details about data type datetime(), see + calendar:datetime().

+ grep(RegExp) - Search the reports for a regular expression + Searches the reports for a regular expression. - RegExp = string() | {string, Options} | mp(), {mp(), Options} + RegExp = string() | {string(), Options} | re:mp() | {re:mp(), Options} -

All reports containing the regular expression RegExp - are printed. -

-

RegExp can be a string containing the regular - expression; a tuple with the string and the options for - compilation; a compiled regular expression; a compiled - regular expression and the options for running it. - Refer to the module re and specially the function re:run/3 - for a definition of valid regular expressions and options. -

+

All reports matching the regular expression RegExp + are displayed. RegExp can be any of the following:

+ + A string containing the regular expression + A tuple with the string and the options for compilation + A compiled regular expression + A compiled regular expression and the options for running it + +

For a definition of valid regular expressions and options, see + the re module in + STDLIB and in particular function re:run/3.

+

For details about data type mp(), see + re:mp().

+ h() help() - Print help information + Displays help information. -

Prints the on-line help information. -

+

Displays online help information.

+ list() list(Type) - List all reports + Lists all reports. Type = type() type() = error | error_report | info_msg | info_report | - warning_msg | warning_report | crash_report | - supervisor_report | progress + warning_msg | warning_report | crash_report | + supervisor_report | progress -

This function lists all reports loaded in the +

Lists all reports loaded in rb_server. Each report is given a unique number that - can be used as a reference to the report in the - show/1 function. -

-

If no Type is given, all reports are listed. -

+ can be used as a reference to the report in function + show/1.

+

If no Type is specified, all reports are listed.

+ log_list() log_list(Type) - Log reports list + Logs report lists. Type = type() type() = error | error_report | info_msg | info_report | - warning_msg | warning_report | crash_report | - supervisor_report | progress + warning_msg | warning_report | crash_report | + supervisor_report | progress -

Same as list/0 or list/1 functions - but result is printed to logfile, if set, otherwise to standard_io. -

-

If no Type is given, all reports are listed. -

+

Same as functions + list/0 or + list/1, + but the result is printed to a log file, if set; otherwise + to standard_io.

+

If no Type is specified, all reports are listed.

+ rescan() rescan(Options) - Rescan the report directory + Rescans the report directory. Options = [opt()]

Rescans the report directory. Options is the same as - for start(). -

+ for function + start/1.

+ show() show(Report) - Show reports + Displays reports. - Report = int() | type() + Report = integer() | type() -

If a type argument is given, all loaded reports of this - type are printed. If an integer argument is given, the - report with this reference number is printed. If no argument - is given, all reports are shown. -

+

If argument type is specified, all loaded reports of this + type are displayed. If an integer argument is specified, the + report with this reference number is displayed. If no argument + is specified, all reports are displayed.

+ start() start(Options) - Start the RB server + Starts the rb_server. Options = [opt()] - opt() = {start_log, FileName} | {max, MaxNoOfReports} | {report_dir, DirString} | {type, ReportType} | {abort_on_error, Bool} + opt() = {start_log, FileName} | {max, MaxNoOfReports} | + {report_dir, DirString} | {type, ReportType} | + {abort_on_error, Bool} FileName = string() | atom() | pid() - MaxNoOfReports = int() | all + MaxNoOfReports = integer() | all DirString = string() ReportType = type() | [type()] | all - Bool = true | false + Bool = boolean() -

The function start/1 starts the rb_server - with the specified options, while start/0 starts with - default options. The rb_server must be started before - reports can be browsed. When the rb_server is +

Function start/1 starts rb_server with the + specified options, whereas function start/0 starts with + default options. rb_server must be started before + reports can be browsed. When rb_server is started, the files in the specified directory are scanned. The other functions assume that the server has - started. -

-

{start_log, FileName} starts logging to file, - registered name or io_device. All reports will be printed - to the named file. The default is standard_io. - The option {start_log, standard_error} is not allowed and - will be replaced by default standard_io. -

-

{max, MaxNoOfReports}. Controls how many reports the - rb_server should read on start-up. This option is - useful as the directory may contain 20.000 reports. If this - option is given, the MaxNoOfReports latest reports - will be read. The default is 'all'. -

-

{report_dir, DirString}. Defines the directory where - the error log files are located. The default is {sasl, error_logger_mf_dir}.

-

{type, ReportType}. Controls what kind of reports the - rb_server should read on start-up. ReportType - is a supported type, 'all', or a list of supported - types. The default is 'all'. -

-

{abort_on_error, Bool}. This option specifies whether - or not logging should be aborted if rb encounters an unprintable - report. (You may get a report on incorrect form if the - error_logger function error_msg or - info_msg has been called with an invalid format string). - If Bool is true, rb will stop logging (and print an - error message to stdout) if it encounters a badly formatted report. - If logging to file is enabled, an error message will be appended to - the log file as well. - If Bool is false (which is the default value), rb will - print an error message to stdout for every bad report it - encounters, but the logging process is never aborted. All printable - reports will be written. If logging to file is enabled, rb prints - * UNPRINTABLE REPORT * in the log file at the location of an - unprintable report. -

+ started.

+

Options:

+ + {start_log, FileName} +

Starts logging to file, + registered name, or io_device. All reports are printed + to the specified destination. Default is standard_io. + Option {start_log, standard_error} is not allowed and + will be replaced by default standard_io.

+ {max, MaxNoOfReports} +

Controls how many reports + rb_server is to read at startup. This option is + useful, as the directory can contain a large amount of reports. If this + option is specified, the MaxNoOfReports latest reports + are read. Default is all.

+ {report_dir, DirString} +

Defines the directory where + the error log files are located. Default is + the directory specified by application environment + variable error_logger_mf_dir, + see sasl(6).

+ {type, ReportType} +

Controls what kind of reports + rb_server is to read at startup. ReportType + is a supported type, all, or a list of supported + types. Default is all.

+ {abort_on_error, Bool} +

Specifies if + logging is to be ended if rb encounters an unprintable + report. (You can get a report with an incorrect form if function + error_logger, error_msg, or + info_msg has been called with an invalid format string)

+ + If Bool is true, rb stops logging + (and prints an error message to stdout) if it encounters + a badly formatted report. If logging to file is enabled, an + error message is appended to the log file as well. + If Bool is false (the default value), rb + prints an error message to stdout for every bad report it + encounters, but the logging process is never ended. All printable + reports are written. If logging to file is enabled, rb prints + * UNPRINTABLE REPORT * in the log file at the location of an + unprintable report. +
+
+ start_log(FileName) - Redirect all output to FileName + Redirects all output to FileName. FileName = string() | atom() | pid()

Redirects all report output from the RB tool to the - specified file, registered name or io_device. -

+ specified file, registered name, or io_device.

+ stop() - Stop the RB server + Stops the rb_server. -

Stops the rb_server. -

+

Stops rb_server.

+ stop_log() - Stop logging to file + Stops logging to file. -

Closes the log file. The output from the RB tool will be - directed to standard_io. -

+

Closes the log file. The output from the RB tool is + directed to standard_io.

diff --git a/lib/sasl/doc/src/ref_man.xml b/lib/sasl/doc/src/ref_man.xml index 2b608c7c51..a80e5a2a00 100644 --- a/lib/sasl/doc/src/ref_man.xml +++ b/lib/sasl/doc/src/ref_man.xml @@ -30,8 +30,8 @@ application.xml
-

The System Architecture Support Libraries application, SASL, - provides support for alarm and release handling etc.

+

The SASL application provides support for alarm handling, + release handling, and related functions.

diff --git a/lib/sasl/doc/src/rel.xml b/lib/sasl/doc/src/rel.xml index a16db24295..d5f3c7310a 100644 --- a/lib/sasl/doc/src/rel.xml +++ b/lib/sasl/doc/src/rel.xml @@ -33,74 +33,65 @@ rel Release resource file -

The release resource file specifies which applications are +

The release resource file specifies which applications are included in a release (system) based on Erlang/OTP.

-

This file is used by the functions in systools when generating - start scripts (.script, .boot) and release upgrade - files (relup).

+

This file is used by the functions in + systools + when generating start scripts (.script, .boot) and + release upgrade files (relup).

- FILE SYNTAX -

The release resource file should be called Name.rel.

+ File Syntax +

The release resource file is to be called Name.rel.

The .rel file contains one single Erlang term, which is - called a release specification. The file has the + called a release specification. The file has the following syntax:

{release, {RelName,Vsn}, {erts, EVsn}, [{Application, AppVsn} | {Application, AppVsn, Type} | {Application, AppVsn, IncApps} | - {Application, AppVsn, Type, IncApps}]}. - - - -

RelName = string() is the name of the release.

-
- -

Vsn = string() is the version of the release.

-
- -

EVsn = string() is the version of ERTS the release is - intended for.

-
- -

Application = atom() is the name of an application - included in the release.

-
- -

AppVsn = string() is the version of an application - included in the release.

-
- -

Type = permanent | transient | temporary | load | none - is the start type of an application included in the release.

-

If Type = permanent | transient | temporary, - the application will be loaded and started in the corresponding - way, see application(3). If Type = load, - the application will only be loaded. If Type = none, - the application will be neither loaded nor started, although - the code for its modules will be loaded. - Defaults to permanent

-
- -

IncApps = [atom()] is a list of applications that are - included by an application included in the release.

-

The list must be a subset of the included applications + {Application, AppVsn, Type, IncApps}]}. + + RelName = string() +

Release name.

+ Vsn = string() +

Release version.

+ EVsn = string() +

ERTS version the release is intended for.

+ Application = atom() +

Name of an application included in the release.

+ AppVsn = string() +

Version of an application included in the release.

+ Type = permanent | transient | temporary | load | none +

Start type of an application included in the release.

+

If Type = permanent | transient | temporary, the + application is loaded and started in the corresponding way, see + application(3).

+

If Type = load, the application is only loaded.

+

If Type = none, the application is not loaded and not + started, although the code for its modules is loaded.

+

Defaults to permanent

+ IncApps = [atom()] +

A list of applications that are included by an application + included in the release. The list must be a subset of the + included applications specified in the application resource file (Application.app) and overrides this value. Defaults - to the same value as in the application resource file.

-
-
+ to the same value as in the application resource file.

+ -

The list of applications must contain the kernel and - stdlib applications.

+

The list of applications must contain the Kernel and + STDLIB applications.

- SEE ALSO -

application(3), relup(4), systools(3)

+ See Also +

application(3), + relup(4), + systools(3)

diff --git a/lib/sasl/doc/src/release_handler.xml b/lib/sasl/doc/src/release_handler.xml index 692159d7bf..162707676c 100644 --- a/lib/sasl/doc/src/release_handler.xml +++ b/lib/sasl/doc/src/release_handler.xml @@ -31,109 +31,115 @@ release_handler Unpacking and Installation of Release Packages -

The release handler is a process belonging to the SASL - application which is responsible for release handling, +

The release handler process belongs to the SASL + application, which is responsible for release handling, that is, unpacking, installation, and removal of release packages.

-

An introduction to release handling and a usage example can be - found in - Design Principles. -

+

An introduction to release handling and an example is provided in + OTP Design + Principles in System Documentation.

A release package is a compressed tar file containing code for a certain version of a release, created by calling - systools:make_tar/1,2. - The release package should be placed in the $ROOT/releases - directory of the previous version of the release where + systools:make_tar/1,2. + The release package is to be located in the $ROOT/releases + directory of the previous version of the release, where $ROOT is the installation root directory, - code:root_dir(). - Another releases directory can be specified using the SASL - configuration parameter releases_dir, or the OS environment + code:root_dir(). + Another releases directory can be specified using the SASL + configuration parameter releases_dir or the OS environment variable RELDIR. The release handler must have write access - to this directory in order to install the new release. + to this directory to install the new release. The persistent state of the release handler is stored there in a file called RELEASES.

-

A release package should always contain the release resource file - Name.rel and a boot script Name.boot. It may contain - a release upgrade file relup and a system configuration - file sys.config. The .rel file contains information - about the release: its name, version, and which ERTS and - application versions it uses. The relup file contains - scripts for how to upgrade to, or downgrade from, this version of - the release.

+

A release package is always to contain:

+ + A release resource file, Name.rel + A boot script, Name.boot + +

The .rel file contains information about the release: its name, + version, and which ERTS and application versions it uses.

+

A release package can also contain:

+ + A release upgrade file, relup + A system configuration file, sys.config + +

The relup file contains instructions for how to upgrade + to, or downgrade from, this version of the release.

The release package can be unpacked, which extracts the files. An unpacked release can be installed. The currently used version of the release is then upgraded or downgraded to the specified version by evaluating the instructions - in relup. An installed release can be made - permanent. There can only be one permanent release in - the system, and this is the release that is used if the system + in the relup file. An installed release can be made + permanent. Only one permanent release can exist in + the system, and this release is used if the system is restarted. An installed release, except the permanent one, can be removed. When a release is removed, all files - that belong to that release only are deleted.

-

Each version of the release has a status. The status can be + belonging to that release only are deleted.

+

Each release version has a status, which can be unpacked, current, permanent, or old. - There is always one latest release which either has status - permanent (normal case), or current (installed, but - not yet made permanent). The following table illustrates - the meaning of the status values:

+ There is always one latest release, which either has status + permanent (normal case) or current (installed, but + not yet made permanent). The meaning of the status values are + illustrated in the following table:

-Status     Action                NextStatus
--------------------------------------------
-  -        unpack                unpacked
-unpacked   install               current
-           remove                  -
-current    make_permanent        permanent
-           install other         old
-           remove                  -
-permanent  make other permanent  old
-           install               permanent
-old        reboot_old            permanent
-           install               current
-           remove                  -
-    
+ Status Action NextStatus + ------------------------------------------- + - unpack unpacked + unpacked install current + remove - + current make_permanent permanent + install other old + remove - + permanent make other permanent old + install permanent + old reboot_old permanent + install current + remove -

The release handler process is a locally registered process on each node. When a release is installed in a distributed system, the release handler on each node must be called. The release - installation may be synchronized between nodes. From an operator - view, it may be unsatisfactory to specify each node. The aim is + installation can be synchronized between nodes. From an operator + view, it can be unsatisfactory to specify each node. The aim is to install one release package in the system, no matter how many - nodes there are. If this is the case, it is recommended that - software management functions are written which take care of - this problem. Such a function may have knowledge of the system + nodes there are. It is recommended that + software management functions are written that take care of + this problem. Such a function can have knowledge of the system architecture, so it can contact each individual release handler to install the package.

-

For release handling to work properly, the runtime system needs - to have knowledge about which release it is currently running. It - must also be able to change (in run-time) which boot script and - system configuration file should be used if the system is +

For release handling to work properly, the runtime system must + know which release it is running. It + must also be able to change (in runtime) which boot script and + system configuration file are to be used if the system is restarted. This is taken care of automatically if Erlang is - started as an embedded system. Read about this in Embedded System. In this case, the system configuration file - sys.config is mandatory.

-

The installation of a new release may restart the system. Which - program to use is specified by the SASL configuration - parameter start_prg which defaults + started as an embedded system. Read about this in + Embedded System in + System Documentation. In this case, the system + configuration file sys.config is mandatory.

+

The installation of a new release can restart the system. Which + program to use is specified by the SASL configuration + parameter start_prg, which defaults to $ROOT/bin/start.

The emulator restart on Windows NT expects that the system is started using the erlsrv program (as a service). - Furthermore the release handler expects that the service is named - NodeName_Release, where NodeName is - the first part of the Erlang nodename (up to, but not including - the "@") and Release is the current version of - the release. The release handler furthermore expects that a + Furthermore, the release handler expects that the service is named + NodeName_Release, where NodeName is + the first part of the Erlang node name (up to, but not including + the "@") and Release is the current release version. + The release handler furthermore expects that a program like start_erl.exe is specified as "machine" to - erlsrv. During upgrading with restart, a new service will - be registered and started. The new service will be set to - automatic and the old service removed as soon as the new release + erlsrv. During upgrading with restart, a new service + is registered and started. The new service is set to + automatic and the old service is removed when the new release is made permanent.

-

The release handler at a node which runs on a diskless machine, +

The release handler at a node running on a diskless machine, or with a read-only file system, must be configured accordingly - using the following sasl configuration parameters (see - sasl(6) for details):

+ using the following SASL configuration parameters (for + details, see sasl(6)):

masters -

This node uses a number of master nodes in order to store - and fetch release information. All master nodes must be up - and running whenever release information is written by this +

This node uses some master nodes to store + and fetch release information. All master nodes must be + operational whenever release information is written by this node.

client_directory @@ -145,24 +151,25 @@ old reboot_old permanent

This parameter specifies if the Erlang emulator is statically installed at the client node. A node with a static - emulator cannot dynamically switch to a new emulator because + emulator cannot dynamically switch to a new emulator, as the executable files are statically written into memory.

-

It is also possible to use the release handler to unpack and +

The release handler can also be used to unpack and install release packages when not running Erlang as an embedded - system, but in this case the user must somehow make sure that + system. However, in this case the user must somehow ensure that correct boot scripts and configuration files are used if - the system needs to be restarted.

-

There are additional functions for using another file structure + the system must be restarted.

+

Functions are provided for using another file structure than the structure defined in OTP. These functions can be used to test a release upgrade locally.

+ check_install_release(Vsn) -> {ok, OtherVsn, Descr} | {error, Reason} check_install_release(Vsn,Opts) -> {ok, OtherVsn, Descr} | {error, Reason} - Check installation of a release in the system. + Checks installation of a release in the system. Vsn = OtherVsn = string() Opts = [Opt] @@ -173,27 +180,29 @@ old reboot_old permanent

Checks if the specified version Vsn of the release can be installed. The release must not have status - current. Issues warnings if relup or - sys.config are not present. If relup is present, + current. Issues warnings if relup file or + sys.config is not present. If relup file is present, its contents are checked and {error,Reason} is returned if an error is found. Also checks that all required - applications are present and that all new code can be loaded, - or {error,Reason} is returned.

-

This function evaluates all instructions that occur before + applications are present and that all new code can be loaded; + {error,Reason} is returned if an error is found.

+

Evaluates all instructions that occur before the point_of_no_return instruction in the release upgrade script.

-

Returns the same as install_release/1. Descr - defaults to "" if no relup file is found.

-

If the option purge is given, all old code that can - be soft purged will be purged after all other checks are - successfully completed. This can be useful in order to +

Returns the same as + install_release/1. + Descr defaults to "" if no relup file is found.

+

If option purge is specified, all old code that can + be soft-purged is purged after all other checks are + successfully completed. This can be useful to reduce the time needed by install_release.

+ marker="#install_release/1">install_release/1.

+ create_RELEASES(Root, RelDir, RelFile, AppDirs) -> ok | {error, Reason} - Create an initial RELEASES file. + Creates an initial RELEASES file. Root = RelDir = RelFile = string() AppDirs = [{App, Vsn, Dir}] @@ -202,52 +211,55 @@ old reboot_old permanent Reason = term() -

Creates an initial RELEASES file to be used by the release - handler. This file must exist in order to install new +

Creates an initial RELEASES file to be used by the + release handler. This file must exist to install new releases.

Root is the root of the installation ($ROOT) as - described above. RelDir is the the directory where - the RELEASES file should be created (normally + described earlier. RelDir is the directory where + the RELEASES file is to be created (normally $ROOT/releases). RelFile is the name of the .rel file that describes the initial release, including the extension .rel.

AppDirs can be used to specify from where the modules - for the specified applications should be loaded. App is + for the specified applications are to be loaded. App is the name of an application, Vsn is the version, and Dir is the name of the directory where App-Vsn - is located. The corresponding modules should be located under + is located. The corresponding modules are to be located under Dir/App-Vsn/ebin. The directories for applications not specified in AppDirs are assumed to be located in $ROOT/lib.

+ install_file(Vsn, File) -> ok | {error, Reason} - Install a release file in the release structure. + Installs a release file in the release structure. Vsn = File = string() Reason = term() -

Installs a release dependent file in the release structure. - A release dependent file is a file that must be in +

Installs a release-dependent file in the release structure. + The release-dependent file must be in the release structure when a new release is installed: - start.boot, relup and sys.config.

+ start.boot, relup, and sys.config.

The function can be called, for example, when these files - are generated at the target. It should be called after - set_unpacked/2 has been called.

+ are generated at the target. The function is to be called after + set_unpacked/2 + has been called.

+ install_release(Vsn) -> {ok, OtherVsn, Descr} | {error, Reason} install_release(Vsn, [Opt]) -> {ok, OtherVsn, Descr} | {continue_after_restart, OtherVsn, Descr} | {error, Reason} - Install a release in the system. + Installs a release in the system. Vsn = OtherVsn = string() Opt = {error_action, Action} | {code_change_timeout, Timeout}    | {suspend_timeout, Timeout} | {update_paths, Bool}  Action = restart | reboot -  Timeout = default | infinity | int()>0 +  Timeout = default | infinity | pos_integer()  Bool = boolean() Descr = term() Reason = {illegal_option, Opt} | {already_installed, Vsn} | {change_appl_data, term()} | {missing_base_app, OtherVsn, App} | {could_not_create_hybrid_boot, term()} | term() @@ -262,7 +274,7 @@ old reboot_old permanent version and a script {Vsn,Descr2,Instructions2} in this file for downgrading to Vsn.

If a script is found, the first thing that happens is that - the applications specifications are updated according to + the application specifications are updated according to the .app files and sys.config belonging to the release version Vsn.

After the application specifications have been updated, @@ -271,101 +283,120 @@ old reboot_old permanent OtherVsn and Descr are the version (UpFromVsn or Vsn) and description (Descr1 or Descr2) as specified in the script.

-

If {continue_after_restart,OtherVsn,Descr} is - returned, it means that the emulator will be restarted - before the upgrade instructions are executed. This will - happen if the emulator or any of the applications kernel, - stdlib or sasl are updated. The new version of the emulator - and these core applications will execute after the restart, - but for all other applications the old versions will be - started and the upgrade will be performed as normal by +

If {continue_after_restart,OtherVsn,Descr} is + returned, the emulator is restarted + before the upgrade instructions are executed. This + occurs if the emulator or any of the applications + Kernel, STDLIB, or SASL + are updated. The new emulator version + and these core applications execute after the restart. + For all other applications the old versions are + started and the upgrade is performed as normal by executing the upgrade instructions.

If a recoverable error occurs, the function returns {error,Reason} and the original application specifications are restored. If a non-recoverable error occurs, the system is restarted.

-

The option error_action defines if the node should be - restarted (init:restart()) or rebooted - (init:reboot()) in case of an error during - the installation. Default is restart.

-

The option code_change_timeout defines the timeout - for all calls to sys:change_code. If no value is - specified or default is given, the default value - defined in sys is used.

-

The option suspend_timeout defines the timeout for - all calls to sys:suspend. If no value is specified, - the values defined by the Timeout parameter of - the upgrade or suspend instructions are used. - If default is specified, the default value defined in - sys is used.

-

The option {update_paths,Bool} indicates if all - application code paths should be updated (Bool==true), - or if only code paths for modified applications should be - updated (Bool==false, default). This option only has - effect for other application directories than the default - $ROOT/lib/App-Vsn, that is, application directories - provided in the AppDirs argument in a call to - create_RELEASES/4 or set_unpacked/2.

-

Example: In the current version CurVsn of a release, - the application directory of myapp is - $ROOT/lib/myapp-1.0. A new version NewVsn is - unpacked outside the release handler, and the release handler - is informed about this with a call to:

- +

Options:

+ + error_action +

Defines if the node is to be + restarted + (init:restart()) + or rebooted + (init:reboot()) + if there is an error during + the installation. Default is restart.

+ code_change_timeout +

Defines the time-out + for all calls to + stdlib:sys:change_code. + If no value is specified or default is specified, the + default value defined in sys is used.

+ suspend_timeout +

Defines the time-out for + all calls to + stdlib:sys:suspend. + If no value is specified, the values defined by the Timeout + parameter of the upgrade or suspend instructions are used. + If default is specified, the default value defined in + sys is used.

+ {update_paths,Bool} +

Indicates if all + application code paths are to be updated (Bool==true) + or if only code paths for modified applications are to be + updated (Bool==false, default). This option has only + effect for other application directories than the default + $ROOT/lib/App-Vsn, that is, application directories + specified in argument AppDirs in a call to + create_RELEASES/4 or + set_unpacked/2.

+

Example:

+

In the current version CurVsn of a release, the + application directory of myapp is + $ROOT/lib/myapp-1.0. A new version NewVsn is + unpacked outside the release handler and the release + handler is informed about this with a call as follows:

+ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]). -=> {ok,NewVsn} - -

If NewVsn is installed with the option - {update_paths,true}, afterwards - code:lib_dir(myapp) will return - /home/user/myapp-1.0.

+=> {ok,NewVsn}
+

If NewVsn is installed with option + {update_paths,true}, then + kernel:code:lib_dir(myapp) + returns /home/user/myapp-1.0.

+ -

Installing a new release might be quite time consuming if +

Installing a new release can be time consuming if there are many processes in the system. The reason is that each process must be checked for references to old code - before a module can be purged. This check might lead to + before a module can be purged. This check can lead to garbage collections and copying of data.

-

If you wish to speed up the execution of - install_release, then you may call check_install_release - first, using the option purge. This will do the same - check for old code, and then purge all modules that can be - soft purged. The purged modules will then no longer have any - old code, and install_release will not need to do the +

To speed up the execution of + install_release, + first call check_install_release, + using option purge. This does the same + check for old code. Then purges all modules that can be + soft-purged. The purged modules do then no longer have any + old code, and + install_release + does not need to do the checks.

-

Obviously, this will not reduce the overall time for the - upgrade, but it will allow checks and purge to be executed +

This does not reduce the overall time for the + upgrade, but it allows checks and purge to be executed in the background before the real upgrade is started.

When upgrading the emulator from a version older than OTP - R15, there will be an attempt to load new application beam - code into the old emulator. In some cases, the new beam - format can not be read by the old emulator, and so the code - loading will fail and terminate the complete upgrade. To - overcome this problem, the new application code should be - compiled with the old emulator. See Design - Principles for more information about emulator - upgrade from pre OTP R15 versions.

+ R15, an attempt is made to load new application beam + code into the old emulator. Sometimes the new beam + format cannot be read by the old emulator, so the code + loading fails and the complete upgrade is terminated. To + overcome this problem, the new application code is to be + compiled with the old emulator. For more information about + emulator upgrade from pre OTP R15 versions, see + Design + Principles in System Documentation.

+ make_permanent(Vsn) -> ok | {error, Reason} - Make the specified release version permanent. + Makes the specified release version permanent. Vsn = string() Reason = {bad_status, Status} | term() -

Makes the specified version Vsn of the release +

Makes the specified release version Vsn permanent.

+ remove_release(Vsn) -> ok | {error, Reason} - Remove a release from the system. + Removes a release from the system. Vsn = string() Reason = {permanent, Vsn} | client_node | term() @@ -375,23 +406,26 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]). The release must not be the permanent release. Removes only the files and directories not in use by another release.

+
reboot_old_release(Vsn) -> ok | {error, Reason} - Reboot the system from an old release. + Reboots the system from an old release. Vsn = string() Reason = {bad_status, Status} | term()

Reboots the system by making the old release permanent, and - calls init:reboot() directly. The release must have - status old.

+ calls + init:reboot() + directly. The release must have status old.

+ set_removed(Vsn) -> ok | {error, Reason} - Mark a release as removed. + Marks a release as removed. Vsn = string() Reason = {permanent, Vsn} | term() @@ -403,9 +437,10 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]). not delete any files.

+ set_unpacked(RelFile, AppDirs) -> {ok, Vsn} | {error, Reason} - Mark a release as unpacked. + Marks a release as unpacked. RelFile = string() AppDirs = [{App, Vsn, Dir}] @@ -419,18 +454,19 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]). the release is unpacked. Vsn is extracted from the release resource file RelFile.

AppDirs can be used to specify from where the modules - for the specified applications should be loaded. App is + for the specified applications are to be loaded. App is the name of an application, Vsn is the version, and Dir is the name of the directory where App-Vsn - is located. The corresponding modules should be located under + is located. The corresponding modules are to be located under Dir/App-Vsn/ebin. The directories for applications not specified in AppDirs are assumed to be located in $ROOT/lib.

+ unpack_release(Name) -> {ok, Vsn} | {error, Reason} - Unpack a release package. + Unpacks a release package. Name = Vsn = string() Reason = client_node | term() @@ -438,14 +474,15 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).

Unpacks a release package Name.tar.gz located in the releases directory.

-

Performs some checks on the package - for example checks - that all mandatory files are present - and extracts its +

Performs some checks on the package, for example, checks + that all mandatory files are present, and extracts its contents.

+ which_releases() -> [{Name, Vsn, Apps, Status}] - Return all known releases + Returns all known releases. Name = Vsn = string() Apps = ["App-Vsn"] @@ -455,16 +492,18 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).

Returns all releases known to the release handler.

+ which_releases(Status) -> [{Name, Vsn, Apps, Status}] - Return all known releases of a specific status + Returns all known releases of a specific status. Name = Vsn = string() Apps = ["App-Vsn"] Status = unpacked | current | permanent | old -

Returns all releases known to the release handler of a specific status.

+

Returns all releases, known to the release handler, of a + specific status.

@@ -473,7 +512,8 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]). Application Upgrade/Downgrade

The following functions can be used to test upgrade and downgrade of single applications (instead of upgrading/downgrading an entire - release). A script corresponding to relup is created + release). A script corresponding to the instructions in the + relup file is created on-the-fly, based on the .appup file for the application, and evaluated exactly in the same way as release_handler does.

@@ -482,20 +522,22 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]). of .appup files. They are not run within the context of the release_handler process. They must therefore not be used together with calls to - install_release/1,2, as this will cause + install_release/1,2, + as this causes the release_handler to end up in an inconsistent state.

-

No persistent information is updated, why these functions can +

No persistent information is updated, so these functions can be used on any Erlang node, embedded or not. Also, using these - functions does not affect which code will be loaded in case of + functions does not affect which code is loaded if there is a reboot.

-

If the upgrade or downgrade fails, the application may end up +

If the upgrade or downgrade fails, the application can end up in an inconsistent state.

+ upgrade_app(App, Dir) -> {ok, Unpurged} | restart_emulator | {error, Reason} - Upgrade to a new application version + Upgrades to a new application version. App = atom() Dir = string() @@ -506,39 +548,46 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).

Upgrades an application App from the current version to a new version located in Dir according to - the .appup script.

+ the .appup file.

App is the name of the application, which must be started. Dir is the new library directory of - App, the corresponding modules as well as - the .app and .appup files should be located + App. The corresponding modules as well as + the .app and .appup files are to be located under Dir/ebin.

The function looks in the .appup file and tries to find an upgrade script from the current version of the application using - upgrade_script/2. + upgrade_script/2. This script is evaluated using - eval_appup_script/4, + eval_appup_script/4, exactly in the same way as - install_release/1,2 + install_release/1,2 does.

-

Returns {ok, Unpurged} if evaluating the script is - successful, where Unpurged is a list of unpurged - modules, or restart_emulator if this instruction is - encountered in the script, or {error, Reason} if - an error occurred when finding or evaluating the script.

+

Returns one of the following:

+ + {ok, Unpurged} if evaluating the script is + successful, where Unpurged is a list of unpurged + modules + restart_emulator if this instruction is + encountered in the script + {error, Reason} if an error occurred when + finding or evaluating the script +

If the restart_new_emulator instruction is found in - the script, upgrade_app/2 will return - {error,restart_new_emulator}. The reason for this is - that this instruction requires that a new version of the - emulator is started before the rest of the upgrade - instructions can be executed, and this can only be done by - install_release/1,2.

+ the script, + upgrade_app/2 + returns {error,restart_new_emulator}. This because + restart_new_emulator requires a new version of the + emulator to be started before the rest of the upgrade + instructions can be executed, and this can only be done by + install_release/1,2.

+ downgrade_app(App, Dir) -> downgrade_app(App, OldVsn, Dir) -> {ok, Unpurged} | restart_emulator | {error, Reason} - Downgrade to a previous application version + Downgrades to a previous application version. App = atom() Dir = OldVsn = string() @@ -549,110 +598,124 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).

Downgrades an application App from the current version to a previous version OldVsn located in - Dir according to the .appup script.

+ Dir according to the .appup file.

App is the name of the application, which must be - started. OldVsn is the previous version of - the application and can be omitted if Dir is of + started. OldVsn is the previous application version + and can be omitted if Dir is of the format "App-OldVsn". Dir is the library - directory of this previous version of App, - the corresponding modules as well as the old .app file - should be located under Dir/ebin. The .appup - file should be located in the ebin directory of + directory of the previous version of App. + The corresponding modules and the old .app file + are to be located under Dir/ebin. The .appup + file is to be located in the ebin directory of the current library directory of the application - (code:lib_dir(App)).

+ (code:lib_dir(App)).

The function looks in the .appup file and tries to - find an downgrade script to the previous version of + find a downgrade script to the previous version of the application using - downgrade_script/3. + downgrade_script/3. This script is evaluated using - eval_appup_script/4, + eval_appup_script/4, exactly in the same way as - install_release/1,2 + install_release/1,2 does.

-

Returns {ok, Unpurged} if evaluating the script is - successful, where Unpurged is a list of unpurged - modules, or restart_emulator if this instruction is - encountered in the script, or {error, Reason} if - an error occurred when finding or evaluating the script.

+

Returns one of the following:

+ + {ok, Unpurged} if evaluating the script is + successful, where Unpurged is a list of unpurged + modules + restart_emulator if this instruction is + encountered in the script + {error, Reason} if an error occurred when + finding or evaluating the script +
+ upgrade_script(App, Dir) -> {ok, NewVsn, Script} - Find an application upgrade script + Finds an application upgrade script. App = atom() Dir = string() NewVsn = string() - Script = Instructions -- see appup(4) + Script = Instructions

Tries to find an application upgrade script for App from the current version to a new version located in Dir.

The upgrade script can then be evaluated using - eval_appup_script/4. + eval_appup_script/4. It is recommended to use - upgrade_app/2 - instead, but this function is useful in order to inspect - the contents of the script.

+ upgrade_app/2 + instead, but this function (upgrade_script) is useful + to inspect the contents of the script.

App is the name of the application, which must be started. Dir is the new library directory of - App, the corresponding modules as well as - the .app and .appup files should be located + App. The corresponding modules as well as + the .app and .appup files are to be located under Dir/ebin.

The function looks in the .appup file and tries to - find an upgrade script from the current version of - the application. High-level instructions are translated to - low-level instructions and the instructions are sorted in - the same manner as when generating a relup script.

+ find an upgrade script from the current application version. + High-level instructions are translated to + low-level instructions. The instructions are sorted in + the same manner as when generating a relup file.

Returns {ok, NewVsn, Script} if successful, where - NewVsn is the new application version.

+ NewVsn is the new application version. + For details about Script, see + appup(4).

Failure: If a script cannot be found, the function fails with an appropriate error reason.

+ downgrade_script(App, OldVsn, Dir) -> {ok, Script} - Find an application downgrade script + Finds an application downgrade script. App = atom() OldVsn = Dir = string() - Script = Instructions -- see appup(4) + Script = Instructions

Tries to find an application downgrade script for App from the current version to a previous version OldVsn located in Dir.

The downgrade script can then be evaluated using - eval_appup_script/4. + eval_appup_script/4. It is recommended to use - downgrade_app/2,3 - instead, but this function is useful in order to inspect - the contents of the script.

+ downgrade_app/2,3 + instead, but this function (downgrade_script) is useful + to inspect the contents of the script.

App is the name of the application, which must be started. Dir is the previous library directory of - App, the corresponding modules as well as - the old .app file should be located under - Dir/ebin. The .appup file should be located in + App. The corresponding modules and + the old .app file are to be located under + Dir/ebin. The .appup file is to be located in the ebin directory of the current library - directory of the application (code:lib_dir(App)).

+ directory of the application + (code:lib_dir(App)).

The function looks in the .appup file and tries to - find an downgrade script from the current version of - the application. High-level instructions are translated to - low-level instructions and the instructions are sorted in - the same manner as when generating a relup script.

-

Returns {ok, Script} if successful.

+ find a downgrade script from the current application version. + High-level instructions are translated to + low-level instructions. The instructions are sorted in + the same manner as when generating a relup file.

+

Returns {ok, Script} if successful. + For details about Script, see + appup(4).

Failure: If a script cannot be found, the function fails with an appropriate error reason.

+ eval_appup_script(App, ToVsn, ToDir, Script) -> {ok, Unpurged} | restart_emulator | {error, Reason} - Evaluate an application upgrade or downgrade script + Evaluates an application upgrade or downgrade script. App = atom() ToVsn = ToDir = string() - Script -- see upgrade_script/2, downgrade_script/3 + Script + See upgrade_script/2, downgrade_script/3 Unpurged = [Module]  Module = atom() Reason = term() @@ -660,114 +723,100 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).

Evaluates an application upgrade or downgrade script Script, the result from calling - upgrade_script/2 or - downgrade_script/3, + upgrade_script/2 or + downgrade_script/3, exactly in the same way as - install_release/1,2 + install_release/1,2 does.

App is the name of the application, which must be started. ToVsn is the version to be upgraded/downgraded to, and ToDir is the library directory of this version. The corresponding modules as well as the .app and - .appup files should be located under Dir/ebin.

-

Returns {ok, Unpurged} if evaluating the script is - successful, where Unpurged is a list of unpurged - modules, or restart_emulator if this instruction is - encountered in the script, or {error, Reason} if - an error occurred when evaluating the script.

-

If the restart_new_emulator instruction is found in - the script, eval_appup_script/4 will return - {error,restart_new_emulator}. The reason for this is - that this instruction requires that a new version of the - emulator is started before the rest of the upgrade - instructions can be executed, and this can only be done by - install_release/1,2.

+ .appup files are to be located under Dir/ebin.

+

Returns one of the following:

+ + {ok, Unpurged} if evaluating the script is + successful, where Unpurged is a list of unpurged + modules + restart_emulator if this instruction is + encountered in the script + {error, Reason} if an error occurred when + finding or evaluating the script + +

If the restart_new_emulator instruction is found in + the script, + eval_appup_script/4 + returns {error,restart_new_emulator}. This because + restart_new_emulator requires a new version of the + emulator to be started before the rest of the upgrade + instructions can be executed, and this can only be done by + install_release/1,2.

Typical Error Reasons - - -

{bad_masters, Masters} - The master nodes - Masters are not alive.

-
- -

{bad_rel_file, File} - Specified .rel file - File can not be read, or does not contain a single - term.

-
- -

{bad_rel_data, Data} - Specified .rel file - does not contain a recognized release specification, but - another term Data.

-
- -

{bad_relup_file, File} - Specified relup file - Relup contains bad data.

-
- -

{cannot_extract_file, Name, Reason} - Problems when - extracting from a tar file, erl_tar:extract/2 returned - {error, {Name, Reason}}.

-
- -

{existing_release, Vsn} - Specified release version - Vsn is already in use.

-
- -

{Master, Reason, When} - Some operation, indicated by - the term When, failed on the master node Master - with the specified error reason Reason.

-
- -

{no_matching_relup, Vsn, CurrentVsn} - Cannot find a - script for up/downgrading between CurrentVsn and - Vsn.

-
- -

{no_such_directory, Path} - The directory Path - does not exist.

-
- -

{no_such_file, Path} - The path Path (file or - directory) does not exist.

-
- -

{no_such_file, {Master, Path}} - The path Path - (file or directory) does not exist at the master node - Master.

-
- -

{no_such_release, Vsn} - The specified version - Vsn of the release does not exist.

-
- -

{not_a_directory, Path} - Path exists, but is - not a directory.

-
- -

{Posix, File} - Some file operation failed for - File. Posix is an atom named from the Posix - error codes, such as enoent, eacces or - eisdir. See file(3).

-
- -

Posix - Some file operation failed, as above.

-
-
+ + {bad_masters, Masters} +

The master nodes Masters are not alive.

+ {bad_rel_file, File} +

Specified .rel file File cannot be read or + does not contain a single term.

+ {bad_rel_data, Data} +

Specified .rel file does not contain a recognized + release specification, but another term Data.

+ {bad_relup_file, File} +

Specified relup file Relup contains bad + data.

+ {cannot_extract_file, Name, Reason} +

Problems when extracting from a tar file, + erl_tar:extract/2 + returned {error, {Name, Reason}}.

+ {existing_release, Vsn} +

Specified release version Vsn is already + in use.

+ {Master, Reason, When} +

Some operation, indicated by the term When, failed + on the master node Master with the specified error + reason Reason.

+ {no_matching_relup, Vsn, CurrentVsn} +

Cannot find a script for upgrading/downgrading between + CurrentVsn and Vsn.

+ {no_such_directory, Path} +

The directory Pathdoes not exist.

+ {no_such_file, Path} +

The path Path (file or directory) does not + exist.

+ {no_such_file, {Master, Path}} +

The path Path (file or directory) does not exist at + the master node Master.

+ {no_such_release, Vsn} +

The specified release version Vsn does not + exist.

+ {not_a_directory, Path} +

Path exists but is not a directory.

+ {Posix, File} +

Some file operation failed for File. Posix + is an atom named from the Posix error codes, such as + enoent, eacces, or eisdir. See + file(3) + in Kernel.

+ Posix +

Some file operation failed, as for the previous item in + the list.

+
- SEE ALSO -

OTP Design Principles, - config(4), - relup(4), - rel(4), - script(4), - sys(3), - systools(3)

+ See Also +

OTP Design Principles, + config(4), + rel(4), + relup(4), + script(4), + sys(3), + systools(3)

diff --git a/lib/sasl/doc/src/relup.xml b/lib/sasl/doc/src/relup.xml index 8eecf3fce2..58918fc8e8 100644 --- a/lib/sasl/doc/src/relup.xml +++ b/lib/sasl/doc/src/relup.xml @@ -36,59 +36,53 @@

The release upgrade file describes how a release is upgraded in a running system.

This file is automatically generated by - systools:make_relup/3,4, using a release resource file - (.rel), application resource files (.app) and + systools:make_relup/3,4, + using a release resource file + (.rel), application resource files (.app), and application upgrade files (.appup) as input.

- FILE SYNTAX -

In a target system, the release upgrade file should be located in - the OTP_ROOT/erts-EVsn/Vsn directory.

+ File Syntax +

In a target system, the release upgrade file is to be located in + directory $ROOT/releases/Vsn.

The relup file contains one single Erlang term, which defines the instructions used to upgrade the release. The file has the following syntax:

{Vsn, [{UpFromVsn, Descr, Instructions}, ...], - [{DownToVsn, Descr, Instructions}, ...]}. - - - -

Vsn = string() is the current version of the release.

-
- -

UpFromVsn = string() is an earlier version of the release - to upgrade from.

-
- -

Descr = term() is a user defined parameter passed - from the systools:make_relup/3,4 function. It will - be used in the return value of - release_handler:install_release/1,2.

-
- -

Instructions is a list of low-level release upgrade - instructions, see appup(4).

-

It consists of the release upgrade instructions from + [{DownToVsn, Descr, Instructions}, ...]}. + + Vsn = string() +

Current release version.

+ UpFromVsn = string() +

Earlier version of the release to upgrade from.

+ Descr = term() +

A user-defined parameter passed + from the function + systools:make_relup/3,4. + It is used in the return value of + release_handler:install_release/1,2.

+ Instructions +

A list of low-level release upgrade instructions, see + appup(4). + It consists of the release upgrade instructions from the respective application upgrade files (high-level instructions are translated to low-level instructions), in the same order - as in the start script.

-
- -

DownToVsn = string() is an earlier version of the release - to downgrade to.

-
-
-

When upgrading from UpFromVsn with - release_handler:install_release/1,2, there does not have to be - an exact match of versions, but UpFromVsn can be a sub-string - of the current release version.

+ as in the start script.

+ DownToVsn = string() +

Earlier version of the release to downgrade to.

+
- SEE ALSO -

app(4), appup(4), rel(4), release_handler(3), systools(3)

+ See Also +

app(4), + appup(4), + rel(4), + release_handler(3), + systools(3)

diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml index fe38e69ce3..8d79251c7e 100644 --- a/lib/sasl/doc/src/sasl_app.xml +++ b/lib/sasl/doc/src/sasl_app.xml @@ -27,12 +27,11 @@ -
- sasl - The SASL Application - -

This section describes the SASL (System Architecture Support Libraries) - application which provides the following services:

+
+ sasl + The SASL application + +

The SASL application provides the following services:

alarm_handler overload @@ -40,138 +39,147 @@ release_handler systools -

The SASL application also includes error_logger event - handlers for formatting SASL error and crash reports.

- +

The SASL application also includes error_logger event + handlers for formatting SASL error and crash reports.

-

The SASL application in OTP has nothing to do with +

The SASL application in OTP has nothing to do with "Simple Authentication and Security Layer" (RFC 4422).

-
Error Logger Event Handlers

The following error logger event handlers are used by - the SASL application.

+ the SASL application.

sasl_report_tty_h -

Formats and writes supervisor reports, crash reports and progress reports to stdio. - This error logger event handler will use +

Formats and writes supervisor reports, crash + reports, and progress reports to stdio. + This error logger event handler uses error_logger_format_depth - in the Kernel application to limit how much detail are printed to - for crash and supervisor reports.

+ in the Kernel application to limit how much detail is + printed in crash and supervisor reports.

sasl_report_file_h -

Formats and writes supervisor reports, crash report and progress report to a single file. - This error logger event handler will use +

Formats and writes supervisor reports, crash + report, and progress report to a single file. + This error logger event handler uses error_logger_format_depth - in the Kernel application to limit how much detail are printed to - for crash and supervisor reports.

+ in the Kernel application to limit the details + printed in crash and supervisor reports.

log_mf_h -

This error logger writes all events sent to - the error logger to disk.

-

To activate this event handler, the following three sasl - configuration parameters must be set: - error_logger_mf_dir, error_logger_mf_maxbytes - and error_logger_mf_maxfiles. See below for more - information about the configuration parameters.

+

This error logger writes all events sent to the + error logger to disk. Multiple files and log rotation are + used. For efficiency reasons, each event is written as a + binary. For more information about this handler, + see the STDLIB Reference + Manual.

+

To activate this event handler, three SASL + configuration parameters must be set, + error_logger_mf_dir, error_logger_mf_maxbytes, + and error_logger_mf_maxfiles. The next section provides + more information about the configuration parameters.

Configuration -

The following configuration parameters are defined for the SASL - application. See app(4) for more information about - configuration parameters:

+

The following configuration parameters are defined for the SASL + application. For more information about configuration parameters, see + app(4) in Kernel.

+

All configuration parameters are optional.

- ]]> + -

Value is one of:

+

Value is one of the following:

tty - Installs sasl_report_tty_h in the error logger. - This is the default option. +

Installs sasl_report_tty_h in the error logger. + This is the default option.

{file,FileName} - Installs sasl_report_file_h in the error logger. - This makes all reports go to the file FileName. - FileName is a string. +

Installs sasl_report_file_h in the error logger. + All reports go to file FileName, which is a + string.

{file,FileName,Modes} - Same as {file,FileName} except that the Modes - allows to specify the modes used for opening the FileName - given to the file:open/2 - call. When not specified, the Modes defaults to [write]. - Use [append] for having the FileName open in append mode. - FileName is a string. +

Same as {file,FileName}, except that Modes + allows you to specify the modes used for opening the FileName + given to the file:open/2 + call. When not specified, Modes defaults to [write]. + Use [append] to have the FileName open in append mode. + FileName is a string.

false - -

No SASL error logger handler is installed.

-
+

No SASL error logger handler is installed.

- ]]> +

Restricts the error logging performed by the specified - sasl_error_logger to error reports, progress reports, + sasl_error_logger to error reports or progress reports, or both. Default is all.

- ]]> + -

Specifies in which directory the files are stored. If this - parameter is undefined or false, +

Specifies in which directory log_mf_h is to store + its files. If this parameter is undefined or false, the log_mf_h handler is not installed.

- ]]> + -

Specifies how large each individual file can be. If this - parameter is undefined, the log_mf_h handler is not - installed.

+

Specifies the maximum size of each individual file written + by log_mf_h. If this parameter is undefined, + the log_mf_h handler is not installed.

- ]]> + -

Specifies how many files are used. If this parameter is - undefined, the log_mf_h handler is not installed.

+

Specifies the number of files used by log_mf_h. If + this parameter is undefined, the log_mf_h handler is + not installed.

- 0 ]]> + 0 ]]> -

Specifies the maximum intensity for overload. Default +

Specifies the maximum intensity + for overload. Default is 0.8.

- 0 ]]> + 0 ]]> -

Specifies the overload weight. Default is 0.1.

+

Specifies the overload + weight. Default is 0.1.

- ]]> + -

Specifies which program should be used when restarting - the system. Default is $OTP_ROOT/bin/start.

+

Specifies the program to be used when restarting the system + during release installation. Default is + $OTP_ROOT/bin/start.

- ]]> + -

Specifies which nodes this node uses to read/write release - information. This parameter is ignored if - the client_directory parameter is not set.

+

Specifies the nodes used by this node to read/write release + information. This parameter is ignored if parameter + client_directory is not set.

- ]]> +

This parameter specifies the client directory at the master - nodes. Refer to Release Handling in OTP Design Principles for more information. This parameter is - ignored if the masters parameter is not set.

+ nodes. For details, see + Release Handling + in OTP Design Principles. This parameter is + ignored if parameter masters is not set.

- ]]> +

Indicates if the Erlang emulator is statically installed. A node with a static emulator cannot switch dynamically to a - new emulator as the executable files are written into memory - statically. This parameter is ignored if the masters - and client_directory parameters are not set.

+ new emulator, as the executable files are written into memory + statically. This parameter is ignored if parameters masters + and client_directory are not set.

- ]]> +

Indicates where the releases directory is located. The release handler writes all its files to this directory. @@ -179,7 +187,7 @@ RELDIR is used. By default, this is $OTP_ROOT/releases.

- ]]> +

If set to true, all dates in textual log outputs are displayed in Universal Coordinated Time with the string @@ -190,13 +198,13 @@

See Also -

alarm_handler(3), - error_logger(3), - log_mf_h(3), - overload(3), - rb(3), - release_handler(3), - systools(3)

+

alarm_handler(3), + error_logger(3), + log_mf_h(3), + overload(3), + rb(3), + release_handler(3), + systools(3)

diff --git a/lib/sasl/doc/src/sasl_intro.xml b/lib/sasl/doc/src/sasl_intro.xml index 2dc3efebc1..bbc9457103 100644 --- a/lib/sasl/doc/src/sasl_intro.xml +++ b/lib/sasl/doc/src/sasl_intro.xml @@ -31,22 +31,32 @@
- About This Document -

The SASL (System Architecture Support Libraries) - application provides support for:

+ Scope +

The SASL application provides support for:

- error logging - alarm handling - overload regulation - release handling - report browsing. + Error logging + Alarm handling + Overload regulation + Release handling + Report browsing -

In this document, "SASL Error Logging" describes the error - handler which produces the supervisor, progress, and crash - reports which can be written to screen, or to a specified file. - It also describes the report browser rb.

-

The chapters about release structure and release handling have - been moved to OTP Design Principles.

+

Section + SASL Error Logging + describes the error + handler that produces the supervisor, progress, and crash + reports, which can be written to screen or to a specified file. + It also describes the Report Browser (RB).

+

The sections about release structure and release handling have + been moved to section + OTP Design Principles + in System Documentation.

+ +
+ Prerequisites +

It is assumed that the reader is familiar with the Erlang + programming language.

+
+ diff --git a/lib/sasl/doc/src/script.xml b/lib/sasl/doc/src/script.xml index 838efe69bb..db3ea0f487 100644 --- a/lib/sasl/doc/src/script.xml +++ b/lib/sasl/doc/src/script.xml @@ -37,25 +37,21 @@ script Boot script -

The boot script describes how the Erlang runtime system is - started. It contains instructions on which code to load and - which processes and applications to start. -

-

The command erl -boot Name starts the system with a boot +

The boot script describes how the Erlang runtime system + is started. It contains instructions on which code to load and + which processes and applications to start.

+

Command erl -boot Name starts the system with a boot file called Name.boot, which is generated from the - Name.script file, using systools:script2boot/1. -

+ Name.script file, using + systools:script2boot/1.

The .script file is generated by systools from a - .rel file and .app files. -

+ .rel file and from .app files.

- FILE SYNTAX -

The boot script is stored in a file with the extension - .script

-

The file has the following syntax: -

+ File Syntax +

The boot script is stored in a file with extension + .script. The file has the following syntax:

{script, {Name, Vsn}, [ @@ -70,100 +66,97 @@ ... {apply, {Mod, Func, Args}}, ... - {progress, started}]}. - - Name = string() defines the name of the system. - - Vsn = string() defines the version of the system. - - {progress, Term} sets the "progress" of the - initialization program. The function init:get_status() - returns the current value of the progress, which is - {InternalStatus,Term}. - - -

{path, [Dir]} where Dir is a string. This + {progress, started}]}. + + Name = string() +

Defines the system name.

+ Vsn = string() +

Defines the system version.

+ {progress, Term} +

Sets the "progress" of the initialization + program. The + init:get_status/0 + function returns the current value of the progress, which is + {InternalStatus,Term}.

+ {path, [Dir]} +

Dir is a string. This argument sets the load path of the system to [Dir]. The load path used to load modules is obtained from the initial load path, which is given in the script file, together with - any path flags which were supplied in the command line - arguments. The command line arguments modify the path as + any path flags that were supplied in the command-line + arguments. The command-line arguments modify the path as follows:

-pa Dir1 Dir2 ... DirN adds the directories Dir1, Dir2, ..., DirN to the front of the initial - load path. - + load path.
-pz Dir1 Dir2 ... DirN adds the directories Dir1, Dir2, ..., DirN to the end of the initial - load path. - + load path.

-path Dir1 Dir2 ... DirN defines a set of - directories Dir1, Dir2, ..., DirN which replaces + directories Dir1, Dir2, ..., DirN, which replace the search path given in the script file. Directory names in the path are interpreted as follows:

Directory names starting with / are assumed - to be absolute path names. - + to be absolute path names.
Directory names not starting with / are - assumed to be relative the current working directory. - + assumed to be relative the current working directory. The special $ROOT variable can only be used - in the script, not as a command line argument. The + in the script, not as a command-line argument. The given directory is relative the Erlang installation - directory. - + directory.
- - {primLoad, [Mod]} loads the modules [Mod] - from the directories specified in Path. The script - interpreter fetches the appropriate module by calling the - function erl_prim_loader:get_file(Mod). A fatal error - which terminates the system will occur if the module cannot be - located. - - {kernel_load_completed} indicates that all modules - which must be loaded before any processes - are started are loaded. In interactive mode, all - {primLoad,[Mod]} commands interpreted after this - command are ignored, and these modules are loaded on demand. - In embedded mode, kernel_load_completed is ignored, and - all modules are loaded during system start. - - {kernelProcess, Name, {Mod, Func, Args}} starts a - "kernel process". The kernel process Name is started - by evaluating apply(Mod, Func, Args) which is expected - to return {ok, Pid} or ignore. The init - process monitors the behaviour of Pid and terminates - the system if Pid dies. Kernel processes are key - components of the runtime system. Users do not normally add - new kernel processes. - - {apply, {Mod, Func, Args}}. The init process simply - evaluates apply(Mod, Func, Args). The system - terminates if this results in an error. The boot procedure - hangs if this function never returns. - - + + {primLoad, [Mod]} +

Loads the modules [Mod] + from the directories specified in Path. The script + interpreter fetches the appropriate module by calling + + erl_prim_loader:get_file(Mod). A fatal error + that terminates the system occurs if the module cannot be + located.

+ {kernel_load_completed} +

Indicates that all modules + that must be loaded before any processes + are started are loaded. In interactive mode, all + {primLoad,[Mod]} commands interpreted after this + command are ignored, and these modules are loaded on demand. + In embedded mode, kernel_load_completed is ignored, and + all modules are loaded during system start.

+ {kernelProcess, Name, {Mod, Func, Args}} +

Starts the + "kernel process" Name + by evaluating apply(Mod, Func, Args). The start function is + to return {ok, Pid} or ignore. The init + process monitors the behavior of Pid and terminates + the system if Pid dies. Kernel processes are key + components of the runtime system. Users do not normally add + new kernel processes.

+ {apply, {Mod, Func, Args}}. +

The init process + evaluates apply(Mod, Func, Args). The system + terminates if this results in an error. The boot procedure + hangs if this function never returns.

+ -

In the interactive system the code loader provides - demand driven code loading, but in the embedded system - the code loader loads all the code immediately. The same - version of code is used in both cases. The code server - calls init:get_argument(mode) to find out if it should - run in demand mode, or non-demand driven mode. -

+

In an interactive system, the code loader provides + demand-driven code loading, but in an embedded system + the code loader loads all code immediately. The same + version of code + is used in both cases. The code server calls + init:get_argument(mode) + to determine if it is to run in demand mode or non-demand + driven mode.

- SEE ALSO -

systools(3) -

+ See Also +

systools(3)

diff --git a/lib/sasl/doc/src/systools.xml b/lib/sasl/doc/src/systools.xml index 11d99fa595..1a5119a5cf 100644 --- a/lib/sasl/doc/src/systools.xml +++ b/lib/sasl/doc/src/systools.xml @@ -31,17 +31,18 @@
systools - A Set of Release Handling Tools. + A Set of Release Handling Tools

This module contains functions to generate boot scripts - (.boot, .script), release upgrade scripts + (.boot, .script), a release upgrade file (relup), and release packages.

+ make_relup(Name, UpFrom, DownTo) -> Result make_relup(Name, UpFrom, DownTo, [Opt]) -> Result - Generate a release upgrade file relup. + Generates a release upgrade file relup. Name = string() UpFrom = DownTo = [Name | {Name,Descr}] @@ -50,93 +51,94 @@ | warnings_as_errors  Dir = string() Result = ok | error | {ok,Relup,Module,Warnings} | {error,Module,Error} -  Relup - see relup(4) +  Relup, see relup(4)  Module = atom()  Warnings = Error = term() -

Generates a release upgrade file relup containing a - script which describes how to upgrade the system from a number - of previous releases, and how to downgrade to a number of - previous releases. The script is used by - release_handler when installing a new version of a - release in run-time.

-

By default, relup is placed in the current working - directory. If the option {outdir,Dir} is provided, - relup is placed in Dir instead.

+

Generates a release upgrade file relup containing instructions + for upgrading from or downgrading to one or more previous releases. + The instructions are used by + release_handler + when installing a new version of a release in runtime.

+

By default, relup file is located in the current working + directory. If option {outdir,Dir} is specified, + the relup file is located in Dir instead.

The release resource file Name.rel is compared with - all release resource files Name2.rel specified in - UpFrom and DownTo. For each such pair, it is - deducted:

+ all release resource files Name2.rel, specified in + UpFrom and DownTo. For each such pair, the + following is deducted:

-

Which applications should be deleted, that is - applications which are listed in Name.rel but not - in Name2.rel.

+

Which applications to be deleted, that is, + applications listed in Name.rel but not + in Name2.rel

-

Which applications should be added, that is applications - which are listed in Name2.rel but not in - Name.rel.

+

Which applications to be added, that is, applications + listed in Name2.rel but not in Name.rel

-

Which applications should be upgraded/downgraded, that - is applications listed in both Name.rel and - Name2.rel, but with different versions.

+

Which applications to be upgraded/downgraded, that + is, applications listed in both Name.rel and + Name2.rel but with different versions

If the emulator needs to be restarted after upgrading or - downgrading, that is if the ERTS version differs between - Name.rel and Name2.rel.

+ downgrading, that is, if the ERTS version differs + between Name.rel and Name2.rel

-

Instructions for this are added to the relup script in +

Instructions for this are added to the relup file in the above order. Instructions for upgrading or downgrading between application versions are fetched from the relevant application upgrade files App.appup, sorted in the same order as when generating a boot script, see - make_script/1,2. High-level instructions are translated - into low-level instructions and the result is printed to - relup.

-

The optional Descr parameter is included as-is in - the relup script, see relup(4). Defaults to + make_script/1,2. + High-level instructions are translated + into low-level instructions and the result is printed to the + relup file.

+

The optional Descr parameter is included "as is" in + the relup file, see + relup(4). Defaults to the empty list.

All the files are searched for in the code path. It is - assumed that the .app and .appup file for an - application is located in the same directory.

-

If the option {path,[Dir]} is provided, this path is - appended to the current path. The wildcard * is - expanded to all matching directories. - Example: lib/*/ebin.

-

If the restart_emulator option is supplied, a + assumed that the .app and .appup files for an + application are located in the same directory.

+

If option {path,[Dir]} is specified, this path is + appended to the current path. Wildcard * is + expanded to all matching directories, for example, + lib/*/ebin.

+

If option restart_emulator is specified, a low-level instruction to restart the emulator is appended to - the relup scripts. This ensures that a complete reboot of + the relup file. This ensures that a complete reboot of the system is done when the system is upgraded or downgraded.

-

If an upgrade includes a change from an emulator earlier - than OTP R15 to OTP R15 or later, the warning - pre_R15_emulator_upgrade is issued. See Design - Principles for more information about this.

+

If an upgrade includes a change from an emulator earlier + than OTP R15 to OTP R15 or later, the warning + pre_R15_emulator_upgrade is issued. For more information + about this, see + Design + Principles in System Documentation.

By default, errors and warnings are printed to tty and - the function returns ok or error. If the option - silent is provided, the function instead returns - {ok,Relup,Module,Warnings} where Relup is - the release upgrade script, or it returns - {error,Module,Error}. Warnings and errors can be - converted to strings by calling + the function returns ok or error. If option + silent is specified, the function instead either returns + {ok,Relup,Module,Warnings}, where Relup is + the release upgrade file, or {error,Module,Error}. + Warnings and errors can be converted to strings by calling Module:format_warning(Warnings) or Module:format_error(Error).

-

If the option noexec is provided, the function returns +

If option noexec is specified, the function returns the same values as for silent but no relup file is created.

-

If the option warnings_as_errors is provided, warnings - are treated as errors.

+

If option warnings_as_errors is specified, warnings + are treated as errors.

+ make_script(Name) -> Result make_script(Name, [Opt]) -> Result - Generate a boot script .script/.boot. + Generates a boot script .script/.boot. Name = string() Opt = src_tests | {path,[Dir]} | local | {variables,[Var]} | exref | @@ -153,114 +155,117 @@

Generates a boot script Name.script and its binary version, the boot file Name.boot. The boot file - specifies which code should be loaded and which applications - should be started when the Erlang runtime system is started. - See script(4).

-

The release resource file Name.rel is read to find - out which applications are included in the release. Then - the relevant application resource files App.app are - read to find out which modules should be loaded and if and - how the application should be started. (Keys modules - and mod, see app(4)).

-

By default, the boot script and boot file are placed in + specifies which code to be loaded and which applications + to be started when the Erlang runtime system is started. + See script(4).

+

The release resource file Name.rel is read to determine + which applications are included in the release. Then + the relevant application resource files App.app are read + to determine which modules to be loaded, and if and + how the applications are to be started. (Keys modules + and mod, see + app(4).

+

By default, the boot script and boot file are located in the same directory as Name.rel. That is, in the current working directory unless Name contains a path. If - the option {outdir,Dir} is provided, they are placed + option {outdir,Dir} is specified, they are located in Dir instead.

-

The correctness of each application is checked:

+

The correctness of each application is checked as follows:

The version of an application specified in - the .rel file should be the same as the version + the .rel file is to be the same as the version specified in the .app file.

-

There should be no undefined applications, that is, - dependencies to applications which are not included in - the release. (Key applications in .app +

There are to be no undefined applications, that is, + dependencies to applications that are not included in + the release. (Key applications in the .app file).

-

There should be no circular dependencies among +

There are to be no circular dependencies among the applications.

-

There should be no duplicated modules, that is, modules with +

There are to be no duplicated modules, that is, modules with the same name but belonging to different applications.

-

If the src_tests option is specified, a +

If option src_tests is specified, a warning is issued if the source code for a module is - missing or newer than the object code.

+ missing or is newer than the object code.

The applications are sorted according to the dependencies between the applications. Where there are no dependencies, the order in the .rel file is kept.

-

The function will fail if the mandatory - applications kernel and stdlib are not - included in the .rel file and have start - type permanent (default).

-

If sasl is not included as an application in - the .rel file, a warning is emitted because such a - release can not be used in an upgrade. To turn off this - warning, add the option no_warn_sasl.

+

The function fails if the mandatory + applications Kernel and STDLIB are not + included in the .rel file and have start + type permanent (which is default).

+

If SASL is not included as an application in + the .rel file, a warning is issued because such a + release cannot be used in an upgrade. To turn off this + warning, add option no_warn_sasl.

All files are searched for in the current path. It is assumed that the .app and .beam files for an - application is located in the same directory. The .erl + application are located in the same directory. The .erl files are also assumed to be located in this directory, unless - it is an ebin directory in which case they may be + it is an ebin directory in which case they can be located in the corresponding src directory.

-

If the option {path,[Dir]} is provided, this path is +

If option {path,[Dir]} is specified, this path is appended to the current path. A directory in the path can be - given with a wildcard *, this is expanded to all + specified with a wildcard *, this is expanded to all matching directories. Example: "lib/*/ebin".

In the generated boot script all application directories are - structured as App-Vsn/ebin and assumed to be located + structured as App-Vsn/ebin. They are assumed to be located in $ROOT/lib, where $ROOT is the root directory - of the installed release. If the local option is - supplied, the actual directories where the applications were + of the installed release. If option local is + specified, the actual directories where the applications were found are used instead. This is a useful way to test a generated boot script locally.

-

The variables option can be used to specify an +

Option variables can be used to specify an installation directory other than $ROOT/lib for some of the applications. If a variable {VarName,Prefix} is specified and an application is found in a directory - Prefix/Rest/App[-Vsn]/ebin, this application will get + Prefix/Rest/App[-Vsn]/ebin, this application gets the path VarName/Rest/App-Vsn/ebin in the boot script. If an application is found in a directory Prefix/Rest, - the path will be VarName/Rest/App-Vsn/ebin. When + the path is VarName/Rest/App-Vsn/ebin. When starting Erlang, all variables VarName are given - values using the boot_var command line flag.

-

Example: If the option {variables,[{"TEST","lib"}]} is - supplied, and myapp.app is found in - lib/myapp/ebin, then the path to this application in - the boot script will be "$TEST/myapp-1/ebin". If - myapp.app is found in lib/test, then the path - will be $TEST/test/myapp-1/ebin.

+ values using command-line flag boot_var.

+

Example: If option {variables,[{"TEST","lib"}]} + is specified and myapp.app is found in + lib/myapp/ebin, the path to this application in + the boot script is "$TEST/myapp-1/ebin". If + myapp.app is found in lib/test, the path + is $TEST/test/myapp-1/ebin.

The checks performed before the boot script is generated can be extended with some cross reference checks by specifying - the exref option. These checks are performed with + option exref. These checks are performed with the Xref tool. All applications, or the applications specified with {exref,[App]}, are checked by Xref and - warnings are generated for calls to undefined functions.

+ warnings are issued for calls to undefined functions.

By default, errors and warnings are printed to tty and - the function returns ok or error. If the option - silent is provided, the function instead returns + the function returns ok or error. If option + silent is specified, the function instead returns {ok,Module,Warnings} or {error,Module,Error}. Warnings and errors can be converted to strings by calling Module:format_warning(Warnings) or Module:format_error(Error).

-

If the option warnings_as_errors is provided, warnings - are treated as errors.

-

If the option no_dot_erlang is provided, the instruction to - load the .erlang file during boot is NOT included.

+

If option warnings_as_errors is specified, warnings + are treated as errors.

+

If option no_dot_erlang is specified, the instruction to + load the .erlang file during boot is not + included.

+ make_tar(Name) -> Result make_tar(Name, [Opt]) -> Result - Create a release package. + Creates a release package. Name = string() Opt = {dirs,[IncDir]} | {path,[Dir]} | {variables,[Var]} | {var_tar,VarTar} | {erts,Dir} | src_tests | exref | {exref,[App]} | silent | {outdir,Dir} @@ -276,90 +281,91 @@  Warning = Error = term() -

Creates a release package file Name.tar.gz. file. +

Creates a release package file Name.tar.gz. This file must be uncompressed and unpacked on the target - system using the release_handler, before the new - release can be installed.

-

The release resource file Name.rel is read to find out + system using + release_handler + before the new release can be installed.

+

The release resource file Name.rel is read to determine which applications are included in the release. Then the relevant application resource files App.app are - read to find out the version and modules of each application. - (Keys vsn and modules, see app(4)).

-

By default, the release package file is placed in the same + read to determine the version and modules of each application + (keys vsn and modules, see + app(4)).

+

By default, the release package file is located in the same directory as Name.rel. That is, in the current working - directory unless Name contains a path. If the option - {outdir,Dir} is provided, it is placed in Dir + directory unless Name contains a path. If option + {outdir,Dir} is specified, it is located in Dir instead.

By default, the release package contains the directories lib/App-Vsn/ebin and lib/App-Vsn/priv for each - included application. If more directories, the option - dirs is supplied. Example: + included application. If more directories are to be included, + option dirs is specified, for example, {dirs,[src,examples]}.

All these files are searched for in the current path. If - the option {path,[Dir]} is provided, this path is - appended to the current path. The wildcard * is + option {path,[Dir]} is specified, this path is + appended to the current path. Wildcard * is expanded to all matching directories. Example: "lib/*/ebin".

-

The variables option can be used to specify an +

Option variables can be used to specify an installation directory other than lib for some of - the applications. If a variable {VarName,Prefix} is - specified and an application is found in a directory - Prefix/Rest/App[-Vsn]/ebin, this application will be + the applications. If variable {VarName,Prefix} is + specified and an application is found in directory + Prefix/Rest/App[-Vsn]/ebin, this application is packed into a separate VarName.tar.gz file as Rest/App-Vsn/ebin.

-

Example: If the option {variables,[{"TEST","lib"}]} is - supplied, and myapp.app is found in - lib/myapp-1/ebin, the the application myapp is +

Example: If option {variables,[{"TEST","lib"}]} + is specified and myapp.app is located in + lib/myapp-1/ebin, application myapp is included in TEST.tar.gz:

 % tar tf TEST.tar
 myapp-1/ebin/myapp.app
-...
-        
-

The {var_tar,VarTar} option can be used to specify if - and where a separate package should be stored. In this option, - VarTar is:

- - -

include. Each separate (variable) package is - included in the main ReleaseName.tar.gz file. This - is the default.

-
- -

ownfile. Each separate (variable) package is - generated as separate files in the same directory as - the ReleaseName.tar.gz file.

-
- -

omit. No separate (variable) packages are - generated and applications which are found underneath a - variable directory are ignored.

-
-
-

A directory called releases is also included in +... +

Option {var_tar,VarTar} can be used to specify if + and where a separate package is to be stored. In this option + VarTar is one of the following:

+ + include +

Each separate (variable) package is included in the + main ReleaseName.tar.gz file. This is the + default.

+ ownfile +

Each separate (variable) package is + generated as a separate file in the same directory as + the ReleaseName.tar.gz file.

+ omit +

No separate (variable) packages are + generated. Applications that are found underneath a + variable directory are ignored.

+
+

A directory releases is also included in the release package, containing Name.rel and a - subdirectory called RelVsn. RelVsn is + subdirectory RelVsn. RelVsn is the release version as specified in Name.rel.

releases/RelVsn contains the boot script Name.boot renamed to start.boot and, if found, the files relup and sys.config. These files are searched for in the same directory as Name.rel, in the current working directory, and in any directories - specified using the path option.

-

If the release package should contain a new Erlang runtime + specified using option path.

+

If the release package is to contain a new Erlang runtime system, the bin directory of the specified runtime system {erts,Dir} is copied to erts-ErtsVsn/bin.

-

All checks performed with the make_script function - are performed before the release package is created. The - src_tests and exref options are also +

All checks with function + make_script + are performed before the release package is created. + Options src_tests and exref are also valid here.

The return value and the handling of errors and warnings - are the same as described for make_script above.

+ are the same as described for + make_script.

+ script2boot(File) -> ok | error - Generate a binary version of a boot script. + Generates a binary version of a boot script. File = string() @@ -367,17 +373,24 @@ myapp-1/ebin/myapp.app

The Erlang runtime system requires that the contents of the script used to boot the system is a binary Erlang term. This function transforms the File.script boot script - to a binary term which is stored in the file File.boot.

-

A boot script generated using the make_script - function is already transformed to the binary form.

+ to a binary term, which is stored in the File.boot + file.

+

A boot script generated using + make_script + is already transformed to the binary form.

- SEE ALSO -

app(4), appup(4), erl(1), rel(4), release_handler(3), relup(4), - script(4)

+ See Also +

app(4), + appup(4), + erl(1), + rel(4), + release_handler(3), + relup(4), + script(4)

-- cgit v1.2.3 From 4b45171ef63418a1739238e68d9a95abe14d93fd Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 11 Dec 2015 12:23:42 +0100 Subject: Update appups in kernel, stdlib and sasl for OTP-18.2 --- lib/sasl/src/sasl.appup.src | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index 2c8812f566..8faa0afbd4 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -18,9 +18,9 @@ %% %CopyrightEnd% {"%VSN%", %% Up from - max one major revision back - [{<<"2\\.5(\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.0.* - {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}], % OTP-17 + [{<<"2\\.[5-6](\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.* + {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}], % OTP-17 %% Down to - max one major revision back - [{<<"2\\.5(\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.0.* - {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}] % OTP-17 + [{<<"2\\.[5-6](\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.* + {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}] % OTP-17 }. -- cgit v1.2.3 From 4586435cd4ca0d3ad3aedd60f462aed8da589460 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 15 Dec 2015 09:43:08 +0100 Subject: Update version numbers --- lib/sasl/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index 959d9c88d5..cb454d5331 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.6 +SASL_VSN = 2.6.1 -- cgit v1.2.3 From f4a0ae1736216feac5ae053610644bba2e12ed34 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 15 Dec 2015 09:45:27 +0100 Subject: Update release notes --- lib/sasl/doc/src/notes.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 5945ef6490..537511a865 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,6 +31,21 @@

This document describes the changes made to the SASL application.

+
SASL 2.6.1 + +
Improvements and New Features + + +

+ Documentation improvements

+

+ Own Id: OTP-13000

+
+
+
+ +
+
SASL 2.6
Improvements and New Features -- cgit v1.2.3 From a42724e6740df6290ec7f7dceb09db4f217697d8 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 13 Jan 2016 15:13:02 +0100 Subject: Deprecate module 'overload' in SASL The module is deprected and will be removed in OTP 19. The reason is that the module is not used, and that we se no obvious use case for it. --- lib/sasl/doc/src/overload.xml | 6 ++++++ lib/sasl/doc/src/sasl_app.xml | 6 +++++- lib/sasl/src/overload.erl | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/overload.xml b/lib/sasl/doc/src/overload.xml index 5c3d00afeb..2f19cd9088 100644 --- a/lib/sasl/doc/src/overload.xml +++ b/lib/sasl/doc/src/overload.xml @@ -35,6 +35,12 @@ overload An Overload Regulation Process + +

+ All functions in this module are deprecated and will be + removed in a future release. +

+

overload is a process that indirectly regulates the CPU usage in the system. The idea is that a main application calls function diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml index 8d79251c7e..bcd446a868 100644 --- a/lib/sasl/doc/src/sasl_app.xml +++ b/lib/sasl/doc/src/sasl_app.xml @@ -34,7 +34,7 @@

The SASL application provides the following services:

alarm_handler - overload + overload (deprecated) rb release_handler systools @@ -145,11 +145,15 @@

Specifies the maximum intensity for overload. Default is 0.8.

+

Note that the overload module is deprected and + will be removed in a future release.

0 ]]>

Specifies the overload weight. Default is 0.1.

+

Note that the overload module is deprected and + will be removed in a future release.

diff --git a/lib/sasl/src/overload.erl b/lib/sasl/src/overload.erl index 61b925d219..bc8ab7d5e4 100644 --- a/lib/sasl/src/overload.erl +++ b/lib/sasl/src/overload.erl @@ -19,6 +19,8 @@ %% -module(overload). +-deprecated(module). + -export([start_link/0, request/0, set_config_data/2, get_overload_info/0]). -- cgit v1.2.3 From ebe42ec76748546f464076d8cf5d1238a56baf91 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 15 Dec 2015 16:37:10 +0100 Subject: erts: Introduce erts_code_purger as a system process with preloaded code. --- lib/sasl/src/systools_make.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index 8132034172..d207dc15bb 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -1469,7 +1469,9 @@ mandatory_modules() -> preloaded() -> %% Sorted - [erl_prim_loader,erlang,erts_internal,init,otp_ring0,prim_eval,prim_file, + [erl_prim_loader,erlang, + erts_code_purger, + erts_internal,init,otp_ring0,prim_eval,prim_file, prim_inet,prim_zip,zlib]. %%______________________________________________________________________ -- cgit v1.2.3 From 9bd516dd7e3950f80768030b0e975be4bb1b1648 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 1 Sep 2015 16:41:03 +0100 Subject: Fix noproc crash during release installation When release_handler_1:get_supervised_procs/0 does a recursive walk of the supervision tree, it calls sys:get_status/1 on supervisors, to check if they are suspended or running. This fixes a race condition where a list of supervisor pids is gathered, one of them (legitimately) exits before release_handler can examine it, then sys:get_status/1 is called with a dead pid, causing an exit(noproc) See: http://erlang.org/pipermail/erlang-questions/2015-August/085712.html (To recreate this problem for testing, I added a timer:sleep into the release_handler_1 code, and killed a supervisor during get_supervised_procs being called). --- lib/sasl/src/release_handler_1.erl | 67 +++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 23 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/release_handler_1.erl b/lib/sasl/src/release_handler_1.erl index 536ac924d4..5e9a35ab4c 100644 --- a/lib/sasl/src/release_handler_1.erl +++ b/lib/sasl/src/release_handler_1.erl @@ -587,12 +587,12 @@ get_supervised_procs() -> get_application_names()). get_supervised_procs(_, Root, Procs, {ok, SupMod}) -> - get_procs(maybe_supervisor_which_children(get_proc_state(Root), SupMod, Root), Root) ++ + get_procs(maybe_supervisor_which_children(Root, SupMod, Root), Root) ++ [{undefined, undefined, Root, [SupMod]} | Procs]; get_supervised_procs(Application, Root, Procs, {error, _}) -> error_logger:error_msg("release_handler: cannot find top supervisor for " "application ~w~n", [Application]), - get_procs(maybe_supervisor_which_children(get_proc_state(Root), Application, Root), Root) ++ Procs. + get_procs(maybe_supervisor_which_children(Root, Application, Root), Root) ++ Procs. get_application_names() -> lists:map(fun({Application, _Name, _Vsn}) -> @@ -613,33 +613,54 @@ get_procs([{Name, Pid, worker, Mods} | T], Sup) when is_pid(Pid), is_list(Mods) [{Sup, Name, Pid, Mods} | get_procs(T, Sup)]; get_procs([{Name, Pid, supervisor, Mods} | T], Sup) when is_pid(Pid) -> [{Sup, Name, Pid, Mods} | get_procs(T, Sup)] ++ - get_procs(maybe_supervisor_which_children(get_proc_state(Pid), Name, Pid), Pid); + get_procs(maybe_supervisor_which_children(Pid, Name, Pid), Pid); get_procs([_H | T], Sup) -> get_procs(T, Sup); get_procs(_, _Sup) -> []. +maybe_supervisor_which_children(Proc, Name, Pid) -> + case get_proc_state(Proc) of + noproc -> + %% process exited before we could interrogate it. + %% not necessarily a bug, but reporting a warning as a curiosity. + error_logger:warning_msg("release_handler: a process (~p) exited" + " during supervision tree interrogation." + " Continuing ...~n", [Proc]), + []; + + suspended -> + error_logger:error_msg("release_handler: a which_children call" + " to ~p (~w) was avoided. This supervisor" + " is suspended and should likely be upgraded" + " differently. Exiting ...~n", [Name, Pid]), + error(suspended_supervisor); + + running -> + case catch supervisor:which_children(Pid) of + Res when is_list(Res) -> + Res; + Other -> + error_logger:error_msg("release_handler: ~p~nerror during" + " a which_children call to ~p (~w)." + " [State: running] Exiting ... ~n", + [Other, Name, Pid]), + error(which_children_failed) + end + end. + get_proc_state(Proc) -> - {status, _, {module, _}, [_, State, _, _, _]} = sys:get_status(Proc), - State. - -maybe_supervisor_which_children(suspended, Name, Pid) -> - error_logger:error_msg("release_handler: a which_children call" - " to ~p (~w) was avoided. This supervisor" - " is suspended and should likely be upgraded" - " differently. Exiting ...~n", [Name, Pid]), - error(suspended_supervisor); - -maybe_supervisor_which_children(State, Name, Pid) -> - case catch supervisor:which_children(Pid) of - Res when is_list(Res) -> - Res; - Other -> - error_logger:error_msg("release_handler: ~p~nerror during" - " a which_children call to ~p (~w)." - " [State: ~p] Exiting ... ~n", - [Other, Name, Pid, State]), - error(which_children_failed) + %% sys:send_system_msg can exit with {noproc, {m,f,a}}. + %% This happens if a supervisor exits after which_children has provided + %% its pid for interrogation. + %% ie. Proc may no longer be running at this point. + try sys:get_status(Proc) of + %% as per sys:get_status/1, SysState can only be running | suspended. + {status, _, {module, _}, [_, State, _, _, _]} when State == running ; + State == suspended -> + State + catch exit:{noproc, {sys, get_status, [Proc]}} -> + noproc end. maybe_get_dynamic_mods(Name, Pid) -> -- cgit v1.2.3 From 4422cb32637a341eac2dc03172e4aa859be67f34 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 3 Feb 2016 12:10:06 +0100 Subject: Add supervisor:get_callback_module/1 This function is used by release_handler during upgrade. This was earlier implemented in the release_handler, but it required a copy og the definition of the supervisor's internal state, which caused problems when this state was updated. --- lib/sasl/src/release_handler_1.erl | 33 ++------------------------------- lib/sasl/src/sasl.app.src | 2 +- 2 files changed, 3 insertions(+), 32 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/release_handler_1.erl b/lib/sasl/src/release_handler_1.erl index 536ac924d4..86e3bddc1c 100644 --- a/lib/sasl/src/release_handler_1.erl +++ b/lib/sasl/src/release_handler_1.erl @@ -655,48 +655,19 @@ maybe_get_dynamic_mods(Name, Pid) -> error(get_modules_failed) end. -%% XXXX -%% Note: The following is a terrible hack done in order to resolve the -%% problem stated in ticket OTP-3452. - -%% XXXX NOTE WELL: This record is from supervisor.erl. Also the record -%% name is really `state'. --record(supervisor_state, {name, - strategy, - children = [], - dynamics = [], - intensity, - period, - restarts = [], - module, - args}). - %% Return the name of the call-back module that implements the %% (top) supervisor SupPid. %% Returns: {ok, Module} | {error,undefined} %% get_supervisor_module(SupPid) -> - case catch get_supervisor_module1(SupPid) of - {ok, Module} when is_atom(Module) -> + case catch supervisor:get_callback_module(SupPid) of + Module when is_atom(Module) -> {ok, Module}; _Other -> io:format("~w: reason: ~w~n", [SupPid, _Other]), {error, undefined} end. -get_supervisor_module1(SupPid) -> - {status, _Pid, {module, _Mod}, - [_PDict, _SysState, _Parent, _Dbg, Misc]} = sys:get_status(SupPid), - %% supervisor Misc field changed at R13B04, handle old and new variants here - State = case Misc of - [_Name, State1, _Type, _Time] -> - State1; - [_Header, _Data, {data, [{"State", State2}]}] -> - State2 - end, - %% Cannot use #supervisor_state{module = Module} = State. - {ok, element(#supervisor_state.module, State)}. - %%----------------------------------------------------------------- %% Func: do_soft_purge/3 %% Args: Mod = atom() diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src index 705bb73fc5..507e2dc229 100644 --- a/lib/sasl/src/sasl.app.src +++ b/lib/sasl/src/sasl.app.src @@ -46,6 +46,6 @@ {env, [{sasl_error_logger, tty}, {errlog_type, all}]}, {mod, {sasl, []}}, - {runtime_dependencies, ["tools-2.6.14","stdlib-2.6","kernel-4.1", + {runtime_dependencies, ["tools-2.6.14","stdlib-2.8","kernel-4.1", "erts-6.0"]}]}. -- cgit v1.2.3 From 264a5e804d6e23bf6c6916887669760cbf243caa Mon Sep 17 00:00:00 2001 From: Rory Byrne Date: Thu, 28 May 2015 19:41:25 +0100 Subject: Speed up supervisor:count_children/1; simple_one_for_one Speed up supervisor:count_children/1 for simple_one_for_one supervisors. This is achieved by avoiding looping through all the child process and verifying that each one is alive. For a supervisor with 100,000 'temporary' children the count-time will drop from approx 25ms to about 0.005ms. For a supervisor with 100,000 'permanent' or 'transient' children the count-time will drop from approx 30ms to about 0.005ms. This avoids having the supervisor block for an extended period while the count takes place. Under normal circumstances the accuracy of the result should also improve since the duration is too short for many processes to die during the count. --- lib/sasl/test/release_handler_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index d57de2593a..ee620dcdb4 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1363,7 +1363,7 @@ upgrade_supervisor(Conf) when is_list(Conf) -> %% Check that the restart strategy and child spec is updated {status, _, {module, _}, [_, _, _, _, [_,_,{data,[{"State",State}]}]]} = rpc:call(Node,sys,get_status,[a_sup]), - {state,_,RestartStrategy,[Child],_,_,_,_,_,_} = State, + {state,_,RestartStrategy,[Child],_,_,_,_,_,_,_} = State, one_for_all = RestartStrategy, % changed from one_for_one {child,_,_,_,_,brutal_kill,_,_} = Child, % changed from timeout 2000 -- cgit v1.2.3 From 03fcb7dabf8861e60ffab4121a909b347bccfec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 15 Feb 2016 15:33:12 +0100 Subject: Eliminate use of test_server.hrl and test_server_line.hrl As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl. --- lib/sasl/test/sasl_report_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/sasl_report_SUITE.erl b/lib/sasl/test/sasl_report_SUITE.erl index 940234f152..7469ec4d46 100644 --- a/lib/sasl/test/sasl_report_SUITE.erl +++ b/lib/sasl/test/sasl_report_SUITE.erl @@ -24,7 +24,7 @@ -export([crash_me/0,start_link/0,init/1,handle_cast/2,terminate/2]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). suite() -> [{ct_hooks,[ts_install_cth]}]. -- cgit v1.2.3 From 4e1162bbdf88465a03da165c088ad1256b816956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 15 Feb 2016 16:04:32 +0100 Subject: Makefiles: Remove test_server from include path and code path Since no test suites includede test_server.hrl, there is no need to have test_server in the include path or code path. --- lib/sasl/test/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/Makefile b/lib/sasl/test/Makefile index 86976def6a..6f67498714 100644 --- a/lib/sasl/test/Makefile +++ b/lib/sasl/test/Makefile @@ -55,8 +55,7 @@ RELSYSDIR = $(RELEASE_PATH)/sasl_test # FLAGS # ---------------------------------------------------- ERL_MAKE_FLAGS += -ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include \ - -I$(ERL_TOP)/lib/sasl/src +ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/sasl/src EBIN = . -- cgit v1.2.3 From 851f29e7eb906ffbd1a2871eaae6f5038728d763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 16 Feb 2016 12:24:54 +0100 Subject: Remove out-commented references to the test_server applications Cleanliness. --- lib/sasl/test/systools_rc_SUITE.erl | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/systools_rc_SUITE.erl b/lib/sasl/test/systools_rc_SUITE.erl index 3754ed99f2..2ecb6f107a 100644 --- a/lib/sasl/test/systools_rc_SUITE.erl +++ b/lib/sasl/test/systools_rc_SUITE.erl @@ -26,10 +26,6 @@ translate_emulator_restarts/1, translate_add_delete_module/1]). -%%----------------------------------------------------------------- -%% erl -compile systools_rc_SUITE @i ../src/ @i ../../test_server/include/ -%% c(systools_rc_SUITE, [{i, "../src"}, {i, "../../test_server/include"}]). -%%----------------------------------------------------------------- all() -> [syntax_check, translate, translate_app, translate_emulator_restarts, translate_add_delete_module]. -- cgit v1.2.3 From c56cdb91d057cdb40bb79d4f49e88966c0244017 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 19 Feb 2016 12:00:47 +0100 Subject: Remove module 'overload' from SASL The reason is that the module is not used, and that we se no obvious use case for it. --- lib/sasl/doc/src/Makefile | 1 - lib/sasl/doc/src/overload.xml | 152 ------------------------- lib/sasl/doc/src/ref_man.xml | 1 - lib/sasl/doc/src/sasl_app.xml | 17 --- lib/sasl/doc/src/sasl_intro.xml | 1 - lib/sasl/src/Makefile | 2 +- lib/sasl/src/misc_supp.erl | 2 +- lib/sasl/src/overload.erl | 233 --------------------------------------- lib/sasl/src/sasl.app.src | 3 +- lib/sasl/src/sasl.erl | 5 +- lib/sasl/test/Makefile | 1 - lib/sasl/test/overload_SUITE.erl | 168 ---------------------------- 12 files changed, 4 insertions(+), 582 deletions(-) delete mode 100644 lib/sasl/doc/src/overload.xml delete mode 100644 lib/sasl/src/overload.erl delete mode 100644 lib/sasl/test/overload_SUITE.erl (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/Makefile b/lib/sasl/doc/src/Makefile index 1ee48af338..a66b1f8bcb 100644 --- a/lib/sasl/doc/src/Makefile +++ b/lib/sasl/doc/src/Makefile @@ -36,7 +36,6 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) # ---------------------------------------------------- XML_APPLICATION_FILES = ref_man.xml XML_REF3_FILES = alarm_handler.xml \ - overload.xml \ rb.xml \ release_handler.xml \ systools.xml diff --git a/lib/sasl/doc/src/overload.xml b/lib/sasl/doc/src/overload.xml deleted file mode 100644 index 2f19cd9088..0000000000 --- a/lib/sasl/doc/src/overload.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - -
- - 19962013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - overload - Peter Högfeldt - Peter Högfeldt - - (Joe Armstrong) - - 1996-10-29 - A - overload.sgml -
- overload - An Overload Regulation Process - - -

- All functions in this module are deprecated and will be - removed in a future release. -

-
-

overload is a process that indirectly regulates the CPU - usage in the system. The idea is that a main application calls - function - request/0 - before starting a major job and - proceeds with the job if the return value is positive; otherwise - the job must not be started.

-

overload is part of the SASL application and all - configuration parameters are defined there.

-

A set of two intensities are maintained, the total intensity - and the accept intensity. For that purpose, - there are two configuration parameters, MaxIntensity - and Weight; both are measured in 1/second.

-

Then total and accept intensities are calculated as - follows. Assume that the time of the current call to - request/0 is T(n) and that the time of the - previous call was T(n-1).

- - -

The current total intensity, denoted - TI(n), is calculated according to the formula

-

TI(n) = exp(-Weight*(T(n) - T(n-1)) * TI(n-1) + Weight,

-

where TI(n-1) is the previous total intensity.

-
- -

The current accept intensity, denoted - AI(n), is determined by the formula

-

AI(n) = exp(-Weight*(T(n) - T(n-1)) * AI(n-1) + Weight,

-

where AI(n-1) is the previous accept intensity, - if the value of exp(-Weight*(T(n) - T(n-1)) * AI(n-1) - is less than MaxIntensity. Otherwise the value is

-

AI(n) = exp(-Weight*(T(n) - T(n-1)) * AI(n-1)

-
-
-

The value of configuration parameter Weight controls the - speed with which the calculations of intensities react to - changes in the underlying input intensity. The inverted value of - Weight, T = 1/Weight, can be thought of as the - "time constant" of the intensity calculation formulas. For example, - if Weight = 0.1, a change in the underlying input intensity is - reflected in total intensity and accept intensity within - about 10 seconds.

-

The overload process defines one alarm, which it sets using - alarm_handler:set_alarm(Alarm). Alarm is defined - as follows:

- - {overload, []} - -

This alarm is set when the current accept intensity exceeds - MaxIntensity.

-
-
-

A new request is not accepted until the current accept - intensity has fallen below MaxIntensity. To prevent the - overload process from generating many set/reset alarms, the - alarm is not reset until the current accept intensity has fallen - below 75% of MaxIntensity; it is not until then that - the alarm can be set again.

-
- - - - request() -> accept | reject - Requests to proceed with current job. - -

Returns accept or reject depending on the - current value of the accept intensity.

-

The application - calling this function is to proceed with the job in - question if the return value is accept; otherwise it - is not to continue with that job.

-
-
- - - get_overload_info() -> OverloadInfo - Returns current overload information data. - - OverloadInfo = [{total_intensity, TotalIntensity}, - {accept_intensity, AcceptIntensity}, {max_intensity, - MaxIntensity}, {weight, Weight}, {total_requests, - TotalRequests}, {accepted_requests, AcceptedRequests}]. - TotalIntensity = float() > 0 - AcceptIntensity = float() > 0 - MaxIntensity = float() > 0 - Weight = float() > 0 - TotalRequests = integer() - AcceptedRequests = integer() - - -

Returns:

- - Current total and accept intensities - Configuration parameters - Absolute counts of the total number of requests - Accepted number of requests (since the overload - process was started) - -
-
-
- -
- See Also -

alarm_handler(3), - sasl(6)

-
-
- diff --git a/lib/sasl/doc/src/ref_man.xml b/lib/sasl/doc/src/ref_man.xml index a80e5a2a00..74cd92a9b0 100644 --- a/lib/sasl/doc/src/ref_man.xml +++ b/lib/sasl/doc/src/ref_man.xml @@ -35,7 +35,6 @@
- diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml index bcd446a868..044c016302 100644 --- a/lib/sasl/doc/src/sasl_app.xml +++ b/lib/sasl/doc/src/sasl_app.xml @@ -34,7 +34,6 @@

The SASL application provides the following services:

alarm_handler - overload (deprecated) rb release_handler systools @@ -140,21 +139,6 @@ this parameter is undefined, the log_mf_h handler is not installed.

- 0 ]]> - -

Specifies the maximum intensity - for overload. Default - is 0.8.

-

Note that the overload module is deprected and - will be removed in a future release.

-
- 0 ]]> - -

Specifies the overload - weight. Default is 0.1.

-

Note that the overload module is deprected and - will be removed in a future release.

-

Specifies the program to be used when restarting the system @@ -205,7 +189,6 @@

alarm_handler(3), error_logger(3), log_mf_h(3), - overload(3), rb(3), release_handler(3), systools(3)

diff --git a/lib/sasl/doc/src/sasl_intro.xml b/lib/sasl/doc/src/sasl_intro.xml index bbc9457103..237580977c 100644 --- a/lib/sasl/doc/src/sasl_intro.xml +++ b/lib/sasl/doc/src/sasl_intro.xml @@ -36,7 +36,6 @@ Error logging Alarm handling - Overload regulation Release handling Report browsing diff --git a/lib/sasl/src/Makefile b/lib/sasl/src/Makefile index 7ff6a03a50..92d4818f2e 100644 --- a/lib/sasl/src/Makefile +++ b/lib/sasl/src/Makefile @@ -36,7 +36,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/sasl-$(VSN) # ---------------------------------------------------- MODULES= alarm_handler sasl sasl_report \ sasl_report_file_h sasl_report_tty_h format_lib_supp \ - misc_supp overload rb rb_format_supp release_handler \ + misc_supp rb rb_format_supp release_handler \ release_handler_1 si si_sasl_supp systools \ systools_make systools_rc systools_relup systools_lib \ erlsrv diff --git a/lib/sasl/src/misc_supp.erl b/lib/sasl/src/misc_supp.erl index 42de7eedec..39656f6e65 100644 --- a/lib/sasl/src/misc_supp.erl +++ b/lib/sasl/src/misc_supp.erl @@ -27,7 +27,7 @@ %%% 2) Very generic functions such as, multi_map, is_string... %%% %%% This module is a part of the BOS. (format_pdict is called from -%%% init, memsup, disksup, overload (but not the fileserver since it +%%% init, memsup, disksup (but not the fileserver since it %%% formats its pdict its own way).) %%%--------------------------------------------------------------------- diff --git a/lib/sasl/src/overload.erl b/lib/sasl/src/overload.erl deleted file mode 100644 index bc8ab7d5e4..0000000000 --- a/lib/sasl/src/overload.erl +++ /dev/null @@ -1,233 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% --module(overload). - --deprecated(module). - --export([start_link/0, request/0, set_config_data/2, - get_overload_info/0]). - --export([init/1, handle_call/3, handle_info/2, terminate/2, - format_status/2]). - -%%%----------------------------------------------------------------- -%%% This is a rewrite of overload from BS.3, by Peter Högfeldt. -%%% -%%% DESCRIPTION -%%% -%%% This module implements a server process that keeps record of the -%%% intensity of calls of the request/0 function, and answers accept or -%%% reject depending on if the current average intensity is not greater -%%% than a specified maximum intensity. -%%% -%%% The intensity i is calculated according to the formula: -%%% i(n) = exp(-K*(T(n) - T(n-1)))*i(n-1) + Kappa -%%% where i(n) is the intensity at event n, Kappa is a constant, and -%%% T(n) is the time at event n. -%%% -%%% The constant Kappa can be thought of as 1 / T, where T is the time -%%% constant. Kappa is externally referred to as Weight. -%%% -%%% We keep track of two intensities: the total call intensity and the -%%% intensity of accepted calls. -%%%----------------------------------------------------------------- -%%% TODO -%%% -%%% 3. Hysteresis. -%%% -%%%----------------------------------------------------------------- - --record(state, {total = 0, accept = 0, max, prev_t = get_now(), - kappa, call_counts = {0, 0}, alarm = clear}). - --define(clear_timeout, 30000). - -start_link() -> - gen_server:start_link({local, overload}, overload, [], []). - -init([]) -> - process_flag(priority, high), - MaxIntensity = fetch_config_data(overload_max_intensity), - Kappa = fetch_config_data(overload_weight), - {ok, #state{max = MaxIntensity, kappa = Kappa}}. - -%%----------------------------------------------------------------- -%% Func: request/0 -%% Purpose: This is a request to proceed, e.g. a request to -%% establish a call. -%% Returns: accept | reject -%%----------------------------------------------------------------- -request() -> call(request). - -%%----------------------------------------------------------------- -%% Func: set_config_data/2 -%% Purpose: Set configuration data, and reset intensities. -%% Arguments: MaxIntensity (real > 0), Weight (real > 0). -%% Returns: ok | {error, What} -%% This function is for debugging purposes and is therefore not -%% documented at all. -%%----------------------------------------------------------------- -set_config_data(MaxIntensity, Weight) -> - call({set_config_data, MaxIntensity, Weight}). -%%----------------------------------------------------------------- -%% Func: get_overload_info/0 -%% Returns: A list of tagged items: TotalIntensity, AcceptIntensity, -%% MaxIntensity, Weight, TotalRequests, AcceptedRequests. -%%----------------------------------------------------------------- -get_overload_info() -> call(get_overload_info). - -%%----------------------------------------------------------------- -%% call(Request) -> Term -%%----------------------------------------------------------------- -call(Req) -> - gen_server:call(overload, Req, infinity). - -%%%----------------------------------------------------------------- -%%% Callback functions from gen_server -%%%----------------------------------------------------------------- -handle_call(request, _From, State) -> - #state{total = TI, accept = AI, kappa = Kappa, prev_t = PrevT, - alarm = Alarm} = State, - {TR, AR} = State#state.call_counts, - T = get_now(), - CurI = new_intensity(AI, T, PrevT, Kappa), - NewTI = new_intensity(TI, T, PrevT, Kappa) + Kappa, - if - CurI =< State#state.max -> - %% Hysteresis: If alarm is set, and current intensity has - %% fallen below 75% of max intensity, clear alarm. - NewAlarm = if - CurI =< 0.75*State#state.max -> - clear_alarm(Alarm); - true -> - Alarm - end, - {reply, accept, State#state{call_counts = {TR+1, AR+1}, - prev_t = T, total = NewTI, - accept = CurI + Kappa, - alarm = NewAlarm}, - ?clear_timeout}; - true -> - %% Set alarm if not already set. - NewAlarm = set_alarm(Alarm), - {reply, reject, - State#state{call_counts = {TR+1, AR}, prev_t = T, - total = NewTI, accept = CurI, - alarm = NewAlarm}, - ?clear_timeout} - end; -handle_call({set_config_data, MaxIntensity, Weight}, _From, _State) -> - {reply, ok, #state{max = MaxIntensity, kappa = Weight}, - ?clear_timeout}; -handle_call(get_overload_info, _From, State) -> - #state{max = MI, total = TI, accept = AI, kappa = Kappa, - prev_t = PrevT, call_counts = {TR, AR}} = State, - T = get_now(), - CurI = new_intensity(AI, T, PrevT, Kappa), - NewTI = new_intensity(TI, T, PrevT, Kappa), - Reply = [{total_intensity, NewTI}, {accept_intensity, CurI}, - {max_intensity, MI}, {weight, Kappa}, - {total_requests, TR}, {accepted_requests, AR}], - {reply, Reply, State#state{total = NewTI, accept = CurI}, - ?clear_timeout}. - -handle_info(timeout, State) -> - #state{total = TI, accept = AI, kappa = Kappa, prev_t = PrevT, - alarm = Alarm} = State, - T = get_now(), - CurI = new_intensity(AI, T, PrevT, Kappa), - NewTI = new_intensity(TI, T, PrevT, Kappa), - if - CurI < 0.75* State#state.max -> - NewAlarm = clear_alarm(Alarm), - {noreply, State#state{total = NewTI, accept = CurI, - alarm = NewAlarm}}; - - true -> - {noreply, State#state{total = NewTI, accept = CurI}, - ?clear_timeout} - end; - -handle_info(_, State) -> - {noreply, State, ?clear_timeout}. - -terminate(_Reason, _State) -> - ok. - -%%----------------------------------------------------------------- -%% Internal functions -%%----------------------------------------------------------------- -fetch_config_data(Tag) -> - case application:get_env(sasl, Tag) of - {ok, Value} -> Value; - _ -> fetch_default_data(Tag) - end. - -fetch_default_data(overload_max_intensity) -> 0.8; -fetch_default_data(overload_weight) -> 0.1. - -set_alarm(clear) -> - alarm_handler:set_alarm({overload, []}), - set; -set_alarm(Alarm) -> - Alarm. - -clear_alarm(set) -> - alarm_handler:clear_alarm(overload), - clear; -clear_alarm(Alarm) -> - Alarm. - -%%----------------------------------------------------------------- -%% The catch protects against floating-point exception. -%% -new_intensity(I, T, PrevT, K) -> - Diff = sub(T, PrevT)/1000, - case catch (I*math:exp(-K*Diff)) of - {'EXIT', _} -> % Assume zero. - 0.0; - Res -> - Res - end. - -%% Mask equal to 2^27 - 1, used below. --define(mask27, 16#7ffffff). - -%% Returns number of milliseconds in the range [0, 2^27 - 1]. Must have -%% this since statistics(wall_clock) wraps. Having 2^27 -1 as the max -%% assures that we always get non-negative integers. 2^27 milliseconds -%% are approx. 37.28 hours. -get_now() -> - element(1, statistics(wall_clock)) band ?mask27. - -%% Returns (X - Y) mod 2^27 (which is in the range [0, 2^27 - 1]). -sub(X, Y) -> - (X + (bnot Y) + 1) band ?mask27. - -format_status(Opt, [PDict, #state{max = MI, total = TI, accept = AI, - kappa = K, - call_counts = {TR, AR}}]) -> - [{data, [{"Total Intensity", TI}, - {"Accept Intensity", AI}, - {"Max Intensity", MI}, - {"Weight", K}, - {"Total requests", TR}, - {"Accepted requests", AR}]} | - misc_supp:format_pdict(Opt, PDict, [])]. diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src index 507e2dc229..16e8e44ba2 100644 --- a/lib/sasl/src/sasl.app.src +++ b/lib/sasl/src/sasl.app.src @@ -24,7 +24,6 @@ alarm_handler, format_lib_supp, misc_supp, - overload, rb, rb_format_supp, release_handler, @@ -41,7 +40,7 @@ systools_relup, systools_lib ]}, - {registered, [sasl_sup, alarm_handler, overload, release_handler]}, + {registered, [sasl_sup, alarm_handler, release_handler]}, {applications, [kernel, stdlib]}, {env, [{sasl_error_logger, tty}, {errlog_type, all}]}, diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl index fc49fc2465..0fb85682c6 100644 --- a/lib/sasl/src/sasl.erl +++ b/lib/sasl/src/sasl.erl @@ -170,7 +170,4 @@ init(safe) -> AlarmH = {alarm_handler, {alarm_handler, start_link, []}, permanent, 2000, worker, dynamic}, - Overload = {overload, - {overload, start_link, []}, - permanent, 2000, worker, [overload]}, - {ok, {SupFlags, [AlarmH, Overload]}}. + {ok, {SupFlags, [AlarmH]}}. diff --git a/lib/sasl/test/Makefile b/lib/sasl/test/Makefile index 6f67498714..2e9e107efd 100644 --- a/lib/sasl/test/Makefile +++ b/lib/sasl/test/Makefile @@ -33,7 +33,6 @@ MODULES= \ sasl_report_suite_supervisor \ systools_SUITE \ systools_rc_SUITE \ - overload_SUITE \ rb_SUITE \ rh_test_lib \ diff --git a/lib/sasl/test/overload_SUITE.erl b/lib/sasl/test/overload_SUITE.erl deleted file mode 100644 index 02d1056698..0000000000 --- a/lib/sasl/test/overload_SUITE.erl +++ /dev/null @@ -1,168 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2011. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% - --module(overload_SUITE). --include_lib("common_test/include/ct.hrl"). - --compile(export_all). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -all() -> [info, set_config_data, set_env_vars, request, timeout]. - -init_per_testcase(_Case,Config) -> - restart_sasl(), - Config. - -end_per_testcase(Case,Config) -> - try apply(?MODULE,Case,[cleanup,Config]) - catch error:undef -> ok - end, - ok. - -%%%----------------------------------------------------------------- -info(_Config) -> - Info = overload:get_overload_info(), - [{total_intensity,0.0}, - {accept_intensity,0.0}, - {max_intensity,0.8}, - {weight,0.1}, - {total_requests,0}, - {accepted_requests,0}] = Info. - -%%%----------------------------------------------------------------- -set_config_data(_Config) -> - InfoDefault = overload:get_overload_info(), - ok = check_info(0.8,0.1,InfoDefault), - ok = overload:set_config_data(0.5,0.4), - Info1 = overload:get_overload_info(), - ok = check_info(0.5,0.4,Info1), - ok. - -%%%----------------------------------------------------------------- -set_env_vars(_Config) -> - InfoDefault = overload:get_overload_info(), - ok = check_info(0.8,0.1,InfoDefault), - ok = application:set_env(sasl,overload_max_intensity,0.5), - ok = application:set_env(sasl,overload_weight,0.4), - ok = application:stop(sasl), - ok = application:start(sasl), - Info1 = overload:get_overload_info(), - ok = check_info(0.5,0.4,Info1), - ok. -set_env_vars(cleanup,_Config) -> - application:unset_env(sasl,overload_max_intensity), - application:unset_env(sasl,overload_weight), - ok. - -%%%----------------------------------------------------------------- -request(_Config) -> - %% Find number of request that can be done with default settings - %% and no delay - overload:set_config_data(0.8, 0.1), - NDefault = do_many_requests(0), - restart_sasl(), - ?t:format("NDefault: ~p",[NDefault]), - - %% Check that the number of requests increases when max_intensity - %% increases - overload:set_config_data(2, 0.1), - NLargeMI = do_many_requests(0), - restart_sasl(), - ?t:format("NLargeMI: ~p",[NLargeMI]), - true = NLargeMI > NDefault, - - %% Check that the number of requests decreases when weight - %% increases - overload:set_config_data(0.8, 1), - NLargeWeight = do_many_requests(0), - restart_sasl(), - ?t:format("NLargeWeight: ~p",[NLargeWeight]), - true = NLargeWeight < NDefault, - - %% Check that number of requests increases when delay between - %% requests increases. - %% (Keeping same config and comparing to large weight in order to - %% minimize the time needed for this case.) - overload:set_config_data(0.8, 1), - NLargeTime = do_many_requests(500), - restart_sasl(), - ?t:format("NLargeTime: ~p",[NLargeTime]), - true = NLargeTime > NLargeWeight, - ok. - -%%%----------------------------------------------------------------- -timeout(_Config) -> - overload:set_config_data(0.8, 1), - _N = do_many_requests(0), - - %% Check that the overload alarm is raised - [{overload,_}] = alarm_handler:get_alarms(), - - %% Fake a clear timeout in overload.erl and check that, since it - %% came very soon after the overload situation, the alarm is not - %% cleared - overload ! timeout, - timer:sleep(1000), - [{overload,_}] = alarm_handler:get_alarms(), - - %% A bit later, try again and check that this time the alarm is - %% cleared - overload ! timeout, - timer:sleep(1000), - [] = alarm_handler:get_alarms(), - - ok. - - -%%%----------------------------------------------------------------- -%%% INTERNAL FUNCTIONS - -%%%----------------------------------------------------------------- -%%% Call overload:request/0 up to 30 times with the given time delay -%%% between. Stop when 'reject' is returned. -do_many_requests(T) -> - 30 - do_requests(30,T). - -do_requests(0,_) -> - ?t:fail(never_rejected); -do_requests(N,T) -> - case overload:request() of - accept -> - timer:sleep(T), - do_requests(N-1,T); - reject -> - N - end. - -%%%----------------------------------------------------------------- -%%% Restart the sasl application -restart_sasl() -> - application:stop(sasl), - application:start(sasl), - ok. - -%%%----------------------------------------------------------------- -%%% Check that max_intensity and weight is set as expected -check_info(MI,W,Info) -> - case {lists:keyfind(max_intensity,1,Info), lists:keyfind(weight,1,Info)} of - {{_,MI},{_,W}} -> ok; - _ -> ?t:fail({unexpected_info,MI,W,Info}) - end. -- cgit v1.2.3 From df5c9acc3a73a95cddda9f3a5206d4cb4319a9aa Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 25 Feb 2016 13:24:38 +0100 Subject: Update appups in kernel, stdlib and sasl for OTP-18.3 --- lib/sasl/src/sasl.appup.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index 8faa0afbd4..e08ae369b8 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -18,9 +18,9 @@ %% %CopyrightEnd% {"%VSN%", %% Up from - max one major revision back - [{<<"2\\.[5-6](\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.* + [{<<"2\\.[5-7](\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.* {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}], % OTP-17 %% Down to - max one major revision back - [{<<"2\\.[5-6](\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.* + [{<<"2\\.[5-7](\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.* {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}] % OTP-17 }. -- cgit v1.2.3 From f699d6e56c525f702c305c3f722b0be0641ad26e Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 1 Mar 2016 11:01:33 +0100 Subject: Update appups in kernel, stdlib and sasl for OTP-19 --- lib/sasl/src/sasl.appup.src | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index e08ae369b8..ca5122dab4 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -18,9 +18,9 @@ %% %CopyrightEnd% {"%VSN%", %% Up from - max one major revision back - [{<<"2\\.[5-7](\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.* - {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}], % OTP-17 + [{<<"3\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-19.* + {<<"2\\.[5-7](\\.[0-9]+)*">>,[restart_new_emulator]}], % OTP-18.* %% Down to - max one major revision back - [{<<"2\\.[5-7](\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-18.* - {<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}] % OTP-17 + [{<<"3\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, % OTP-19.* + {<<"2\\.[5-7](\\.[0-9]+)*">>,[restart_new_emulator]}] % OTP-18.* }. -- cgit v1.2.3 From d840b24857a1d54419953661f70716c449c11864 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Thu, 3 Mar 2016 10:54:01 +0100 Subject: Fix most of the system docs and emacs mode --- lib/sasl/doc/src/appup.xml | 5 +++-- lib/sasl/doc/src/error_logging.xml | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml index b54d2adb19..6fbdcb9f5b 100644 --- a/lib/sasl/doc/src/appup.xml +++ b/lib/sasl/doc/src/appup.xml @@ -4,7 +4,7 @@
- 19972014 + 19972016 Ericsson AB. All Rights Reserved. @@ -137,7 +137,8 @@ code change. If it is set to {advanced,Extra}, implemented processes using gen_server, - gen_fsm, or + gen_fsm, + gen_statem, or gen_event transform their internal state by calling the callback function code_change. Special processes call the callback diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml index 46b12f3872..8464a41ff9 100644 --- a/lib/sasl/doc/src/error_logging.xml +++ b/lib/sasl/doc/src/error_logging.xml @@ -4,7 +4,7 @@
- 19972013 + 19972016 Ericsson AB. All Rights Reserved. @@ -90,8 +90,9 @@ a process terminates with an unexpected reason, which is any reason other than normal, shutdown, or {shutdown,Term}. Processes using behaviors - gen_server or - gen_fsm + gen_server, + gen_fsm or + gen_statem are examples of such processes. A crash report contains the following items:

Crasher -- cgit v1.2.3 From 0f8afe80c6582f7affd17f36dc9cb48cc7946713 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 14 Mar 2016 10:46:23 +0100 Subject: Prepare release --- lib/sasl/doc/src/notes.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ lib/sasl/vsn.mk | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 537511a865..da5bc6be96 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,6 +31,48 @@

This document describes the changes made to the SASL application.

+
SASL 2.7 + +
Fixed Bugs and Malfunctions + + +

+ During upgrade, the release_handler collects a list of + supervisor pids in order to list all processes in the + supervisor tree. If one of the supervisors (legitimately) + exits before release_handler can examine it, then + sys:get_status/1 would earlier be called with a + dead pid, causing a 'noproc' error. This has been + corrected.

+

+ Own Id: OTP-13291

+
+
+
+ + +
Improvements and New Features + + +

+ The module overload is deprecated and will be + removed in OTP 19.

+

+ Own Id: OTP-13057

+
+ +

+ Improve implementation of supervisor child count, making + it faster and more accurate for dynamic processes of a + simple_one_for_one supervisor.

+

+ Own Id: OTP-13290

+
+
+
+ +
+
SASL 2.6.1
Improvements and New Features diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index cb454d5331..accb58a199 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.6.1 +SASL_VSN = 2.7 -- cgit v1.2.3 From 6664eed554974336909d3ffe03f20349cc4c38fd Mon Sep 17 00:00:00 2001 From: Henrik Nord Date: Tue, 15 Mar 2016 15:19:56 +0100 Subject: update copyright-year --- lib/sasl/Makefile | 2 +- lib/sasl/doc/src/alarm_handler.xml | 2 +- lib/sasl/doc/src/appup.xml | 2 +- lib/sasl/doc/src/book.xml | 2 +- lib/sasl/doc/src/error_logging.xml | 2 +- lib/sasl/doc/src/notes.xml | 2 +- lib/sasl/doc/src/notes_history.xml | 2 +- lib/sasl/doc/src/part.xml | 2 +- lib/sasl/doc/src/part_notes.xml | 2 +- lib/sasl/doc/src/part_notes_history.xml | 2 +- lib/sasl/doc/src/rb.xml | 2 +- lib/sasl/doc/src/ref_man.xml | 2 +- lib/sasl/doc/src/rel.xml | 2 +- lib/sasl/doc/src/release_handler.xml | 2 +- lib/sasl/doc/src/relup.xml | 2 +- lib/sasl/doc/src/sasl_app.xml | 2 +- lib/sasl/doc/src/sasl_intro.xml | 2 +- lib/sasl/doc/src/script.xml | 2 +- lib/sasl/doc/src/systools.xml | 2 +- lib/sasl/examples/src/Makefile | 2 +- lib/sasl/examples/src/target_system.erl | 2 +- lib/sasl/src/Makefile | 2 +- lib/sasl/src/alarm_handler.erl | 2 +- lib/sasl/src/erlsrv.erl | 2 +- lib/sasl/src/format_lib_supp.erl | 2 +- lib/sasl/src/misc_supp.erl | 2 +- lib/sasl/src/rb.erl | 2 +- lib/sasl/src/rb_format_supp.erl | 2 +- lib/sasl/src/release_handler.erl | 2 +- lib/sasl/src/release_handler_1.erl | 2 +- lib/sasl/src/sasl.app.src | 2 +- lib/sasl/src/sasl.appup.src | 2 +- lib/sasl/src/sasl.erl | 2 +- lib/sasl/src/sasl_report.erl | 2 +- lib/sasl/src/sasl_report_file_h.erl | 2 +- lib/sasl/src/sasl_report_tty_h.erl | 2 +- lib/sasl/src/si.erl | 2 +- lib/sasl/src/si_sasl_supp.erl | 2 +- lib/sasl/src/systools.erl | 2 +- lib/sasl/src/systools.hrl | 2 +- lib/sasl/src/systools_lib.erl | 2 +- lib/sasl/src/systools_make.erl | 2 +- lib/sasl/src/systools_rc.erl | 2 +- lib/sasl/src/systools_relup.erl | 2 +- lib/sasl/test/Makefile | 2 +- lib/sasl/test/alarm_handler_SUITE.erl | 2 +- lib/sasl/test/installer.erl | 2 +- lib/sasl/test/rb_SUITE.erl | 2 +- lib/sasl/test/sasl_SUITE.erl | 2 +- lib/sasl/test/sasl_report_SUITE.erl | 2 +- lib/sasl/test/systools_SUITE.erl | 2 +- lib/sasl/test/systools_rc_SUITE.erl | 2 +- 52 files changed, 52 insertions(+), 52 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/Makefile b/lib/sasl/Makefile index 9085c487d4..065eb45fbb 100644 --- a/lib/sasl/Makefile +++ b/lib/sasl/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1996-2010. All Rights Reserved. +# Copyright Ericsson AB 1996-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/sasl/doc/src/alarm_handler.xml b/lib/sasl/doc/src/alarm_handler.xml index 68076ba28d..8550a88b28 100644 --- a/lib/sasl/doc/src/alarm_handler.xml +++ b/lib/sasl/doc/src/alarm_handler.xml @@ -5,7 +5,7 @@
1996 - 2014 + 2016 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml index b54d2adb19..a57068492c 100644 --- a/lib/sasl/doc/src/appup.xml +++ b/lib/sasl/doc/src/appup.xml @@ -4,7 +4,7 @@
- 19972014 + 19972016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/book.xml b/lib/sasl/doc/src/book.xml index 624c32a66f..bca61ee8e7 100644 --- a/lib/sasl/doc/src/book.xml +++ b/lib/sasl/doc/src/book.xml @@ -4,7 +4,7 @@
- 19972013 + 19972016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml index 46b12f3872..86d0c811e9 100644 --- a/lib/sasl/doc/src/error_logging.xml +++ b/lib/sasl/doc/src/error_logging.xml @@ -4,7 +4,7 @@
- 19972013 + 19972016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index da5bc6be96..f07938220c 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -4,7 +4,7 @@
- 20042013 + 20042016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/notes_history.xml b/lib/sasl/doc/src/notes_history.xml index 006a40f3ac..d37c412d85 100644 --- a/lib/sasl/doc/src/notes_history.xml +++ b/lib/sasl/doc/src/notes_history.xml @@ -4,7 +4,7 @@
- 20062013 + 20062016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/part.xml b/lib/sasl/doc/src/part.xml index 2f47a8ad80..f531ed2dea 100644 --- a/lib/sasl/doc/src/part.xml +++ b/lib/sasl/doc/src/part.xml @@ -4,7 +4,7 @@
- 19962013 + 19962016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/part_notes.xml b/lib/sasl/doc/src/part_notes.xml index 57f20ece0e..8a32deefd9 100644 --- a/lib/sasl/doc/src/part_notes.xml +++ b/lib/sasl/doc/src/part_notes.xml @@ -4,7 +4,7 @@
- 20042013 + 20042016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/part_notes_history.xml b/lib/sasl/doc/src/part_notes_history.xml index b2d278e9c4..abdf09d845 100644 --- a/lib/sasl/doc/src/part_notes_history.xml +++ b/lib/sasl/doc/src/part_notes_history.xml @@ -5,7 +5,7 @@
2006 - 2013 + 2016 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml index e16e9f5a62..1ce19046eb 100644 --- a/lib/sasl/doc/src/rb.xml +++ b/lib/sasl/doc/src/rb.xml @@ -4,7 +4,7 @@
- 19962013 + 19962016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/ref_man.xml b/lib/sasl/doc/src/ref_man.xml index 74cd92a9b0..42045df5ec 100644 --- a/lib/sasl/doc/src/ref_man.xml +++ b/lib/sasl/doc/src/ref_man.xml @@ -4,7 +4,7 @@
- 19962013 + 19962016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/rel.xml b/lib/sasl/doc/src/rel.xml index d5f3c7310a..d6558c06b4 100644 --- a/lib/sasl/doc/src/rel.xml +++ b/lib/sasl/doc/src/rel.xml @@ -5,7 +5,7 @@
1997 - 2013 + 2016 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/release_handler.xml b/lib/sasl/doc/src/release_handler.xml index 162707676c..bcbc5f5339 100644 --- a/lib/sasl/doc/src/release_handler.xml +++ b/lib/sasl/doc/src/release_handler.xml @@ -4,7 +4,7 @@
- 19962013 + 19962016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/relup.xml b/lib/sasl/doc/src/relup.xml index 58918fc8e8..4c5535002c 100644 --- a/lib/sasl/doc/src/relup.xml +++ b/lib/sasl/doc/src/relup.xml @@ -5,7 +5,7 @@
1997 - 2013 + 2016 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml index 044c016302..52f449c2a8 100644 --- a/lib/sasl/doc/src/sasl_app.xml +++ b/lib/sasl/doc/src/sasl_app.xml @@ -4,7 +4,7 @@
- 19962013 + 19962016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/sasl_intro.xml b/lib/sasl/doc/src/sasl_intro.xml index 237580977c..b71dafb192 100644 --- a/lib/sasl/doc/src/sasl_intro.xml +++ b/lib/sasl/doc/src/sasl_intro.xml @@ -4,7 +4,7 @@
- 19972013 + 19972016 Ericsson AB. All Rights Reserved. diff --git a/lib/sasl/doc/src/script.xml b/lib/sasl/doc/src/script.xml index db3ea0f487..8ed132354d 100644 --- a/lib/sasl/doc/src/script.xml +++ b/lib/sasl/doc/src/script.xml @@ -5,7 +5,7 @@
1997 - 2013 + 2016 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/doc/src/systools.xml b/lib/sasl/doc/src/systools.xml index 1a5119a5cf..7446762de4 100644 --- a/lib/sasl/doc/src/systools.xml +++ b/lib/sasl/doc/src/systools.xml @@ -5,7 +5,7 @@
1996 - 2013 + 2016 Ericsson AB, All Rights Reserved diff --git a/lib/sasl/examples/src/Makefile b/lib/sasl/examples/src/Makefile index 82083d1197..e8b903f252 100644 --- a/lib/sasl/examples/src/Makefile +++ b/lib/sasl/examples/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2010-2012. All Rights Reserved. +# Copyright Ericsson AB 2010-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/sasl/examples/src/target_system.erl b/lib/sasl/examples/src/target_system.erl index d18fdb17f7..b3d6748306 100644 --- a/lib/sasl/examples/src/target_system.erl +++ b/lib/sasl/examples/src/target_system.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2014. All Rights Reserved. +%% Copyright Ericsson AB 2011-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/Makefile b/lib/sasl/src/Makefile index 92d4818f2e..ac7ee51100 100644 --- a/lib/sasl/src/Makefile +++ b/lib/sasl/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1996-2013. All Rights Reserved. +# Copyright Ericsson AB 1996-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/alarm_handler.erl b/lib/sasl/src/alarm_handler.erl index e428ba80fa..77863f0f8f 100644 --- a/lib/sasl/src/alarm_handler.erl +++ b/lib/sasl/src/alarm_handler.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/erlsrv.erl b/lib/sasl/src/erlsrv.erl index bec824ad78..29d40d362f 100644 --- a/lib/sasl/src/erlsrv.erl +++ b/lib/sasl/src/erlsrv.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2013. All Rights Reserved. +%% Copyright Ericsson AB 1998-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/format_lib_supp.erl b/lib/sasl/src/format_lib_supp.erl index e2f70c7f00..0b474a0232 100644 --- a/lib/sasl/src/format_lib_supp.erl +++ b/lib/sasl/src/format_lib_supp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/misc_supp.erl b/lib/sasl/src/misc_supp.erl index 39656f6e65..093b337a2c 100644 --- a/lib/sasl/src/misc_supp.erl +++ b/lib/sasl/src/misc_supp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/rb.erl b/lib/sasl/src/rb.erl index f63c02e748..79df150b41 100644 --- a/lib/sasl/src/rb.erl +++ b/lib/sasl/src/rb.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/rb_format_supp.erl b/lib/sasl/src/rb_format_supp.erl index ed10022f9d..0004d85af4 100644 --- a/lib/sasl/src/rb_format_supp.erl +++ b/lib/sasl/src/rb_format_supp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl index 7e20d0b321..1fcc9a0288 100644 --- a/lib/sasl/src/release_handler.erl +++ b/lib/sasl/src/release_handler.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/release_handler_1.erl b/lib/sasl/src/release_handler_1.erl index a6325270a5..ca97515299 100644 --- a/lib/sasl/src/release_handler_1.erl +++ b/lib/sasl/src/release_handler_1.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src index 16e8e44ba2..9c912fb8c3 100644 --- a/lib/sasl/src/sasl.app.src +++ b/lib/sasl/src/sasl.app.src @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2015. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index ca5122dab4..ecd320c1ea 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -1,7 +1,7 @@ %% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2014. All Rights Reserved. +%% Copyright Ericsson AB 1999-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl index 0fb85682c6..24afaee183 100644 --- a/lib/sasl/src/sasl.erl +++ b/lib/sasl/src/sasl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2011. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/sasl_report.erl b/lib/sasl/src/sasl_report.erl index 0b8c4212d2..14702b0ad2 100644 --- a/lib/sasl/src/sasl_report.erl +++ b/lib/sasl/src/sasl_report.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/sasl_report_file_h.erl b/lib/sasl/src/sasl_report_file_h.erl index 6c38b320c1..21746839fa 100644 --- a/lib/sasl/src/sasl_report_file_h.erl +++ b/lib/sasl/src/sasl_report_file_h.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/sasl_report_tty_h.erl b/lib/sasl/src/sasl_report_tty_h.erl index 54e8addc45..3997e0aa97 100644 --- a/lib/sasl/src/sasl_report_tty_h.erl +++ b/lib/sasl/src/sasl_report_tty_h.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/si.erl b/lib/sasl/src/si.erl index e4bd8f5fd8..275c6d508b 100644 --- a/lib/sasl/src/si.erl +++ b/lib/sasl/src/si.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/si_sasl_supp.erl b/lib/sasl/src/si_sasl_supp.erl index 0dcdcdd912..cce628f8c4 100644 --- a/lib/sasl/src/si_sasl_supp.erl +++ b/lib/sasl/src/si_sasl_supp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/systools.erl b/lib/sasl/src/systools.erl index 98255e0b12..dd1a58c3c1 100644 --- a/lib/sasl/src/systools.erl +++ b/lib/sasl/src/systools.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/systools.hrl b/lib/sasl/src/systools.hrl index 0bf822ed07..6b2a597427 100644 --- a/lib/sasl/src/systools.hrl +++ b/lib/sasl/src/systools.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/systools_lib.erl b/lib/sasl/src/systools_lib.erl index 1538e1e90f..dd97aeff08 100644 --- a/lib/sasl/src/systools_lib.erl +++ b/lib/sasl/src/systools_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index d207dc15bb..9ac175a91c 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/systools_rc.erl b/lib/sasl/src/systools_rc.erl index 285c805b5d..7722cef57b 100644 --- a/lib/sasl/src/systools_rc.erl +++ b/lib/sasl/src/systools_rc.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2014. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/src/systools_relup.erl b/lib/sasl/src/systools_relup.erl index a520da1c3f..28534dc0c8 100644 --- a/lib/sasl/src/systools_relup.erl +++ b/lib/sasl/src/systools_relup.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/test/Makefile b/lib/sasl/test/Makefile index 2e9e107efd..2a782bcf61 100644 --- a/lib/sasl/test/Makefile +++ b/lib/sasl/test/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2011-2012. All Rights Reserved. +# Copyright Ericsson AB 2011-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/sasl/test/alarm_handler_SUITE.erl b/lib/sasl/test/alarm_handler_SUITE.erl index f2ed9ffc19..dbbdf05f12 100644 --- a/lib/sasl/test/alarm_handler_SUITE.erl +++ b/lib/sasl/test/alarm_handler_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011. All Rights Reserved. +%% Copyright Ericsson AB 2011-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/test/installer.erl b/lib/sasl/test/installer.erl index c42f26a506..e38d0cfa7b 100644 --- a/lib/sasl/test/installer.erl +++ b/lib/sasl/test/installer.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2013. All Rights Reserved. +%% Copyright Ericsson AB 2011-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/test/rb_SUITE.erl b/lib/sasl/test/rb_SUITE.erl index 9a33df369e..426dedbab5 100644 --- a/lib/sasl/test/rb_SUITE.erl +++ b/lib/sasl/test/rb_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2012. All Rights Reserved. +%% Copyright Ericsson AB 2011-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl index cd8316b451..f12bde9b3d 100644 --- a/lib/sasl/test/sasl_SUITE.erl +++ b/lib/sasl/test/sasl_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2014. All Rights Reserved. +%% Copyright Ericsson AB 2011-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/test/sasl_report_SUITE.erl b/lib/sasl/test/sasl_report_SUITE.erl index 7469ec4d46..aa229726ae 100644 --- a/lib/sasl/test/sasl_report_SUITE.erl +++ b/lib/sasl/test/sasl_report_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2015. All Rights Reserved. +%% Copyright Ericsson AB 2015-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 825a7f6e86..bf95ceb70c 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2014. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/sasl/test/systools_rc_SUITE.erl b/lib/sasl/test/systools_rc_SUITE.erl index 2ecb6f107a..baa3a16e70 100644 --- a/lib/sasl/test/systools_rc_SUITE.erl +++ b/lib/sasl/test/systools_rc_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2014. All Rights Reserved. +%% Copyright Ericsson AB 2010-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. -- cgit v1.2.3 From e0cdbcbdf2834a271f914da20e44dc77de7a05b5 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 16 Mar 2016 12:01:26 +0100 Subject: Update sasl/test/test_lib.hrl with recent versions of kernel and stdlib "Old" versions are now taken from OTP-18.0, i.e. one major revision back from OTP-19. --- lib/sasl/test/test_lib.hrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/test_lib.hrl b/lib/sasl/test/test_lib.hrl index b16c4ac34c..2d897e9903 100644 --- a/lib/sasl/test/test_lib.hrl +++ b/lib/sasl/test/test_lib.hrl @@ -1,3 +1,3 @@ -define(ertsvsn,"4.4"). --define(kernelvsn,"3.0"). --define(stdlibvsn,"2.0"). +-define(kernelvsn,"4.0"). +-define(stdlibvsn,"2.5"). -- cgit v1.2.3 From c3c61822727939b8cad8f9a132602ac015820b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 10 Mar 2016 15:36:04 +0100 Subject: systools_make: Add commonly used modules to mandatory_modules/0 Add commonly used modules to the list of modules in mandatory_modules/0. Having those modules listed will potentially help the 'init' module to load them in parallel during start-up. --- lib/sasl/src/systools_make.erl | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index d207dc15bb..154374cd8c 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -1453,16 +1453,37 @@ behave([H|T]) -> behave([]) -> []. -%%______________________________________________________________________ -%% mandatory modules; this modules must be loaded before processes -%% can be started. These are a collection of modules from the kernel -%% and stdlib applications. -%% Nowadays, error_handler dynamically loads almost every module. -%% The error_handler self must still be there though. - mandatory_modules() -> - %% Sorted - [error_handler]. + [error_handler, %Truly mandatory. + + %% Modules that are almost always needed. Listing them here + %% helps the init module to load them faster. Modules not + %% listed here will be loaded by the error_handler module. + %% + %% Keep this list sorted. + application, + application_controller, + application_master, + code, + code_server, + erl_eval, + erl_lint, + erl_parse, + error_logger, + ets, + file, + filename, + file_server, + file_io_server, + gen, + gen_event, + gen_server, + heart, + kernel, + lists, + proc_lib, + supervisor + ]. %%______________________________________________________________________ %% This is the modules that are preloaded into the Erlang system. -- cgit v1.2.3 From d0d5bc92fd305854b2a61301578751dd5ef27d6d Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 31 Mar 2016 11:57:01 +0200 Subject: Update versions Update application versions for kernel, stdlib and sasl for OTP-19. --- lib/sasl/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index accb58a199..fd0fc9b8b5 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.7 +SASL_VSN = 3.0 -- cgit v1.2.3 From 37092dab15448ef6a078800e3ff0cc41880ea765 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 10 Dec 2015 11:10:46 +0100 Subject: erts: Implement tracer modules Add the possibility to use modules as trace data receivers. The functions in the module have to be nifs as otherwise complex trace probes will be very hard to handle (complex means trace probes for ports for example). This commit changes the way that the ptab->tracer field works from always being an immediate, to now be NIL if no tracer is present or else be the tuple {TracerModule, TracerState} where TracerModule is an atom that is later used to lookup the appropriate tracer callbacks to call and TracerState is just passed to the tracer callback. The default process and port tracers have been rewritten to use the new API. This commit also changes the order which trace messages are delivered to the potential tracer process. Any enif_send done in a tracer module may be delayed indefinitely because of lock order issues. If a message is delayed any other trace message send from that process is also delayed so that order is preserved for each traced entity. This means that for some trace events (i.e. send/receive) the events may come in an unintuitive order (receive before send) to the trace receiver. Timestamps are taken when the trace message is generated so trace messages from differented processes may arrive with the timestamp out of order. Both the erlang:trace and seq_trace:set_system_tracer accept the new tracer module tracers and also the backwards compatible arguments. OTP-10267 --- lib/sasl/src/systools_make.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl index c23607f8a1..352e4984df 100644 --- a/lib/sasl/src/systools_make.erl +++ b/lib/sasl/src/systools_make.erl @@ -1490,7 +1490,7 @@ mandatory_modules() -> preloaded() -> %% Sorted - [erl_prim_loader,erlang, + [erl_prim_loader,erl_tracer,erlang, erts_code_purger, erts_internal,init,otp_ring0,prim_eval,prim_file, prim_inet,prim_zip,zlib]. -- cgit v1.2.3 From 6d1f0b6ac13e2a8615a1d92238892196daa4ee4e Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 31 Mar 2016 15:34:37 +0200 Subject: Windows: Skip tests that requires admin privileges Windows 8 and later have stronger admin checks which requires erlang to run in privileged shells, ignore for now. --- lib/sasl/test/release_handler_SUITE.erl | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index ee620dcdb4..4dcaec03a7 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -54,7 +54,7 @@ unix_cases() -> end, [target_system, target_system_unicode] ++ RunErlCases ++ cases(). -win32_cases() -> +win32_cases() -> [{group,release} | cases()]. %% Cases that can be run on all platforms @@ -89,11 +89,16 @@ groups() -> %% {group,release} %% Top group for all cases using run_erl init_per_group(release, Config) -> - Dog = ?t:timetrap(?default_timeout), - P1gInstall = filename:join(priv_dir(Config),p1g_install), - ok = create_p1g(Config,P1gInstall), - ok = create_p1h(Config), - ?t:timetrap_cancel(Dog); + case {os:type(), os:version()} of + {{win32, nt}, Vsn} when Vsn > {6,1,999999} -> + {skip, "Requires admin privileges on Win 8 and later"}; + _ -> + Dog = ?t:timetrap(?default_timeout), + P1gInstall = filename:join(priv_dir(Config),p1g_install), + ok = create_p1g(Config,P1gInstall), + ok = create_p1h(Config), + ?t:timetrap_cancel(Dog) + end; %% {group,release_single} %% Subgroup of {group,release}, contains all cases that are not -- cgit v1.2.3 From bd64ad8e15d66e48b36dbe3584315dd5cfc8b59a Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 11 May 2016 17:22:23 +0200 Subject: Prepare release --- lib/sasl/doc/src/notes.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index f07938220c..dae73f8b23 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,6 +31,23 @@

This document describes the changes made to the SASL application.

+
SASL 3.0 + +
Improvements and New Features + + +

+ The module 'overload' is removed.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13184

+
+
+
+ +
+
SASL 2.7
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 663e847459686604ea051f036a0e4caff18cea6f Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 12 May 2016 12:04:14 +0200 Subject: Revert "Prepare release" This reverts commit bd64ad8e15d66e48b36dbe3584315dd5cfc8b59a. --- lib/sasl/doc/src/notes.xml | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index dae73f8b23..f07938220c 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,23 +31,6 @@

This document describes the changes made to the SASL application.

-
SASL 3.0 - -
Improvements and New Features - - -

- The module 'overload' is removed.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13184

-
-
-
- -
-
SASL 2.7
Fixed Bugs and Malfunctions -- cgit v1.2.3 From d83ecf6b20d0e1d804f343a837e5e4fe676bf077 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 27 May 2016 10:52:50 +0200 Subject: Bumped runtime dependencies between erts, kernel, stdlib, sasl --- lib/sasl/src/sasl.app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src index 9c912fb8c3..4ee8a7d6c8 100644 --- a/lib/sasl/src/sasl.app.src +++ b/lib/sasl/src/sasl.app.src @@ -45,6 +45,6 @@ {env, [{sasl_error_logger, tty}, {errlog_type, all}]}, {mod, {sasl, []}}, - {runtime_dependencies, ["tools-2.6.14","stdlib-2.8","kernel-4.1", - "erts-6.0"]}]}. + {runtime_dependencies, ["tools-2.6.14","stdlib-3.0","kernel-5.0", + "erts-8.0"]}]}. -- cgit v1.2.3 From e020f75c10410a6943cd055bfa072a2641eab7da Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 2 Jun 2016 10:55:26 +0200 Subject: Prepare release --- lib/sasl/doc/src/notes.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index f07938220c..dae73f8b23 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,6 +31,23 @@

This document describes the changes made to the SASL application.

+
SASL 3.0 + +
Improvements and New Features + + +

+ The module 'overload' is removed.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13184

+
+
+
+ +
+
SASL 2.7
Fixed Bugs and Malfunctions -- cgit v1.2.3 From c04cad3ba921deb086d19e2de2526af4854add75 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 2 Jun 2016 11:39:07 +0200 Subject: Revert "Prepare release" This reverts commit e020f75c10410a6943cd055bfa072a2641eab7da. --- lib/sasl/doc/src/notes.xml | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index dae73f8b23..f07938220c 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,23 +31,6 @@

This document describes the changes made to the SASL application.

-
SASL 3.0 - -
Improvements and New Features - - -

- The module 'overload' is removed.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13184

-
-
-
- -
-
SASL 2.7
Fixed Bugs and Malfunctions -- cgit v1.2.3 From e2577531278c5dde283c4ab7be766d081c363ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 31 Mar 2016 10:34:15 +0200 Subject: Return callback module in supervisor format_status The previous implementation of supervisor:get_callback_module/1 used sys:get_status/1 to get the supervisor inner state and retrieve the callback module. Such implementation forbids any other supervisor implementation that has an internal state different than the #state{} record in supervisor.erl. This patch allows supervisors to return the callback module as part of the sys:get_status/1 data, no longer coupling the callback module implementation with the inner #state{} record. Notice we have kept the clause matching the previous sys:get_status/1 reply for backwards compatibility purposes. --- lib/sasl/test/release_handler_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index ee620dcdb4..fa0ec1e80e 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1361,7 +1361,7 @@ upgrade_supervisor(Conf) when is_list(Conf) -> ASupBeam2 = rpc:call(Node, code, which, [a_sup]), %% Check that the restart strategy and child spec is updated - {status, _, {module, _}, [_, _, _, _, [_,_,{data,[{"State",State}]}]]} = + {status, _, {module, _}, [_, _, _, _, [_,_,{data,[{"State",State}]}|_]]} = rpc:call(Node,sys,get_status,[a_sup]), {state,_,RestartStrategy,[Child],_,_,_,_,_,_,_} = State, one_for_all = RestartStrategy, % changed from one_for_one -- cgit v1.2.3 From 4336a65b7e2580866c20fa6646209212dcaeb122 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 9 Jun 2016 13:34:28 +0200 Subject: [sasl test] Give some time and try again if nodes are not synched release_handler_SUITE:upgrade_gg (global group) sometimes fails on slow machines. This commit re-tries five times before giving up. --- lib/sasl/test/release_handler_SUITE.erl | 42 ++++++++++++--------------------- 1 file changed, 15 insertions(+), 27 deletions(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 8134e02221..559a63fcaf 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1761,8 +1761,6 @@ upgrade_gg(Conf) -> Nodes1 = [Gg1,Gg3,Gg4,Gg5] = start_nodes(Conf,[Gg1Sname,Gg3Sname,Gg4Sname,Gg5Sname],"upgrade_gg"), - %% Give some time to synch nodes, then check global group info. - timer:sleep(1000), [check_gg_info(Node,Nodes1,[],Nodes1--[Node]) || Node <- Nodes1], %% register a process on each of the nodes @@ -2449,37 +2447,27 @@ write_term_file(File,Term) -> ok = file:write_file(File,io_lib:format("~p.~n",[Term])). -%% Check that global group info is correct +%% Check that global group info is correct - try again for a maximum of 5 sec check_gg_info(Node,OtherAlive,OtherDead,Synced) -> + check_gg_info(Node,OtherAlive,OtherDead,Synced,5). + +check_gg_info(Node,OtherAlive,OtherDead,Synced,N) -> GGI = rpc:call(Node, global_group, info, []), GI = rpc:call(Node, global, info,[]), try do_check_gg_info(OtherAlive,OtherDead,Synced,GGI,GI) - catch _:E -> - ?t:format("~ncheck_gg_info failed for ~p: ~p~nwhen GGI was: ~p~n" - "and GI was: ~p~n", - [Node,E,GGI,GI]), - %% An attempt to find out if it is only a timing issue - %% that makes this fail every now and then: - try_again_check(Node,GGI,GI,1), - ?t:fail("check_gg_info failed") - end. - -try_again_check(_Node,_GGI,_GI,6) -> - ok; -try_again_check(Node,GGI,GI,N) -> - timer:sleep(1000), - case {rpc:call(Node,global_group,info,[]), - rpc:call(Node,global,info,[])} of - {GGI,GI} -> - ?t:format("~nAfter one more sek, GGI and GI are still the same"), - try_again_check(Node,GGI,GI,N+1); - {NewGGI,NewGI} -> - ?t:format("~nAfter one more sek:~nNew GGI: ~p~nNew GI: ~p~n", - [NewGGI,NewGI]), - try_again_check(Node,NewGGI,NewGI,N+1) + catch _:E when N==0 -> + ?t:format("~nERROR: check_gg_info failed for ~p:~n~p~n" + "when GGI was: ~p~nand GI was: ~p~n", + [Node,{E,erlang:get_stacktrace()},GGI,GI]), + ?t:fail("check_gg_info failed"); + _:E -> + ?t:format("~nWARNING: check_gg_info failed for ~p:~n~p~n" + "when GGI was: ~p~nand GI was: ~p~n", + [Node,{E,erlang:get_stacktrace()},GGI,GI]), + timer:sleep(1000), + check_gg_info(Node,OtherAlive,OtherDead,Synced,N-1) end. - do_check_gg_info(OtherAlive,OtherDead,Synced,GGI,GI) -> {_,gg1} = lists:keyfind(own_group_name,1,GGI), {_,synced} = lists:keyfind(state,1,GGI), -- cgit v1.2.3 From 7176e321c085cbcdd044f2dfc2b02bbba2c50e7b Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 3 Jun 2016 14:32:54 +0200 Subject: [sasl test] Do GC before measuring and comparing time release_handler_SUITE:otp_9395_*_many_mods sometimes fail on slow machines. This commit adds an explicit GC before each 'install_release' so GC during test is avoided. --- lib/sasl/test/release_handler_SUITE.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 559a63fcaf..ad58bb6b7b 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1103,6 +1103,7 @@ otp_9395_update_many_mods(Conf) when is_list(Conf) -> [RelVsn2, filename:join(Rel2Dir, "sys.config")]), %% First, install release directly and check how much time it takes + rpc:call(Node,erlang,garbage_collect,[]), rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]), {TInst0,{ok, _, []}} = timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]), @@ -1129,6 +1130,7 @@ otp_9395_update_many_mods(Conf) when is_list(Conf) -> %% Finally install release after check and purge, and check that %% this install was faster than the first. rpc:call(Node,erlang,system_flag,[scheduler_wall_time,false]), + rpc:call(Node,erlang,garbage_collect,[]), rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]), {TInst2,{ok, _RelVsn1, []}} = timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]), @@ -1200,6 +1202,7 @@ otp_9395_rm_many_mods(Conf) when is_list(Conf) -> [RelVsn2, filename:join(Rel2Dir, "sys.config")]), %% First, install release directly and check how much time it takes + rpc:call(Node,erlang,garbage_collect,[]), rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]), {TInst0,{ok, _, []}} = timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]), @@ -1226,6 +1229,7 @@ otp_9395_rm_many_mods(Conf) when is_list(Conf) -> %% Finally install release after check and purge, and check that %% this install was faster than the first. rpc:call(Node,erlang,system_flag,[scheduler_wall_time,false]), + rpc:call(Node,erlang,garbage_collect,[]), rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]), {TInst2,{ok, _RelVsn1, []}} = timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]), -- cgit v1.2.3 From 6e51c6d19612d03abc81b86bb70b8d7da678ce5d Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 21 Jun 2016 15:12:41 +0200 Subject: Prepare release --- lib/sasl/doc/src/notes.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index f07938220c..dae73f8b23 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,6 +31,23 @@

This document describes the changes made to the SASL application.

+
SASL 3.0 + +
Improvements and New Features + + +

+ The module 'overload' is removed.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13184

+
+
+
+ +
+
SASL 2.7
Fixed Bugs and Malfunctions -- cgit v1.2.3