aboutsummaryrefslogtreecommitdiffstats
path: root/lib/megaco/test/megaco_codec_v1_test.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2013-04-30 18:00:23 +0200
committerErlang/OTP <[email protected]>2013-04-30 18:00:23 +0200
commite820193932ba124378102bb6823a837277ac9b87 (patch)
tree3566a2c5d462e8b9b2bd69cc4af77232d21aae1f /lib/megaco/test/megaco_codec_v1_test.erl
parentc9a6ea38eb2a2a3c3d91e3905ce561fd001320be (diff)
parentd7b7a545ab88088e53e632f2a24824861b60ec48 (diff)
downloadotp-maint-r14.tar.gz
otp-maint-r14.tar.bz2
otp-maint-r14.zip
Merge branch 'bmk/megaco/flex_buffer_overrun_while_scanning_prop_parms/OTP-10998/r14' into maint-r14maint-r14
* bmk/megaco/flex_buffer_overrun_while_scanning_prop_parms/OTP-10998/r14: [megaco] Used wrong downgrade tag for (flex) handler [megaco] Misc codec tickets test case fixes [megaco] Misc fixes of the (internal) megaco test server Changed name of test case functions (from seq12263 to otp10998) Assign correct version and updated release notes accordingly. Removed comments Ensure of incorrect number of terms when scanning property groups Uncommented test cases Add new messages Calculation of term_spec size (initial and next) changed Minor test case rework Test case cleanup Add rule for test beam'es Preliminary test case updates
Diffstat (limited to 'lib/megaco/test/megaco_codec_v1_test.erl')
-rw-r--r--lib/megaco/test/megaco_codec_v1_test.erl110
1 files changed, 47 insertions, 63 deletions
diff --git a/lib/megaco/test/megaco_codec_v1_test.erl b/lib/megaco/test/megaco_codec_v1_test.erl
index 3a548c4d9e..5ecfe5aa5e 100644
--- a/lib/megaco/test/megaco_codec_v1_test.erl
+++ b/lib/megaco/test/megaco_codec_v1_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2003-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
@@ -420,20 +420,9 @@ decode_text_messages(Codec, Config, [Msg|Msgs], Acc) ->
%% ----
-expand(RootCase) ->
- expand([RootCase], []).
-
-expand([], Acc) ->
- lists:flatten(lists:reverse(Acc));
-expand([Case|Cases], Acc) ->
- case (catch apply(?MODULE,Case,[suite])) of
- [] ->
- expand(Cases, [Case|Acc]);
- C when is_list(C) ->
- expand(Cases, [expand(C, [])|Acc]);
- _ ->
- expand(Cases, [Case|Acc])
- end.
+tickets() ->
+ %% io:format("~w:tickets -> entry~n", [?MODULE]),
+ megaco_test_lib:tickets(?MODULE).
%% ----
@@ -602,61 +591,56 @@ end_per_group(_GroupName, Config) ->
Config.
flex_pretty_cases() ->
- [flex_pretty_test_msgs].
+ [
+ flex_pretty_test_msgs
+ ].
flex_compact_cases() ->
- [flex_compact_test_msgs, flex_compact_dm_timers1,
- flex_compact_dm_timers2, flex_compact_dm_timers3,
- flex_compact_dm_timers4, flex_compact_dm_timers5,
- flex_compact_dm_timers6].
-
-%% Support for per_bin was added to ASN.1 as of version
-%% 1.3.2 (R8). And later merged into 1.3.1.3 (R7). These
-%% releases are identical (as far as I know).
-%%
+ [
+ flex_compact_test_msgs,
+ flex_compact_dm_timers1,
+ flex_compact_dm_timers2,
+ flex_compact_dm_timers3,
+ flex_compact_dm_timers4,
+ flex_compact_dm_timers5,
+ flex_compact_dm_timers6
+ ].
flex_compact_tickets_cases() ->
- [flex_compact_otp7431_msg01a,
- flex_compact_otp7431_msg01b, flex_compact_otp7431_msg02,
- flex_compact_otp7431_msg03, flex_compact_otp7431_msg04,
- flex_compact_otp7431_msg05, flex_compact_otp7431_msg06,
- flex_compact_otp7431_msg07].
+ [
+ flex_compact_otp7431_msg01a,
+ flex_compact_otp7431_msg01b,
+ flex_compact_otp7431_msg02,
+ flex_compact_otp7431_msg03,
+ flex_compact_otp7431_msg04,
+ flex_compact_otp7431_msg05,
+ flex_compact_otp7431_msg06,
+ flex_compact_otp7431_msg07
+ ].
flex_pretty_tickets_cases() ->
- [flex_pretty_otp5042_msg1, flex_pretty_otp5085_msg1,
- flex_pretty_otp5085_msg2, flex_pretty_otp5085_msg3,
- flex_pretty_otp5085_msg4, flex_pretty_otp5085_msg5,
- flex_pretty_otp5085_msg6, flex_pretty_otp5085_msg7,
- flex_pretty_otp5600_msg1, flex_pretty_otp5600_msg2,
- flex_pretty_otp5601_msg1, flex_pretty_otp5793_msg01,
- flex_pretty_otp7431_msg01, flex_pretty_otp7431_msg02,
- flex_pretty_otp7431_msg03, flex_pretty_otp7431_msg04,
- flex_pretty_otp7431_msg05, flex_pretty_otp7431_msg06,
- flex_pretty_otp7431_msg07].
-
-%% ----
+ [
+ flex_pretty_otp5042_msg1,
+ flex_pretty_otp5085_msg1,
+ flex_pretty_otp5085_msg2,
+ flex_pretty_otp5085_msg3,
+ flex_pretty_otp5085_msg4,
+ flex_pretty_otp5085_msg5,
+ flex_pretty_otp5085_msg6,
+ flex_pretty_otp5085_msg7,
+ flex_pretty_otp5600_msg1,
+ flex_pretty_otp5600_msg2,
+ flex_pretty_otp5601_msg1,
+ flex_pretty_otp5793_msg01,
+ flex_pretty_otp7431_msg01,
+ flex_pretty_otp7431_msg02,
+ flex_pretty_otp7431_msg03,
+ flex_pretty_otp7431_msg04,
+ flex_pretty_otp7431_msg05,
+ flex_pretty_otp7431_msg06,
+ flex_pretty_otp7431_msg07
+ ].
-tickets() ->
- Flag = process_flag(trap_exit, true),
- Cases = expand(tickets),
- Fun = fun(Case) ->
- C = init_per_testcase(Case, [{tc_timeout,
- timer:minutes(10)}]),
- io:format("Eval ~w~n", [Case]),
- Result =
- case (catch apply(?MODULE, Case, [C])) of
- {'EXIT', Reason} ->
- io:format("~n~p exited:~n ~p~n",
- [Case, Reason]),
- {error, {Case, Reason}};
- Res ->
- Res
- end,
- end_per_testcase(Case, C),
- Result
- end,
- process_flag(trap_exit, Flag),
- lists:map(Fun, Cases).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%