aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sasl')
-rw-r--r--lib/sasl/doc/src/release_handler.xml12
-rw-r--r--lib/sasl/src/systools_relup.erl40
-rw-r--r--lib/sasl/test/systools_SUITE.erl259
-rw-r--r--lib/sasl/test/systools_SUITE_data/lib/sasl-9.9/ebin/sasl.app6
-rw-r--r--lib/sasl/test/systools_SUITE_data/lib/sasl-9.9/ebin/sasl.appup12
5 files changed, 244 insertions, 85 deletions
diff --git a/lib/sasl/doc/src/release_handler.xml b/lib/sasl/doc/src/release_handler.xml
index c625b40c9d..bd24b2d963 100644
--- a/lib/sasl/doc/src/release_handler.xml
+++ b/lib/sasl/doc/src/release_handler.xml
@@ -335,6 +335,18 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).
upgrade, but it will allow checks and purge to be executed
in the background before the real upgrade is started.</p>
</note>
+ <note>
+ <p>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 <seealso
+ marker="doc/design_principles:appup_cookbook">Design
+ Principles</seealso> for more information about emulator
+ upgrade from pre OTP R15 versions.</p>
+ </note>
</desc>
</func>
<func>
diff --git a/lib/sasl/src/systools_relup.erl b/lib/sasl/src/systools_relup.erl
index 27960e9938..5346538dc8 100644
--- a/lib/sasl/src/systools_relup.erl
+++ b/lib/sasl/src/systools_relup.erl
@@ -112,6 +112,7 @@
-export([mk_relup/3, mk_relup/4, format_error/1, format_warning/1]).
-include("systools.hrl").
+-define(R15_SASL_VSN,"2.2").
%% For test purposes only - used by kernel, stdlib and sasl tests
-export([appup_search_for_version/2]).
@@ -269,20 +270,25 @@ foreach_baserel_up(TopRel, TopApps, [BaseRelDc|BaseRelDcs], Path, Opts,
{RUs4, Ws4} = check_for_emulator_restart(TopRel, BaseRel, RUs3, Ws3, Opts),
- BaseApps =
+ {BaseNameVsns,BaseApps} =
case systools_make:get_release(BaseRelFile, Path) of
{ok, _, NameVsnApps, _Warns} ->
- lists:map(fun({_,App}) -> App end, NameVsnApps);
+ %% NameVsnApps = [{{Name,Vsn},#application}]
+ %% Gives two lists - [{Name,Vsn}] and [#application]
+ lists:unzip(NameVsnApps);
Other1 ->
throw(Other1)
end,
case systools_rc:translate_scripts(up, RUs4, TopApps, BaseApps) of
- {ok, RUs} ->
+ {ok, RUs5} ->
+
+ {RUs, Ws5} = fix_r15_sasl_upgrade(RUs5,Ws4,BaseNameVsns),
+
VDR = {BaseRel#release.vsn,
extract_description(BaseRelDc), RUs},
foreach_baserel_up(TopRel, TopApps, BaseRelDcs, Path,
- Opts, Ws4, [VDR| Acc]);
+ Opts, Ws5, [VDR| Acc]);
XXX ->
throw(XXX)
end;
@@ -346,12 +352,9 @@ foreach_baserel_dn( _, _, [], _, _, Ws, Acc) ->
check_for_emulator_restart(#release{erts_vsn = Vsn1, name = N1},
#release{erts_vsn = Vsn2, name = N2}, RUs, Ws,
Opts) when Vsn1 /= Vsn2 ->
- %% The diff_vsn_restart_new_emulator instruction will be replaced
- %% by a restart_new_emulator instruction in systools_rc, and
- %% placed in the proper order according to mode (up or dn).
- %% We will also allow an extra restart of emulator (specified by
- %% the restart_emulator option) at the end of the upgrade, for
- %% application specific purposes.
+ %% Automatically insert a restart_new_emulator instruction when
+ %% erts version is changed. Also allow extra restart at the end of
+ %% the upgrade if restart_emulator option is given.
NewRUs = [[restart_new_emulator]|RUs],
NewWs = [{erts_vsn_changed, {N1, N2}} | Ws],
check_for_restart_emulator_opt(NewRUs, NewWs, Opts);
@@ -365,6 +368,23 @@ check_for_restart_emulator_opt(RUs, Ws, Opts) ->
end.
+%% Special handling of the upgrade from pre R15 to post R15. In R15,
+%% upgrade of the emulator was improved by moving the restart of the
+%% emulator before the rest of the upgrade instructions. However, it
+%% can only work if the release_handler is already upgraded to a post
+%% R15 version. If not, the upgrade instructions must be backwards
+%% compatible - i.e. restart_new_emulator will be the last
+%% instruction, executed after all code loading, code_change etc.
+fix_r15_sasl_upgrade([restart_new_emulator | RestRUs]=RUs, Ws, BaseApps) ->
+ case lists:keyfind(sasl,1,BaseApps) of
+ {sasl,Vsn} when Vsn < ?R15_SASL_VSN ->
+ {lists:delete(restart_emulator,RestRUs) ++ [restart_new_emulator],
+ [pre_R15_emulator_upgrade|Ws]};
+ _ ->
+ {RUs,Ws}
+ end;
+fix_r15_sasl_upgrade(RUs, Ws, _BaseApps) ->
+ {RUs,Ws}.
%% collect_appup_scripts(Mode, TopApps, BaseRel, Ws, RUs) -> {NRUs, NWs}
diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl
index 4cf6aefea9..e06a26828c 100644
--- a/lib/sasl/test/systools_SUITE.erl
+++ b/lib/sasl/test/systools_SUITE.erl
@@ -49,7 +49,7 @@
-export([ tar_options/1, normal_tar/1, no_mod_vsn_tar/1, variable_tar/1,
src_tests_tar/1, shadow_tar/1, var_tar/1,
exref_tar/1, link_tar/1, otp_9507/1]).
--export([ normal_relup/1, abnormal_relup/1, no_appup_relup/1,
+-export([ normal_relup/1, restart_relup/1, abnormal_relup/1, no_appup_relup/1,
bad_appup_relup/1, app_start_type_relup/1, regexp_relup/1, otp_3065/1]).
-export([otp_6226/1]).
-export([normal_hybrid/1,hybrid_no_old_sasl/1,hybrid_no_new_sasl/1]).
@@ -83,7 +83,7 @@ groups() ->
src_tests_tar, shadow_tar, var_tar,
exref_tar, link_tar, otp_9507]},
{relup, [],
- [normal_relup, abnormal_relup, no_appup_relup,
+ [normal_relup, restart_relup, abnormal_relup, no_appup_relup,
bad_appup_relup, app_start_type_relup, regexp_relup
]},
{hybrid, [], [normal_hybrid,hybrid_no_old_sasl,hybrid_no_new_sasl]},
@@ -1145,50 +1145,16 @@ normal_relup(Config) when is_list(Config) ->
?line {LatestDir,LatestName} = create_script(latest0,Config),
?line {_LatestDir1,LatestName1} = create_script(latest1,Config),
?line {_LatestDir2,LatestName2} = create_script(latest2,Config),
- ?line {_LatestDir1CurrErts,LatestName1CurrErts} =
- create_script(latest1_current_erts,Config),
?line DataDir = filename:absname(?copydir),
?line LibDir = [fname([DataDir, d_normal, lib])],
?line P = [fname([LibDir, '*', ebin]),
fname([DataDir, lib, kernel, ebin]),
- fname([DataDir, lib, stdlib, ebin])],
+ fname([DataDir, lib, stdlib, ebin]),
+ fname([DataDir, lib, sasl, ebin])],
?line ok = file:set_cwd(LatestDir),
- %% OTP-2561: Check that the option 'restart_emulator' generates a
- %% "restart_emulator" instruction.
- ?line {ok, _ , _, []} =
- systools:make_relup(LatestName, [LatestName1], [LatestName1],
- [{path, P},restart_emulator,silent]),
- ?line ok = check_relup([{db, "2.1"}], [{db, "1.0"}]),
- ?line ok = check_restart_emulator(),
-
- %% Check that new erts version generates a restart_new_emulator
- %% instruction
- %% (One erts_vsn_changed warning for upgrade and one for downgrade)
- ?line {ok, _ , _, [{erts_vsn_changed,_},{erts_vsn_changed,_}]} =
- systools:make_relup(LatestName,
- [LatestName1CurrErts],
- [LatestName1CurrErts],
- [{path, P},silent]),
- ?line ok = check_relup([{db, "2.1"}], [{db, "1.0"}]),
- ?line ok = check_restart_emulator_diff_erts(),
-
-
- %% Check that new erts version generates a restart_new_emulator
- %% instruction, and can be combined with restart_emulator opt.
- %% (One erts_vsn_changed warning for upgrade and one for downgrade)
- ?line {ok, _ , _, [{erts_vsn_changed,_},{erts_vsn_changed,_}]} =
- systools:make_relup(LatestName,
- [LatestName1CurrErts],
- [LatestName1CurrErts],
- [{path, P},restart_emulator,silent]),
- ?line ok = check_relup([{db, "2.1"}], [{db, "1.0"}]),
- ?line ok = check_restart_emulator(),
- ?line ok = check_restart_emulator_diff_erts(),
-
-
%% This is the ultra normal case
?line ok = systools:make_relup(LatestName, [LatestName1], [LatestName1],
[{path, P}]),
@@ -1229,6 +1195,91 @@ normal_relup(Config) when is_list(Config) ->
ok.
+restart_relup(suite) -> [];
+restart_relup(doc) ->
+ ["Test relup which includes emulator restart"];
+restart_relup(Config) when is_list(Config) ->
+ ?line {ok, OldDir} = file:get_cwd(),
+
+ ?line {LatestDir,LatestName} = create_script(latest0,Config),
+ ?line {_LatestDir1,LatestName1} = create_script(latest1,Config),
+ ?line {_LatestDir0CurrErts,LatestName0CurrErts} =
+ create_script(latest0_current_erts,Config),
+ ?line {_CurrentAllDir,CurrentAllName} = create_script(current_all,Config),
+ ?line {_CurrentAllFutErtsDir,CurrentAllFutErtsName} =
+ create_script(current_all_future_erts,Config),
+ ?line {_CurrentAllFutSaslDir,CurrentAllFutSaslName} =
+ create_script(current_all_future_sasl,Config),
+
+ ?line DataDir = filename:absname(?copydir),
+ ?line LibDir = [fname([DataDir, d_normal, lib])],
+ ?line P = [fname([LibDir, '*', ebin]),
+ fname([DataDir, lib, kernel, ebin]),
+ fname([DataDir, lib, stdlib, ebin]),
+ fname([DataDir, lib, sasl, ebin]),
+ fname([DataDir, lib, 'sasl-9.9', ebin])],
+
+ ?line ok = file:set_cwd(LatestDir),
+
+ %% OTP-2561: Check that the option 'restart_emulator' generates a
+ %% "restart_emulator" instruction.
+ ?line {ok, _ , _, []} =
+ systools:make_relup(LatestName, [LatestName1], [LatestName1],
+ [{path, P},restart_emulator,silent]),
+ ?line ok = check_relup([{db, "2.1"}], [{db, "1.0"}]),
+ ?line ok = check_restart_emulator(),
+
+
+ %% Pre-R15 to Post-R15 upgrade
+ ?line {ok, _ , _, Ws} =
+ systools:make_relup(LatestName0CurrErts,
+ [LatestName1],
+ [LatestName1],
+ [{path, P},silent]),
+ ?line ok = check_relup([{db,"2.1"}], [{db, "1.0"}]),
+ ?line ok = check_pre_to_post_r15_restart_emulator(),
+ ?line ok = check_pre_to_post_r15_warnings(Ws),
+
+
+ %% Check that new sasl version generates a restart_new_emulator
+ %% instruction
+ ?line {ok, _ , _, []} =
+ systools:make_relup(CurrentAllFutSaslName,
+ [CurrentAllName],
+ [CurrentAllName],
+ [{path, P},silent]),
+ ?line ok = check_relup([{fe, "3.1"}], []),
+ ?line ok = check_restart_emulator_diff_coreapp(),
+
+
+ %% Check that new erts version generates a restart_new_emulator
+ %% instruction, if FromSaslVsn >= R15SaslVsn
+ %% (One erts_vsn_changed warning for upgrade and one for downgrade)
+ ?line {ok, _ , _, [{erts_vsn_changed,_},{erts_vsn_changed,_}]} =
+ systools:make_relup(CurrentAllFutErtsName,
+ [CurrentAllName],
+ [CurrentAllName],
+ [{path, P},silent]),
+ ?line ok = check_relup([{fe, "3.1"}], []),
+ ?line ok = check_restart_emulator_diff_coreapp(),
+
+
+ %% Check that new erts version generates a restart_new_emulator
+ %% instruction, and can be combined with restart_emulator opt.
+ %% (One erts_vsn_changed warning for upgrade and one for downgrade)
+ ?line {ok, _ , _, [{erts_vsn_changed,_},{erts_vsn_changed,_}]} =
+ systools:make_relup(CurrentAllFutErtsName,
+ [CurrentAllName],
+ [CurrentAllName],
+ [{path, P},restart_emulator,silent]),
+ ?line ok = check_relup([{fe, "3.1"}], []),
+ ?line ok = check_restart_emulator(),
+ ?line ok = check_restart_emulator_diff_coreapp(),
+
+ ?line ok = file:set_cwd(OldDir),
+ ok.
+
+
%% This test fails if wrong version numbers are seen in the relup file
%% or if any application is missing. This was triggered by OTP-1360.
check_relup(UpVsnL, DnVsnL) ->
@@ -1265,12 +1316,22 @@ check_restart_emulator_up_only() ->
restart_emulator = lists:last(Up),
ok.
-check_restart_emulator_diff_erts() ->
+check_restart_emulator_diff_coreapp() ->
{ok, [{_V1, [{_, _, Up}], [{_, _, Dn}]}]} = file:consult(relup),
[restart_new_emulator|_] = Up,
restart_emulator = lists:last(Dn),
ok.
+check_pre_to_post_r15_restart_emulator() ->
+ {ok, [{_V1, [{_, _, Up}], [{_, _, Dn}]}]} = file:consult(relup),
+ restart_new_emulator = lists:last(Up),
+ restart_emulator = lists:last(Dn),
+ ok.
+
+check_pre_to_post_r15_warnings(Ws) ->
+ true = lists:member(pre_R15_emulator_upgrade,Ws),
+ ok.
+
%% make_relup
%%
no_appup_relup(suite) -> [];
@@ -1362,7 +1423,8 @@ abnormal_relup(Config) when is_list(Config) ->
?line P = [fname([DataDir, d_bad_app_vsn, lib, 'db-2.1', ebin]),
fname([DataDir, d_bad_app_vsn, lib, 'fe-3.1', ebin]),
fname([DataDir, lib, kernel, ebin]),
- fname([DataDir, lib, stdlib, ebin])],
+ fname([DataDir, lib, stdlib, ebin]),
+ fname([DataDir, lib, sasl, ebin])],
?line ok = file:set_cwd(LatestDir),
@@ -1466,8 +1528,8 @@ regexp_relup(Config) ->
%% new release, all other apps from old release.
normal_hybrid(Config) ->
?line {ok, OldDir} = file:get_cwd(),
- ?line {Dir1,Name1} = create_script(latest1_sasl,Config),
- ?line {_Dir2,Name2} = create_script(current_all_sasl,Config),
+ ?line {Dir1,Name1} = create_script(latest1,Config),
+ ?line {_Dir2,Name2} = create_script(current_all,Config),
?line DataDir = filename:absname(?copydir),
?line LibDir = [fname([DataDir, d_normal, lib])],
@@ -1565,8 +1627,8 @@ normal_hybrid(Config) ->
%% application.
hybrid_no_old_sasl(Config) ->
?line {ok, OldDir} = file:get_cwd(),
- ?line {Dir1,Name1} = create_script(latest1,Config),
- ?line {_Dir2,Name2} = create_script(current_all_sasl,Config),
+ ?line {Dir1,Name1} = create_script(latest1_no_sasl,Config),
+ ?line {_Dir2,Name2} = create_script(current_all,Config),
?line DataDir = filename:absname(?copydir),
?line LibDir = [fname([DataDir, d_normal, lib])],
@@ -1596,7 +1658,7 @@ hybrid_no_old_sasl(Config) ->
%% application.
hybrid_no_new_sasl(Config) ->
?line {ok, OldDir} = file:get_cwd(),
- ?line {Dir1,Name1} = create_script(latest1_sasl,Config),
+ ?line {Dir1,Name1} = create_script(latest1,Config),
?line {_Dir2,Name2} = create_script(current_all_no_sasl,Config),
?line DataDir = filename:absname(?copydir),
@@ -1640,7 +1702,8 @@ otp_6226(Config) when is_list(Config) ->
fname([LibDir, 'db-1.0', ebin]),
fname([LibDir, 'fe-3.1', ebin]),
fname([DataDir, lib, kernel, ebin]),
- fname([DataDir, lib, stdlib, ebin])],
+ fname([DataDir, lib, stdlib, ebin]),
+ fname([DataDir, lib, sasl, ebin])],
?line ok = file:set_cwd(LatestDir),
@@ -1939,34 +2002,41 @@ create_script(latest_no_mod_vsn,Config) ->
{filename:dirname(Name), filename:basename(Name)};
create_script(latest0,Config) ->
?line PrivDir = ?privdir,
- ?line Name = fname(PrivDir, 'latest-1'),
+ ?line Name = fname(PrivDir, latest0),
?line {ok,Fd} = file:open(Name++".rel",write),
- ?line io:format(Fd,
- "{release, {\"Test release 2\", \"LATEST0\"}, \n"
- " {erts, \"4.4\"}, \n"
- " [{kernel, \"1.0\"}, {stdlib, \"1.0\"}, \n"
- " {db, \"2.1\"}, {fe, \"3.1\"}]}.\n",
- []),
+ ?line RelfileContent =
+ {release,{"Test release 2", "LATEST0"},
+ {erts,"4.4"},
+ [{kernel,"1.0"},
+ {stdlib,"1.0"},
+ {sasl,"1.0"},
+ {db,"2.1"},
+ {fe,"3.1"}]},
+ ?line io:format(Fd,"~p.~n",[RelfileContent]),
?line ok = file:close(Fd),
{filename:dirname(Name), filename:basename(Name)};
-create_script(latest1,Config) ->
+create_script(latest0_current_erts,Config) ->
?line PrivDir = ?privdir,
- ?line Name = fname(PrivDir, latest),
+ ?line Name = fname(PrivDir, latest0_current_erts),
+ ?line ErtsVer = erlang:system_info(version),
?line {ok,Fd} = file:open(Name++".rel",write),
- ?line io:format(Fd,
- "{release, {\"Test release 2\", \"LATEST1\"}, \n"
- " {erts, \"4.4\"}, \n"
- " [{kernel, \"1.0\"}, {stdlib, \"1.0\"}, \n"
- " {db, \"1.0\"}, {fe, \"3.1\"}]}.\n",
- []),
+ ?line RelfileContent =
+ {release,{"Test release 2", "LATEST0_CURRENT_ERTS"},
+ {erts,ErtsVer},
+ [{kernel,"1.0"}, % fake - will never happen for real that
+ {stdlib,"1.0"}, % erts changes verson but not kernel, stdlib, sasl
+ {sasl,"1.0"},
+ {db,"2.1"},
+ {fe,"3.1"}]},
+ ?line io:format(Fd,"~p.~n",[RelfileContent]),
?line ok = file:close(Fd),
{filename:dirname(Name), filename:basename(Name)};
-create_script(latest1_sasl,Config) ->
+create_script(latest1,Config) ->
?line PrivDir = ?privdir,
- ?line Name = fname(PrivDir, latest_sasl),
+ ?line Name = fname(PrivDir, latest1),
?line {ok,Fd} = file:open(Name++".rel",write),
?line RelfileContent =
- {release,{"Test release 2", "LATEST1_SASL"},
+ {release,{"Test release 2", "LATEST1"},
{erts,"4.4"},
[{kernel,"1.0"},
{stdlib,"1.0"},
@@ -1976,16 +2046,15 @@ create_script(latest1_sasl,Config) ->
?line io:format(Fd,"~p.~n",[RelfileContent]),
?line ok = file:close(Fd),
{filename:dirname(Name), filename:basename(Name)};
-create_script(latest1_current_erts,Config) ->
+create_script(latest1_no_sasl,Config) ->
?line PrivDir = ?privdir,
- ?line Name = fname(PrivDir, 'latest_current_erts'),
- ?line ErtsVer = erlang:system_info(version),
+ ?line Name = fname(PrivDir, latest1_no_sasl),
?line {ok,Fd} = file:open(Name++".rel",write),
?line RelfileContent =
- {release,{"Test release 2", "LATEST1_CURRENT_ERTS"},
- {erts,ErtsVer},
- [{kernel,"1.0"}, % fake - will never happen for real that
- {stdlib,"1.0"}, % erts changes verson but not kernel and stdlib.
+ {release,{"Test release 2", "LATEST1_NO_SASL"},
+ {erts,"4.4"},
+ [{kernel,"1.0"},
+ {stdlib,"1.0"},
{db,"1.0"},
{fe,"3.1"}]},
?line io:format(Fd,"~p.~n",[RelfileContent]),
@@ -1993,7 +2062,7 @@ create_script(latest1_current_erts,Config) ->
{filename:dirname(Name), filename:basename(Name)};
create_script(latest2,Config) ->
?line PrivDir = ?privdir,
- ?line Name = fname(PrivDir, 'latest-2'),
+ ?line Name = fname(PrivDir, latest2),
?line {ok,Fd} = file:open(Name++".rel",write),
?line io:format(Fd,
"{release, {\"Test release 1\", \"LATEST2\"}, \n"
@@ -2126,9 +2195,9 @@ create_script(current_all_no_sasl,Config) ->
?line io:format(Fd,"~p.~n",[RelfileContent]),
?line ok = file:close(Fd),
{filename:dirname(Name), filename:basename(Name)};
-create_script(current_all_sasl,Config) ->
+create_script(current_all,Config) ->
?line PrivDir = ?privdir,
- ?line Name = fname(PrivDir, 'current_all_sasl'),
+ ?line Name = fname(PrivDir, current_all),
?line ErtsVer = erlang:system_info(version),
?line application:load(sasl),
?line Apps = application_controller:loaded_applications(),
@@ -2137,7 +2206,7 @@ create_script(current_all_sasl,Config) ->
?line {value,{_,_,SaslVer}} = lists:keysearch(sasl,1,Apps),
?line {ok,Fd} = file:open(Name++".rel",write),
?line RelfileContent =
- {release,{"Test release 4", "CURRENT_ALL_SASL"},
+ {release,{"Test release 4", "CURRENT_ALL"},
{erts,ErtsVer},
[{kernel,KernelVer},
{stdlib,StdlibVer},
@@ -2145,6 +2214,46 @@ create_script(current_all_sasl,Config) ->
{db,"2.1"}]},% fe left out here on purpose - for normal_hybrid test
?line io:format(Fd,"~p.~n",[RelfileContent]),
?line ok = file:close(Fd),
+ {filename:dirname(Name), filename:basename(Name)};
+create_script(current_all_future_erts,Config) ->
+ ?line PrivDir = ?privdir,
+ ?line Name = fname(PrivDir, current_all_future_erts),
+ ?line application:load(sasl),
+ ?line Apps = application_controller:loaded_applications(),
+ ?line {value,{_,_,KernelVer}} = lists:keysearch(kernel,1,Apps),
+ ?line {value,{_,_,StdlibVer}} = lists:keysearch(stdlib,1,Apps),
+ ?line {value,{_,_,SaslVer}} = lists:keysearch(sasl,1,Apps),
+ ?line {ok,Fd} = file:open(Name++".rel",write),
+ ?line RelfileContent =
+ {release,{"Test release 4", "CURRENT_ALL_FUTURE_ERTS"},
+ {erts,"99.99"},
+ [{kernel,KernelVer},
+ {stdlib,StdlibVer},
+ {sasl,SaslVer},
+ {db,"2.1"},
+ {fe,"3.1"}]},
+ ?line io:format(Fd,"~p.~n",[RelfileContent]),
+ ?line ok = file:close(Fd),
+ {filename:dirname(Name), filename:basename(Name)};
+create_script(current_all_future_sasl,Config) ->
+ ?line PrivDir = ?privdir,
+ ?line Name = fname(PrivDir, current_all_future_sasl),
+ ?line ErtsVer = erlang:system_info(version),
+ ?line application:load(sasl),
+ ?line Apps = application_controller:loaded_applications(),
+ ?line {value,{_,_,KernelVer}} = lists:keysearch(kernel,1,Apps),
+ ?line {value,{_,_,StdlibVer}} = lists:keysearch(stdlib,1,Apps),
+ ?line {ok,Fd} = file:open(Name++".rel",write),
+ ?line RelfileContent =
+ {release,{"Test release 4", "CURRENT_ALL_FUTURE_SASL"},
+ {erts,ErtsVer},
+ [{kernel,KernelVer},
+ {stdlib,StdlibVer},
+ {sasl,"9.9"},
+ {db,"2.1"},
+ {fe,"3.1"}]},
+ ?line io:format(Fd,"~p.~n",[RelfileContent]),
+ ?line ok = file:close(Fd),
{filename:dirname(Name), filename:basename(Name)}.
diff --git a/lib/sasl/test/systools_SUITE_data/lib/sasl-9.9/ebin/sasl.app b/lib/sasl/test/systools_SUITE_data/lib/sasl-9.9/ebin/sasl.app
new file mode 100644
index 0000000000..3bcc1a4619
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/lib/sasl-9.9/ebin/sasl.app
@@ -0,0 +1,6 @@
+{application, sasl,
+ [{description, "FAKE FUTURE SASL"},
+ {vsn, "9.9"},
+ {modules, []},
+ {registered, []},
+ {applications, []}]}.
diff --git a/lib/sasl/test/systools_SUITE_data/lib/sasl-9.9/ebin/sasl.appup b/lib/sasl/test/systools_SUITE_data/lib/sasl-9.9/ebin/sasl.appup
new file mode 100644
index 0000000000..cff0c69b6e
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/lib/sasl-9.9/ebin/sasl.appup
@@ -0,0 +1,12 @@
+%%
+%% Fake release upgrade script for sasl
+%%
+
+{
+ "9.9",
+ [{<<".+">>,[restart_new_emulator]}
+ ],
+
+ [{<<".+">>,[restart_new_emulator]}
+ ]
+}.