diff options
author | Raimo Niskanen <[email protected]> | 2014-05-02 16:47:52 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2014-07-25 12:15:14 +0200 |
commit | 89ca2960d421a43bced0a9f228a62b8ab3089663 (patch) | |
tree | 68ae9d75d80138ca0cdf460941eb5796b6a797e8 /lib/snmp/test | |
parent | abbd9936144da7bcff9b4819785e597455ac7f35 (diff) | |
download | otp-89ca2960d421a43bced0a9f228a62b8ab3089663.tar.gz otp-89ca2960d421a43bced0a9f228a62b8ab3089663.tar.bz2 otp-89ca2960d421a43bced0a9f228a62b8ab3089663.zip |
wip: passes all regression tests
Diffstat (limited to 'lib/snmp/test')
-rw-r--r-- | lib/snmp/test/klas3.erl | 12 | ||||
-rw-r--r-- | lib/snmp/test/snmp_agent_test.erl | 8 |
2 files changed, 15 insertions, 5 deletions
diff --git a/lib/snmp/test/klas3.erl b/lib/snmp/test/klas3.erl index ec78d19dbb..4c7c03e2ca 100644 --- a/lib/snmp/test/klas3.erl +++ b/lib/snmp/test/klas3.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2014. 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 @@ -67,8 +67,11 @@ fname(get) -> end, case snmpa:current_address() of {value, {[_A,_B,_C,_D], E}} when is_integer(E) -> ok; - {value, _} -> throw("bad_ip"); - _ -> throw("bad_adr") + {value, {D, _}} when is_atom(D) -> ok; + {value, Ip} -> + throw(format_string("bad_ip: ~p", [Ip])); + Other -> + throw(format_string("bad_adr: ~p", [Other])) end, case snmpa:current_net_if_data() of {value, []} -> ok; @@ -160,3 +163,6 @@ ftab2(get_next, [9], _Cols) -> % bad return value io:format("** Here comes Error Report get_next 3 bad return~n"), [{[1,5],1},{[2,5],3},{[2,6],3}]. + +format_string(Format, Args) -> + lists:flatten(io_lib:format(Format, Args)). diff --git a/lib/snmp/test/snmp_agent_test.erl b/lib/snmp/test/snmp_agent_test.erl index 2a9f2e842d..bcc89b93de 100644 --- a/lib/snmp/test/snmp_agent_test.erl +++ b/lib/snmp/test/snmp_agent_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2013. All Rights Reserved. +%% Copyright Ericsson AB 2003-2014. 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 @@ -1794,7 +1794,11 @@ init_v3(Config) when is_list(Config) -> Ip = ?config(ip, Config), ?line ok = config([v3], MgrDir, AgentConfDir, tuple_to_list(Ip), tuple_to_list(Ip)), - [{vsn, v3} | start_v3_agent(Config)]. + Opts = + [{master_agent_verbosity, trace}, + {agent_verbosity, trace}, + {net_if_verbosity, trace}], + [{vsn, v3} | start_v3_agent(Config, Opts)]. finish_v3(Config) when is_list(Config) -> delete_tables(), |