diff options
author | Siri Hansen <[email protected]> | 2011-11-08 12:07:23 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2011-11-17 16:59:09 +0100 |
commit | abae78750427c8696c89e57869b4bcebef168fe5 (patch) | |
tree | 65d8c324f4e47e0db1d6127edb64ecc761bd8748 /lib/sasl/test/release_handler_SUITE.erl | |
parent | ae1c361f797a104a35aef967cc694b457217f488 (diff) | |
download | otp-abae78750427c8696c89e57869b4bcebef168fe5.tar.gz otp-abae78750427c8696c89e57869b4bcebef168fe5.tar.bz2 otp-abae78750427c8696c89e57869b4bcebef168fe5.zip |
Add syntax check of relup to check_install_release and install_release
This commit adds a check that all instructions in the relup are
valid. Earlier, the last part (after point_of_no_return) was not
checked before the actual installation started, meaning that if the
relup was hand written, there was a potential for crashing the upgrade
here.
Diffstat (limited to 'lib/sasl/test/release_handler_SUITE.erl')
-rw-r--r-- | lib/sasl/test/release_handler_SUITE.erl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 958f6bbfc9..12f86365a3 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -60,7 +60,8 @@ cases() -> [otp_2740, otp_2760, otp_5761, otp_9402, otp_9417, otp_9395_check_old_code, otp_9395_check_and_purge, otp_9395_update_many_mods, otp_9395_rm_many_mods, - instructions, eval_appup, supervisor_which_children_timeout]. + instructions, eval_appup, supervisor_which_children_timeout, + install_release_syntax_check]. groups() -> [{release,[], @@ -620,6 +621,22 @@ supervisor_which_children_timeout(Conf) -> supervisor_which_children_timeout(cleanup, Conf) -> stop_node(node_name(supervisor_which_children_timeout)). + +%% Test that check_install_release will fail for illegal relup +%% instructions, even after point of no return. +install_release_syntax_check(Conf) when is_list(Conf) -> + + S1 = [point_of_no_return, illegal_instruction], + {error,{illegal_instruction_after_point_of_no_return,illegal_instruction}} = + release_handler_1:check_script(S1,[]), + + S2 = [point_of_no_return,restart_new_emulator], + {error,{illegal_instruction_after_point_of_no_return,restart_new_emulator}} = + release_handler_1:check_script(S2,[]), + + ok. + + %%----------------------------------------------------------------- %% Ticket: OTP-2740 %% Slogan: vsn not numeric doesn't work so good in release_handling |