2618
2618
db_notify_client(Config) when list(Config) ->
2619
2619
?P(db_notify_client),
2620
2620
{SaNode, MgrNode, MibDir} = init_case(Config),
2621
?DBG("~n\tSaNode: ~p~n\tMgrNode: ~p~n\tMibDir: ~p",
2622
[SaNode,MgrNode,MibDir]),
2621
?DBG("db_notify_client -> case initiated: "
2624
"~n MibDir: ~p", [SaNode, MgrNode, MibDir]),
2625
?DBG("db_notify_client -> maximize verbosity", []),
2626
snmpa_local_db:verbosity(trace),
2628
?DBG("db_notify_client -> register self (~p) notify client", [Self]),
2623
2629
snmpa_local_db:register_notify_client(self(),?MODULE),
2625
%% This call (the manager) will issue to set operations, so
2631
%% This call (to the manager) will issue to set operations, so
2626
2632
%% we expect to receive to notify(insert) calls.
2627
2633
try_test(db_notify_client_test),
2629
?DBG("await first notify",[]),
2635
?DBG("db_notify_client -> await first notify",[]),
2631
{db_notify_test_reply,insert} -> ?DBG("first notify received",[]),ok
2637
{db_notify_test_reply, insert} ->
2638
?DBG("db_notify_client -> first notify received",[]),
2641
?FAIL({timeout, waiting_for_first_event})
2634
?DBG("await second notify",[]),
2644
?DBG("db_notify_client -> await second notify",[]),
2636
{db_notify_test_reply,insert} -> ?DBG("second notify received",[]),ok
2646
{db_notify_test_reply, insert} ->
2647
?DBG("db_notify_client -> second notify received",[]),
2650
?FAIL({timeout, waiting_for_second_event})
2639
snmpa_local_db:unregister_notify_client(self()).
2653
?DBG("db_notify_client -> unregister self (~p) notify client", [Self]),
2654
snmpa_local_db:unregister_notify_client(self()),
2655
?DBG("db_notify_client -> minimize verbosity", []),
2656
snmpa_local_db:verbosity(silence),
2658
?DBG("db_notify_client -> done", []),
2642
2662
%% This is run in the manager node
2649
2669
s([{[sysLocation, 0], "new_value"}]),
2650
2670
?line expect(5, [{[sysLocation, 0], "new_value"}]).
2672
notify(Pid, What) ->
2653
2673
?DBG("notify(~p,~p) -> called",[Pid,What]),
2654
Pid ! {db_notify_test_reply,What}.
2674
Pid ! {db_notify_test_reply, What}.
2657
2677
%% Req: system group, OLD-SNMPEA-MIB, Klas1
4133
4153
?line [EngineTime] = get_req(2, [[snmpEngineTime,0]]),
4135
4155
?line [EngineTime2] = get_req(3, [[snmpEngineTime,0]]),
4156
?DBG("snmp_framework_mib -> time(s): "
4157
"~n EngineTime 1 = ~p"
4158
"~n EngineTime 2 = ~p", [EngineTime, EngineTime2]),
4137
EngineTime+7 < EngineTime2 ->
4138
?line ?FAIL({too_large_diff, EngineTime, EngineTime2});
4139
EngineTime+4 > EngineTime2 ->
4140
?line ?FAIL({too_large_diff, EngineTime, EngineTime2});
4160
(EngineTime+7) < EngineTime2 ->
4161
?line ?FAIL({too_large_diff, EngineTime, EngineTime2});
4162
(EngineTime+4) > EngineTime2 ->
4163
?line ?FAIL({too_large_diff, EngineTime, EngineTime2});
4143
4167
?line case get_req(4, [[snmpEngineBoots,0]]) of
4144
[Boots] when integer(Boots) -> ok;
4168
[Boots] when is_integer(Boots) ->
4890
4916
%%%-----------------------------------------------------------------
4892
4918
reported_bugs(suite) ->
4893
[otp_1128, otp_1129, otp_1131, otp_1162,
4894
otp_1222, otp_1298, otp_1331, otp_1338,
4895
otp_1342, otp_2776, otp_2979, otp_3187, otp_3725].
4897
4935
reported_bugs_2(suite) ->
4898
[otp_1128_2, otp_1129_2, otp_1131_2, otp_1162_2,
4899
otp_1222_2, otp_1298_2, otp_1331_2, otp_1338_2,
4900
otp_1342_2, otp_2776_2, otp_2979_2, otp_3187_2].
4902
4951
reported_bugs_3(suite) ->
4903
[otp_1128_3, otp_1129_3, otp_1131_3, otp_1162_3,
4904
otp_1222_3, otp_1298_3, otp_1331_3, otp_1338_3,
4905
otp_1342_3, otp_2776_3, otp_2979_3, otp_3187_3,
4909
4969
%% These are (ticket) test cases where the initiation has to be done