aboutsummaryrefslogtreecommitdiffstats
path: root/lib/megaco/test/megaco_appup_test.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2013-04-19 17:39:51 +0200
committerMicael Karlberg <[email protected]>2013-04-19 17:39:51 +0200
commit8613f8153a639ea88edeb9f7d89270072e8c2d8a (patch)
tree9cae243b4a29c9c131c4eb943af17e1075962cae /lib/megaco/test/megaco_appup_test.erl
parente9ba299b0f6c53cce6fd7202d67c78800ba89fcf (diff)
parent0c0677a913d10b87dd4faa3fc932506f98adcc45 (diff)
downloadotp-8613f8153a639ea88edeb9f7d89270072e8c2d8a.tar.gz
otp-8613f8153a639ea88edeb9f7d89270072e8c2d8a.tar.bz2
otp-8613f8153a639ea88edeb9f7d89270072e8c2d8a.zip
Merge branch 'bmk/megaco/flex_buffer_overrun_while_scanning_prop_parms/OTP-10998/r15' into bmk/megaco/flex_buffer_overrun_while_scanning_prop_parms/OTP-10998/r16
Conflicts: lib/megaco/doc/src/notes.xml lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src lib/megaco/test/megaco_codec_prev3a_test.erl lib/megaco/test/megaco_codec_prev3b_test.erl lib/megaco/test/megaco_codec_prev3c_test.erl lib/megaco/test/megaco_codec_v1_test.erl lib/megaco/test/megaco_codec_v2_test.erl lib/megaco/test/megaco_codec_v3_test.erl lib/megaco/vsn.mk
Diffstat (limited to 'lib/megaco/test/megaco_appup_test.erl')
-rw-r--r--lib/megaco/test/megaco_appup_test.erl31
1 files changed, 28 insertions, 3 deletions
diff --git a/lib/megaco/test/megaco_appup_test.erl b/lib/megaco/test/megaco_appup_test.erl
index 40eebcae86..fce6cf3cba 100644
--- a/lib/megaco/test/megaco_appup_test.erl
+++ b/lib/megaco/test/megaco_appup_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-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,6 +309,9 @@ instruction_module(Instr) ->
%% Check that the modules handled in an instruction set for version X
%% is a subset of the instruction set for version X-1.
check_module_subset(Instructions) ->
+ %% io:format("check_module_subset -> "
+ %% "~n Instructions: ~p"
+ %% "~n", [Instructions]),
do_check_module_subset(modules_of(Instructions)).
do_check_module_subset([]) ->
@@ -316,6 +319,11 @@ do_check_module_subset([]) ->
do_check_module_subset([_]) ->
ok;
do_check_module_subset([{_V1, Mods1}|T]) ->
+ %% io:format("do_check_module_subset -> "
+ %% "~n V1: ~p"
+ %% "~n Mods1: ~p"
+ %% "~n T: ~p"
+ %% "~n", [_V1, Mods1, T]),
{V2, Mods2} = hd(T),
%% Check that the modules in V1 is a subset of V2
case do_check_module_subset2(Mods1, Mods2) of
@@ -347,8 +355,21 @@ modules_of(Instructions) ->
modules_of([], Acc) ->
lists:reverse(Acc);
modules_of([{V,Instructions}|T], Acc) ->
- Mods = modules_of2(Instructions, []),
- modules_of(T, [{V, Mods}|Acc]).
+ %% io:format("modules_of -> "
+ %% "~n V: ~p"
+ %% "~n Instructions: ~p"
+ %% "~n", [V, Instructions]),
+ case modules_of2(Instructions, []) of
+ Mods when is_list(Mods) ->
+ %% io:format("modules_of -> "
+ %% "~n Mods: ~p"
+ %% "~n", [Mods]),
+ modules_of(T, [{V, Mods}|Acc]);
+ skip ->
+ %% io:format("modules_of -> skip"
+ %% "~n", []),
+ modules_of(T, Acc)
+ end.
modules_of2([], Acc) ->
lists:reverse(Acc);
@@ -356,6 +377,8 @@ modules_of2([Instr|Instructions], Acc) ->
case module_of(Instr) of
{value, Mod} ->
modules_of2(Instructions, [Mod|Acc]);
+ skip ->
+ skip;
false ->
modules_of2(Instructions, Acc)
end.
@@ -368,6 +391,8 @@ module_of({load_module, Module, _Pre, _Post, _Depend}) ->
{value, Module};
module_of({update, Module, _Change, _Pre, _Post, _Depend}) ->
{value, Module};
+module_of({restart_application, _App}) ->
+ skip;
module_of(_) ->
false.