~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/snmp/test/snmp_agent_v3_test.erl

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%% 
2
2
%% %CopyrightBegin%
3
3
%% 
4
 
%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
5
5
%% 
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
28
28
-define(application, snmp).
29
29
 
30
30
-include_lib("kernel/include/file.hrl").
31
 
-include("test_server.hrl").
 
31
-include_lib("test_server/include/test_server.hrl").
32
32
-include("snmp_test_lib.hrl").
33
33
-define(SNMP_USE_V3, true).
34
34
-include_lib("snmp/include/snmp_types.hrl").
83
83
                   _ -> V3
84
84
               end).
85
85
 
86
 
all(suite) -> {req,
87
 
               [mnesia, distribution,
88
 
                {local_slave_nodes, 2}, {time, 360}],
89
 
               [{conf, init_all, cases(), finish_all}]}.
 
86
all() -> 
 
87
[cases()].
 
88
 
 
89
groups() -> 
 
90
    [{mib_storage, [],
 
91
  [{group, mib_storage_ets}, {group, mib_storage_dets},
 
92
   {group, mib_storage_mnesia},
 
93
   {group, mib_storage_size_check_ets},
 
94
   {group, mib_storage_size_check_dets},
 
95
   {group, mib_storage_size_check_mnesia},
 
96
   {group, mib_storage_varm_dets},
 
97
   {group, mib_storage_varm_mnesia}]},
 
98
 {mib_storage_ets, [], mib_storage_ets_cases()},
 
99
 {mib_storage_dets, [], mib_storage_dets_cases()},
 
100
 {mib_storage_mnesia, [], mib_storage_mnesia_cases()},
 
101
 {mib_storage_size_check_ets, [],
 
102
  mse_size_check_cases()},
 
103
 {mib_storage_size_check_dets, [],
 
104
  msd_size_check_cases()},
 
105
 {mib_storage_size_check_mnesia, [],
 
106
  msm_size_check_cases()},
 
107
 {mib_storage_varm_dets, [],
 
108
  varm_mib_storage_dets_cases()},
 
109
 {mib_storage_varm_mnesia, [],
 
110
  varm_mib_storage_mnesia_cases()},
 
111
 {test_v1, [], v1_cases()}, {test_v2, [], v2_cases()},
 
112
 {test_v1_v2, [], v1_v2_cases()},
 
113
 {test_v3, [], v3_cases()},
 
114
 {test_multi_threaded, [], mt_cases()},
 
115
 {multiple_reqs, [], mul_cases()},
 
116
 {multiple_reqs_2, [], mul_cases_2()},
 
117
 {v2_inform, [], [v2_inform_i]},
 
118
 {v3_security, [],
 
119
  [v3_crypto_basic, v3_md5_auth, v3_sha_auth,
 
120
   v3_des_priv]},
 
121
 {standard_mibs, [],
 
122
  [snmp_standard_mib, snmp_community_mib,
 
123
   snmp_framework_mib, snmp_target_mib,
 
124
   snmp_notification_mib, snmp_view_based_acm_mib]},
 
125
 {standard_mibs_2, [],
 
126
  [snmpv2_mib_2, snmp_community_mib_2,
 
127
   snmp_framework_mib_2, snmp_target_mib_2,
 
128
   snmp_notification_mib_2, snmp_view_based_acm_mib_2]},
 
129
 {standard_mibs_3, [],
 
130
  [snmpv2_mib_3, snmp_framework_mib_3, snmp_mpd_mib_3,
 
131
   snmp_target_mib_3, snmp_notification_mib_3,
 
132
   snmp_view_based_acm_mib_3, snmp_user_based_sm_mib_3]},
 
133
 {reported_bugs, [],
 
134
  [otp_1128, otp_1129, otp_1131, otp_1162, otp_1222,
 
135
   otp_1298, otp_1331, otp_1338, otp_1342, otp_2776,
 
136
   otp_2979, otp_3187, otp_3725]},
 
137
 {reported_bugs_2, [],
 
138
  [otp_1128_2, otp_1129_2, otp_1131_2, otp_1162_2,
 
139
   otp_1222_2, otp_1298_2, otp_1331_2, otp_1338_2,
 
140
   otp_1342_2, otp_2776_2, otp_2979_2, otp_3187_2]},
 
141
 {reported_bugs_3, [],
 
142
  [otp_1128_3, otp_1129_3, otp_1131_3, otp_1162_3,
 
143
   otp_1222_3, otp_1298_3, otp_1331_3, otp_1338_3,
 
144
   otp_1342_3, otp_2776_3, otp_2979_3, otp_3187_3,
 
145
   otp_3542]},
 
146
 {tickets, [], [{group, otp_4394}]},
 
147
 {otp_4394, [], [otp_4394_test]}].
 
148
 
 
149
init_per_group(otp_4394, Config) -> 
 
150
        init_otp_4394(Config);
 
151
init_per_group(v2_inform, Config) -> 
 
152
        init_v2_inform(Config);
 
153
init_per_group(multiple_reqs_2, Config) -> 
 
154
        init_mul(Config);
 
155
init_per_group(multiple_reqs, Config) -> 
 
156
        init_mul(Config);
 
157
init_per_group(test_multi_threaded, Config) -> 
 
158
        init_mt(Config);
 
159
init_per_group(test_v3, Config) -> 
 
160
        init_v3(Config);
 
161
init_per_group(test_v1_v2, Config) -> 
 
162
        init_v1_v2(Config);
 
163
init_per_group(test_v2, Config) -> 
 
164
        init_v2(Config);
 
165
init_per_group(test_v1, Config) -> 
 
166
        init_v1(Config);
 
167
init_per_group(mib_storage_varm_mnesia, Config) -> 
 
168
        init_varm_mib_storage_mnesia(Config);
 
169
init_per_group(mib_storage_varm_dets, Config) -> 
 
170
        init_varm_mib_storage_dets(Config);
 
171
init_per_group(mib_storage_size_check_mnesia, Config) -> 
 
172
        init_size_check_msm(Config);
 
173
init_per_group(mib_storage_size_check_dets, Config) -> 
 
174
        init_size_check_msd(Config);
 
175
init_per_group(mib_storage_size_check_ets, Config) -> 
 
176
        init_size_check_mse(Config);
 
177
init_per_group(mib_storage_mnesia, Config) -> 
 
178
        init_mib_storage_mnesia(Config);
 
179
init_per_group(mib_storage_dets, Config) -> 
 
180
        init_mib_storage_dets(Config);
 
181
init_per_group(mib_storage_ets, Config) -> 
 
182
        init_mib_storage_ets(Config);
 
183
init_per_group(_GroupName, Config) ->
 
184
        Config.
 
185
 
 
186
end_per_group(otp_4394, Config) -> 
 
187
        finish_otp_4394(Config);
 
188
end_per_group(v2_inform, Config) -> 
 
189
        finish_v2_inform(Config);
 
190
end_per_group(multiple_reqs_2, Config) -> 
 
191
        finish_mul(Config);
 
192
end_per_group(multiple_reqs, Config) -> 
 
193
        finish_mul(Config);
 
194
end_per_group(test_multi_threaded, Config) -> 
 
195
        finish_mt(Config);
 
196
end_per_group(test_v3, Config) -> 
 
197
        finish_v3(Config);
 
198
end_per_group(test_v1_v2, Config) -> 
 
199
        finish_v1_v2(Config);
 
200
end_per_group(test_v2, Config) -> 
 
201
        finish_v2(Config);
 
202
end_per_group(test_v1, Config) -> 
 
203
        finish_v1(Config);
 
204
end_per_group(mib_storage_varm_mnesia, Config) -> 
 
205
        finish_varm_mib_storage_mnesia(Config);
 
206
end_per_group(mib_storage_varm_dets, Config) -> 
 
207
        finish_varm_mib_storage_dets(Config);
 
208
end_per_group(mib_storage_size_check_mnesia, Config) -> 
 
209
        finish_size_check_msm(Config);
 
210
end_per_group(mib_storage_size_check_dets, Config) -> 
 
211
        finish_size_check_msd(Config);
 
212
end_per_group(mib_storage_size_check_ets, Config) -> 
 
213
        finish_size_check_mse(Config);
 
214
end_per_group(mib_storage_mnesia, Config) -> 
 
215
        finish_mib_storage_mnesia(Config);
 
216
end_per_group(mib_storage_dets, Config) -> 
 
217
        finish_mib_storage_dets(Config);
 
218
end_per_group(mib_storage_ets, Config) -> 
 
219
        finish_mib_storage_ets(Config);
 
220
end_per_group(_GroupName, Config) ->
 
221
        Config.
 
222
 
90
223
 
91
224
init_per_testcase(_Case, Config) when list(Config) ->
92
225
    Dog = ?t:timetrap(?t:minutes(6)),
93
226
    [{watchdog, Dog}|Config].
94
227
 
95
 
fin_per_testcase(_Case, Config) when list(Config) ->
 
228
end_per_testcase(_Case, Config) when list(Config) ->
96
229
    Dog = ?config(watchdog, Config),
97
230
    ?t:timetrap_cancel(Dog),
98
231
    Config.
99
232
 
100
 
cases() ->
101
 
    case ?OSTYPE() of
102
 
        vxworks ->
103
 
            %% No crypto app, so skip v3 testcases
104
 
            [
105
 
             app_info, 
106
 
             test_v1, test_v2, test_v1_v2, 
107
 
             test_multi_threaded, 
108
 
             mib_storage, 
109
 
             tickets];
110
 
        _Else ->
111
 
            [
112
 
             app_info, 
113
 
             test_v1, test_v2, test_v1_v2, test_v3, 
114
 
             test_multi_threaded, 
115
 
             mib_storage, 
116
 
             tickets
117
 
            ]
118
 
    end.
 
233
cases() -> 
 
234
case ?OSTYPE() of
 
235
  vxworks ->
 
236
      [app_info, {group, test_v1}, {group, test_v2},
 
237
       {group, test_v1_v2}, {group, test_multi_threaded},
 
238
       {group, mib_storage}, {group, tickets}];
 
239
  _Else ->
 
240
      [app_info, {group, test_v1}, {group, test_v2},
 
241
       {group, test_v1_v2}, {group, test_v3},
 
242
       {group, test_multi_threaded}, {group, mib_storage},
 
243
       {group, tickets}]
 
244
end.
119
245
 
120
246
 
121
247
%%%-----------------------------------------------------------------
460
586
%% <base>, and a second version <base>_2.  There may be several
461
587
%% versions as well, <base>_N.
462
588
%%-----------------------------------------------------------------
463
 
mib_storage(suite) -> [
464
 
                       mib_storage_ets, 
465
 
                       mib_storage_dets, 
466
 
                       mib_storage_mnesia,
467
 
                       mib_storage_size_check_ets,
468
 
                       mib_storage_size_check_dets,
469
 
                       mib_storage_size_check_mnesia,
470
 
                       mib_storage_varm_dets,
471
 
                       mib_storage_varm_mnesia
472
 
                      ].
473
 
 
474
 
mib_storage_ets(suite) -> {req, [], {conf, init_mib_storage_ets, 
475
 
                                     mib_storage_ets_cases(), 
476
 
                                     finish_mib_storage_ets}}.
477
 
 
478
 
mib_storage_dets(suite) -> {req, [], {conf, init_mib_storage_dets, 
479
 
                                     mib_storage_dets_cases(), 
480
 
                                     finish_mib_storage_dets}}.
481
 
 
482
 
mib_storage_mnesia(suite) -> {req, [], {conf, init_mib_storage_mnesia, 
483
 
                                        mib_storage_mnesia_cases(), 
484
 
                                        finish_mib_storage_mnesia}}.
485
 
 
486
 
mib_storage_size_check_ets(suite) -> 
487
 
    {req, [], {conf, 
488
 
               init_size_check_mse, 
489
 
               mse_size_check_cases(), 
490
 
               finish_size_check_mse}}.
491
 
 
492
 
mib_storage_size_check_dets(suite) -> 
493
 
    {req, [], {conf, 
494
 
               init_size_check_msd, 
495
 
               msd_size_check_cases(), 
496
 
               finish_size_check_msd}}.
497
 
 
498
 
mib_storage_size_check_mnesia(suite) -> 
499
 
    {req, [], {conf, 
500
 
               init_size_check_msm, 
501
 
               msm_size_check_cases(), 
502
 
               finish_size_check_msm}}.
503
 
 
504
 
mib_storage_varm_dets(suite) -> 
505
 
    {req, [], {conf, 
506
 
               init_varm_mib_storage_dets, 
507
 
               varm_mib_storage_dets_cases(), 
508
 
               finish_varm_mib_storage_dets}}.
509
 
 
510
 
mib_storage_varm_mnesia(suite) -> 
511
 
    {req, [], {conf, 
512
 
               init_varm_mib_storage_mnesia, 
513
 
               varm_mib_storage_mnesia_cases(), 
514
 
               finish_varm_mib_storage_mnesia}}.
515
 
 
516
 
mib_storage_ets_cases() ->
517
 
    [
518
 
     mse_simple, 
519
 
     mse_v1_processing, 
520
 
     mse_big, 
521
 
     mse_big2, 
522
 
     mse_loop_mib, 
523
 
     mse_api, 
524
 
     mse_sa_register, 
525
 
     mse_v1_trap, 
526
 
     mse_sa_error, 
527
 
     mse_next_across_sa, 
528
 
     mse_undo,
529
 
     mse_standard_mib, 
530
 
     mse_community_mib, 
531
 
     mse_framework_mib, 
532
 
     mse_target_mib, 
533
 
     mse_notification_mib, 
534
 
     mse_view_based_acm_mib, 
535
 
     mse_sparse_table,
536
 
     mse_me_of,
537
 
     mse_mib_of].
538
 
 
539
 
mib_storage_dets_cases() ->
540
 
    [
541
 
     msd_simple, 
542
 
     msd_v1_processing, 
543
 
     msd_big, 
544
 
     msd_big2, 
545
 
     msd_loop_mib, 
546
 
     msd_api, 
547
 
     msd_sa_register, 
548
 
     msd_v1_trap, 
549
 
     msd_sa_error, 
550
 
     msd_next_across_sa, 
551
 
     msd_undo,
552
 
     msd_standard_mib,
553
 
     msd_community_mib, 
554
 
     msd_framework_mib, 
555
 
     msd_target_mib, 
556
 
     msd_notification_mib, 
557
 
     msd_view_based_acm_mib, 
558
 
     msd_sparse_table,
559
 
     msd_me_of,
560
 
     msd_mib_of
561
 
    ].
562
 
 
563
 
mib_storage_mnesia_cases() ->
564
 
    [
565
 
     msm_simple, 
566
 
     msm_v1_processing, 
567
 
     msm_big, 
568
 
     msm_big2, 
569
 
     msm_loop_mib, 
570
 
     msm_api, 
571
 
     msm_sa_register, 
572
 
     msm_v1_trap, 
573
 
     msm_sa_error, 
574
 
     msm_next_across_sa, 
575
 
     msm_undo,
576
 
     msm_standard_mib, 
577
 
     msm_community_mib, 
578
 
     msm_framework_mib, 
579
 
     msm_target_mib, 
580
 
     msm_notification_mib, 
581
 
     msm_view_based_acm_mib, 
582
 
     msm_sparse_table,
583
 
     msm_me_of,
584
 
     msm_mib_of
585
 
    ].
586
 
 
587
 
mse_size_check_cases() ->
588
 
    [mse_size_check].
589
 
 
590
 
msd_size_check_cases() ->
591
 
    [msd_size_check].
592
 
 
593
 
msm_size_check_cases() ->
594
 
    [msm_size_check].
595
 
 
596
 
varm_mib_storage_dets_cases() ->
597
 
    [msd_varm_mib_start].
598
 
 
599
 
varm_mib_storage_mnesia_cases() ->
600
 
    [msm_varm_mib_start].
 
589
 
 
590
 
 
591
 
 
592
 
 
593
 
 
594
 
 
595
 
 
596
 
 
597
 
 
598
mib_storage_ets_cases() -> 
 
599
[mse_simple, mse_v1_processing, mse_big, mse_big2,
 
600
 mse_loop_mib, mse_api, mse_sa_register, mse_v1_trap,
 
601
 mse_sa_error, mse_next_across_sa, mse_undo,
 
602
 mse_standard_mib, mse_community_mib, mse_framework_mib,
 
603
 mse_target_mib, mse_notification_mib,
 
604
 mse_view_based_acm_mib, mse_sparse_table, mse_me_of,
 
605
 mse_mib_of].
 
606
 
 
607
mib_storage_dets_cases() -> 
 
608
[msd_simple, msd_v1_processing, msd_big, msd_big2,
 
609
 msd_loop_mib, msd_api, msd_sa_register, msd_v1_trap,
 
610
 msd_sa_error, msd_next_across_sa, msd_undo,
 
611
 msd_standard_mib, msd_community_mib, msd_framework_mib,
 
612
 msd_target_mib, msd_notification_mib,
 
613
 msd_view_based_acm_mib, msd_sparse_table, msd_me_of,
 
614
 msd_mib_of].
 
615
 
 
616
mib_storage_mnesia_cases() -> 
 
617
[msm_simple, msm_v1_processing, msm_big, msm_big2,
 
618
 msm_loop_mib, msm_api, msm_sa_register, msm_v1_trap,
 
619
 msm_sa_error, msm_next_across_sa, msm_undo,
 
620
 msm_standard_mib, msm_community_mib, msm_framework_mib,
 
621
 msm_target_mib, msm_notification_mib,
 
622
 msm_view_based_acm_mib, msm_sparse_table, msm_me_of,
 
623
 msm_mib_of].
 
624
 
 
625
mse_size_check_cases() -> 
 
626
[mse_size_check].
 
627
 
 
628
msd_size_check_cases() -> 
 
629
[msd_size_check].
 
630
 
 
631
msm_size_check_cases() -> 
 
632
[msm_size_check].
 
633
 
 
634
varm_mib_storage_dets_cases() -> 
 
635
[msd_varm_mib_start].
 
636
 
 
637
varm_mib_storage_mnesia_cases() -> 
 
638
[msm_varm_mib_start].
601
639
 
602
640
init_mib_storage_ets(Config) when list(Config) ->
603
641
    ?LOG("init_mib_storage_ets -> entry", []),
1099
1137
    end.
1100
1138
 
1101
1139
 
1102
 
test_v1(suite) -> {req, [], {conf, init_v1, v1_cases(), finish_v1}}.
1103
1140
 
1104
1141
%v1_cases() -> [loop_mib];
1105
 
v1_cases() ->
1106
 
    [simple, 
1107
 
     db_notify_client,
1108
 
     v1_processing, big, big2, loop_mib, 
1109
 
     api, subagent, mnesia, multiple_reqs,
1110
 
     sa_register, v1_trap, sa_error, next_across_sa, undo, reported_bugs,
1111
 
     standard_mibs, sparse_table, cnt_64, 
1112
 
     opaque,
1113
 
     % opaque].
1114
 
    
1115
 
     change_target_addr_config].  
 
1142
v1_cases() -> 
 
1143
[simple, db_notify_client, v1_processing, big, big2,
 
1144
 loop_mib, api, subagent, mnesia, {group, multiple_reqs},
 
1145
 sa_register, v1_trap, sa_error, next_across_sa, undo,
 
1146
 {group, reported_bugs}, {group, standard_mibs},
 
1147
 sparse_table, cnt_64, opaque, change_target_addr_config].  
1116
1148
 
1117
1149
init_v1(Config) when list(Config) ->
1118
1150
    ?line SaNode = ?config(snmp_sa, Config),
1129
1161
    delete_files(C1),
1130
1162
    lists:keydelete(vsn, 1, C1).
1131
1163
 
1132
 
test_v2(suite) -> {req, [], {conf, init_v2, v2_cases(), finish_v2}}.
1133
1164
 
1134
1165
%v2_cases() -> [loop_mib_2];
1135
 
v2_cases() ->
1136
 
    [simple_2, v2_processing, big_2, big2_2, loop_mib_2,
1137
 
     api_2, subagent_2, mnesia_2,
1138
 
     multiple_reqs_2, sa_register_2, v2_trap, v2_inform, sa_error_2,
1139
 
     next_across_sa_2, undo_2, reported_bugs_2, standard_mibs_2,
1140
 
     v2_types, implied, sparse_table_2, cnt_64_2, opaque_2, v2_caps].
 
1166
v2_cases() -> 
 
1167
[simple_2, v2_processing, big_2, big2_2, loop_mib_2,
 
1168
 api_2, subagent_2, mnesia_2, {group, multiple_reqs_2},
 
1169
 sa_register_2, v2_trap, {group, v2_inform}, sa_error_2,
 
1170
 next_across_sa_2, undo_2, {group, reported_bugs_2},
 
1171
 {group, standard_mibs_2}, v2_types, implied,
 
1172
 sparse_table_2, cnt_64_2, opaque_2, v2_caps].
1141
1173
 
1142
1174
init_v2(Config) when list(Config) ->
1143
1175
    SaNode = ?config(snmp_sa, Config),
1154
1186
    delete_files(C1),
1155
1187
    lists:keydelete(vsn, 1, C1).
1156
1188
 
1157
 
test_v1_v2(suite) -> {req, [], {conf, init_v1_v2, v1_v2_cases(), finish_v1_v2}}.
1158
1189
 
1159
 
v1_v2_cases() ->
1160
 
    [simple_bi].
 
1190
v1_v2_cases() -> 
 
1191
[simple_bi].
1161
1192
 
1162
1193
init_v1_v2(Config) when list(Config) ->
1163
1194
    SaNode = ?config(snmp_sa, Config),
1174
1205
    delete_files(C1),
1175
1206
    lists:keydelete(vsn, 1, C1).
1176
1207
 
1177
 
test_v3(suite) -> {req, [], {conf, init_v3, v3_cases(), finish_v3}}.
1178
1208
 
1179
1209
%v3_cases() -> [loop_mib_3];
1180
 
v3_cases() ->
1181
 
    [simple_3, v3_processing,
1182
 
     big_3, big2_3, api_3, subagent_3, mnesia_3, loop_mib_3,
1183
 
     multiple_reqs_3, sa_register_3, v3_trap, v3_inform, sa_error_3,
1184
 
     next_across_sa_3, undo_3, reported_bugs_3, standard_mibs_3,
1185
 
     v3_security,
1186
 
     v2_types_3, implied_3, sparse_table_3, cnt_64_3, opaque_3, v2_caps_3].
 
1210
v3_cases() -> 
 
1211
[simple_3, v3_processing, big_3, big2_3, api_3,
 
1212
 subagent_3, mnesia_3, loop_mib_3, multiple_reqs_3,
 
1213
 sa_register_3, v3_trap, v3_inform, sa_error_3,
 
1214
 next_across_sa_3, undo_3, {group, reported_bugs_3},
 
1215
 {group, standard_mibs_3}, {group, v3_security},
 
1216
 v2_types_3, implied_3, sparse_table_3, cnt_64_3,
 
1217
 opaque_3, v2_caps_3].
1187
1218
 
1188
1219
init_v3(Config) when list(Config) ->
1189
1220
    %% Make sure crypto works, otherwise start_agent will fail
1221
1252
    delete_files(C1),
1222
1253
    lists:keydelete(vsn, 1, C1).
1223
1254
 
1224
 
test_multi_threaded(suite) -> {req, [], {conf, init_mt, mt_cases(), finish_mt}}.
1225
1255
 
1226
 
mt_cases() ->
1227
 
    [multi_threaded, mt_trap].
 
1256
mt_cases() -> 
 
1257
[multi_threaded, mt_trap].
1228
1258
 
1229
1259
init_mt(Config) when list(Config) ->
1230
1260
    SaNode = ?config(snmp_sa, Config),
1739
1769
mnesia_3(X) -> mnesia(X).
1740
1770
 
1741
1771
 
1742
 
multiple_reqs(suite) ->
1743
 
    {req, [], {conf, init_mul, mul_cases(), finish_mul}}.
1744
1772
 
1745
 
mul_cases() ->
1746
 
    [mul_get, mul_get_err, mul_next, mul_next_err, mul_set_err].
 
1773
mul_cases() -> 
 
1774
[mul_get, mul_get_err, mul_next, mul_next_err,
 
1775
 mul_set_err].
1747
1776
    
1748
 
multiple_reqs_2(suite) ->
1749
 
    {req, [], {conf, init_mul, mul_cases_2(), finish_mul}}.
1750
1777
 
1751
1778
multiple_reqs_3(_X) -> 
1752
1779
    {req, [], {conf, init_mul, mul_cases_3(), finish_mul}}.
1753
1780
 
1754
1781
 
1755
 
mul_cases_2() ->
1756
 
    [mul_get_2, mul_get_err_2, mul_next_2, mul_next_err_2, mul_set_err_2].
 
1782
mul_cases_2() -> 
 
1783
[mul_get_2, mul_get_err_2, mul_next_2, mul_next_err_2,
 
1784
 mul_set_err_2].
1757
1785
    
1758
1786
 
1759
1787
mul_cases_3() ->
1939
1967
v3_trap(X) ->
1940
1968
    v2_trap(X).
1941
1969
 
1942
 
v2_inform(suite) ->
1943
 
    {req, [], {conf, init_v2_inform, [v2_inform_i], finish_v2_inform}}.
1944
1970
 
1945
1971
v3_inform(_X) ->
1946
1972
    %% v2_inform(X).
2112
2138
%% accomplished by the first inform sent.  That one will generate a
2113
2139
%% report, which makes it in sync.  The notification-generating
2114
2140
%% application times out, and send again.  This time it'll work.
2115
 
v3_security(suite) -> [v3_crypto_basic, v3_md5_auth, v3_sha_auth, v3_des_priv].
2116
2141
 
2117
2142
v3_crypto_basic(suite) -> [];
2118
2143
v3_crypto_basic(_Config) ->
3591
3616
%%% Note that many of the functions in the standard mib is
3592
3617
%%% already tested by the normal tests.
3593
3618
%%%-----------------------------------------------------------------
3594
 
standard_mibs(suite) ->
3595
 
    [snmp_standard_mib, snmp_community_mib,
3596
 
     snmp_framework_mib,
3597
 
     snmp_target_mib, snmp_notification_mib,
3598
 
     snmp_view_based_acm_mib].
3599
 
 
3600
 
standard_mibs_2(suite) ->
3601
 
    [snmpv2_mib_2, snmp_community_mib_2,
3602
 
     snmp_framework_mib_2,
3603
 
     snmp_target_mib_2, snmp_notification_mib_2,
3604
 
     snmp_view_based_acm_mib_2].
3605
 
 
3606
 
standard_mibs_3(suite) ->
3607
 
    [snmpv2_mib_3,snmp_framework_mib_3, snmp_mpd_mib_3,
3608
 
     snmp_target_mib_3, snmp_notification_mib_3,
3609
 
     snmp_view_based_acm_mib_3, snmp_user_based_sm_mib_3].
 
3619
 
 
3620
 
3610
3621
 
3611
3622
%%-----------------------------------------------------------------
3612
3623
%% For this test, the agent is configured for v1.
4527
4538
%%% Testing of reported bugs and other tickets.
4528
4539
%%%-----------------------------------------------------------------
4529
4540
 
4530
 
reported_bugs(suite) ->
4531
 
    [otp_1128, otp_1129, otp_1131, otp_1162,
4532
 
     otp_1222, otp_1298, otp_1331, otp_1338,
4533
 
     otp_1342, otp_2776, otp_2979, otp_3187, otp_3725].
4534
 
 
4535
 
reported_bugs_2(suite) ->
4536
 
    [otp_1128_2, otp_1129_2, otp_1131_2, otp_1162_2,
4537
 
     otp_1222_2, otp_1298_2, otp_1331_2, otp_1338_2,
4538
 
     otp_1342_2, otp_2776_2, otp_2979_2, otp_3187_2].
4539
 
 
4540
 
reported_bugs_3(suite) ->
4541
 
    [otp_1128_3, otp_1129_3, otp_1131_3, otp_1162_3,
4542
 
     otp_1222_3, otp_1298_3, otp_1331_3, otp_1338_3,
4543
 
     otp_1342_3, otp_2776_3, otp_2979_3, otp_3187_3,
4544
 
     otp_3542].
 
4541
 
 
4542
 
4545
4543
 
4546
4544
 
4547
4545
%% These are (ticket) test cases where the initiation has to be done
4548
4546
%% individually.
4549
 
tickets(suite) ->
4550
 
    [otp_4394].
4551
4547
 
4552
4548
%%-----------------------------------------------------------------
4553
4549
%% Ticket: OTP-1128
4971
4967
%%-----------------------------------------------------------------
4972
4968
 
4973
4969
 
4974
 
otp_4394(suite) -> {req, [], {conf, 
4975
 
                              init_otp_4394, 
4976
 
                              [otp_4394_test], 
4977
 
                              finish_otp_4394}}.
4978
4970
 
4979
4971
init_otp_4394(Config) when list(Config) ->
4980
4972
    ?DBG("init_otp_4394 -> entry with"