diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-06-17 16:32:08 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-06-17 16:32:08 +0200 |
commit | 00f92e552cb62233ad9dec788f4826b3e1dab4f7 (patch) | |
tree | 2d55e4b3ab15953ae0f9a8443ca95d067cb852a7 /lib/kernel | |
parent | aae5a947a0c1c6dc6881cf9e5d81b7363055a04d (diff) | |
parent | 549428e11f1d9b4d61135a36fc9ab594c5512d6b (diff) | |
download | otp-00f92e552cb62233ad9dec788f4826b3e1dab4f7.tar.gz otp-00f92e552cb62233ad9dec788f4826b3e1dab4f7.tar.bz2 otp-00f92e552cb62233ad9dec788f4826b3e1dab4f7.zip |
Merge branch 'egil/cuddle-tests'
* egil/cuddle-tests:
kernel: Remove ?line macros in inet_SUITE:t_gethostbyaddr/1
erts: Tweak statistics_SUITE:scheduler_wall_time/1
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/test/inet_SUITE.erl | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/lib/kernel/test/inet_SUITE.erl b/lib/kernel/test/inet_SUITE.erl index c77de9316f..994c4b35f9 100644 --- a/lib/kernel/test/inet_SUITE.erl +++ b/lib/kernel/test/inet_SUITE.erl @@ -120,36 +120,37 @@ t_gethostbyaddr() -> required(v4). t_gethostbyaddr(doc) -> "Test the inet:gethostbyaddr/1 function."; t_gethostbyaddr(Config) when is_list(Config) -> - ?line {Name,FullName,IPStr,{A,B,C,D}=IP,Aliases,_,_} = - ct:get_config(test_host_ipv4_only), - ?line Rname = integer_to_list(D) ++ "." ++ - integer_to_list(C) ++ "." ++ - integer_to_list(B) ++ "." ++ - integer_to_list(A) ++ ".in-addr.arpa", - ?line {ok,HEnt} = inet:gethostbyaddr(IPStr), - ?line {ok,HEnt} = inet:gethostbyaddr(IP), - ?line {error,Error} = inet:gethostbyaddr(Name), - ?line ok = io:format("Failure reason: ~p: ~s", - [error,inet:format_error(Error)]), - ?line HEnt_ = HEnt#hostent{h_addrtype = inet, - h_length = 4, - h_addr_list = [IP]}, - ?line HEnt_ = HEnt, + {Name,FullName,IPStr,{A,B,C,D}=IP,Aliases,_,_} = ct:get_config(test_host_ipv4_only), + Rname = integer_to_list(D) ++ "." ++ + integer_to_list(C) ++ "." ++ + integer_to_list(B) ++ "." ++ + integer_to_list(A) ++ ".in-addr.arpa", + {ok,HEnt} = inet:gethostbyaddr(IPStr), + {ok,HEnt} = inet:gethostbyaddr(IP), + {error,Error} = inet:gethostbyaddr(Name), + ok = io:format("Failure reason: ~p: ~s", [error,inet:format_error(Error)]), + HEnt_ = HEnt#hostent{h_addrtype = inet, + h_length = 4, + h_addr_list = [IP]}, + HEnt_ = HEnt, case {os:type(),os:version()} of - {{unix,freebsd},{5,0,0}} -> - %% The alias list seems to be buggy in FreeBSD 5.0.0. - ?line check_elems([{HEnt#hostent.h_name,[Name,FullName]}]), - io:format("Buggy alias list: ~p", [HEnt#hostent.h_aliases]), - ok; - _ -> - ?line check_elems([{HEnt#hostent.h_name,[Name,FullName]}, - {HEnt#hostent.h_aliases,[[],Aliases,[Rname]]}]) + {{unix,freebsd},{5,0,0}} -> + %% The alias list seems to be buggy in FreeBSD 5.0.0. + check_elems([{HEnt#hostent.h_name,[Name,FullName]}]), + io:format("Buggy alias list: ~p", [HEnt#hostent.h_aliases]), + ok; + _ -> + io:format("alias list: ~p", [HEnt#hostent.h_aliases]), + io:format("check alias list: ~p", [[Aliases,[Rname]]]), + io:format("name: ~p", [HEnt#hostent.h_name]), + io:format("check name: ~p", [[Name,FullName]]), + check_elems([{HEnt#hostent.h_name,[Name,FullName]}, + {HEnt#hostent.h_aliases,[[],Aliases,[Rname]]}]) end, - ?line {_DName, _DFullName, DIPStr, DIP, _, _, _} = - ct:get_config(test_dummy_host), - ?line {error,nxdomain} = inet:gethostbyaddr(DIPStr), - ?line {error,nxdomain} = inet:gethostbyaddr(DIP), + {_DName, _DFullName, DIPStr, DIP, _, _, _} = ct:get_config(test_dummy_host), + {error,nxdomain} = inet:gethostbyaddr(DIPStr), + {error,nxdomain} = inet:gethostbyaddr(DIP), ok. t_gethostbyaddr_v6() -> required(v6). |