aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_agent_test_lib.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2014-07-24 13:52:10 +0200
committerRaimo Niskanen <[email protected]>2014-07-30 10:31:25 +0200
commitad00eb19928f7056386a37e633a0b4e3d1f9442b (patch)
tree17cda874598d37c52a8448251aa942ec1ab43f9e /lib/snmp/test/snmp_agent_test_lib.erl
parent99c1ea078124faac8062df3deb9a98d2be495a12 (diff)
downloadotp-ad00eb19928f7056386a37e633a0b4e3d1f9442b.tar.gz
otp-ad00eb19928f7056386a37e633a0b4e3d1f9442b.tar.bz2
otp-ad00eb19928f7056386a37e633a0b4e3d1f9442b.zip
Fix test manager in agent tests for IPv6
Diffstat (limited to 'lib/snmp/test/snmp_agent_test_lib.erl')
-rw-r--r--lib/snmp/test/snmp_agent_test_lib.erl12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/snmp/test/snmp_agent_test_lib.erl b/lib/snmp/test/snmp_agent_test_lib.erl
index 6925c16ffb..333fe6eb66 100644
--- a/lib/snmp/test/snmp_agent_test_lib.erl
+++ b/lib/snmp/test/snmp_agent_test_lib.erl
@@ -251,6 +251,7 @@ init_case(Config) when is_list(Config) ->
put(mip, tuple_to_list(MIP)),
put(masterip, tuple_to_list(MasterIP)),
put(sip, tuple_to_list(SIP)),
+ put(ipfamily, IpFamily),
MibDir = ?config(mib_dir, Config),
put(mib_dir, MibDir),
@@ -359,6 +360,7 @@ run(Mod, Func, Args, Opts) ->
{packet_server_debug,true},
{debug,true},
{agent, get(master_host)},
+ {ipfamily, get(ipfamily)},
{agent_udp, 4000},
{trap_udp, 5000},
{recbuf,65535},
@@ -1383,12 +1385,9 @@ config(Vsns, MgrDir, AgentConfDir, MIp, AIp, IpFamily) ->
?line {Domain, ManagerAddr} =
case IpFamily of
inet6 ->
- %% XXX Run IPv6 tests over IPv4 compatibility address
- %% since the test manager needs to be rewritten to
- %% handle IPv6 before we can improve this.
Ipv6Domain = transportDomainUdpIpv6,
- AgentIpv6Addr = {mk_ipv6_ip(AIp), 4000},
- ManagerIpv6Addr = {mk_ipv6_ip(MIp), ?TRAP_UDP},
+ AgentIpv6Addr = {AIp, 4000},
+ ManagerIpv6Addr = {MIp, ?TRAP_UDP},
?line ok =
snmp_config:write_agent_snmp_files(
AgentConfDir, Vsns,
@@ -1416,9 +1415,6 @@ config(Vsns, MgrDir, AgentConfDir, MIp, AIp, IpFamily) ->
?line write_notify_conf(AgentConfDir),
ok.
-mk_ipv6_ip([A,B,C,D]) ->
- [0,0,0,0,0,0,0,0,0,0,255,255,A,B,C,D].
-
delete_files(Config) ->
AgentDir = ?config(agent_dir, Config),
delete_files(AgentDir, [db, conf]).