aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-06-16 13:13:49 +0200
committerRaimo Niskanen <[email protected]>2016-06-16 13:47:23 +0200
commite0881861bb8d4bf796134f072e67608c6f32b4c6 (patch)
treea21565ec5ccd11585f73ce2c3195666d6bdfdddb /lib/kernel/test
parentc72e305bbd4d0e85730587fed82ead4f3b362713 (diff)
downloadotp-e0881861bb8d4bf796134f072e67608c6f32b4c6.tar.gz
otp-e0881861bb8d4bf796134f072e67608c6f32b4c6.tar.bz2
otp-e0881861bb8d4bf796134f072e67608c6f32b4c6.zip
Return eafnosupport when not supported
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/gen_tcp_api_SUITE.erl7
-rw-r--r--lib/kernel/test/gen_udp_SUITE.erl7
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/kernel/test/gen_tcp_api_SUITE.erl b/lib/kernel/test/gen_tcp_api_SUITE.erl
index f15f909432..63b9d90021 100644
--- a/lib/kernel/test/gen_tcp_api_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_api_SUITE.erl
@@ -71,12 +71,11 @@ end_per_suite(_Config) ->
ok.
init_per_group(t_local, Config) ->
- try gen_tcp:connect({local,<<"/">>}, 0, [], 17) of
+ case gen_tcp:connect({local,<<"/">>}, 0, []) of
+ {error,eafnosupport} ->
+ {skip, "AF_LOCAL not supported"};
{error,_} ->
Config
- catch
- Class:badarg when Class =:= error; Class =:= exit ->
- {skip, "AF_LOCAL not supported"}
end;
init_per_group(_GroupName, Config) ->
Config.
diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl
index 6d82e124e9..9554920d07 100644
--- a/lib/kernel/test/gen_udp_SUITE.erl
+++ b/lib/kernel/test/gen_udp_SUITE.erl
@@ -61,12 +61,11 @@ end_per_suite(_Config) ->
ok.
init_per_group(local, Config) ->
- try gen_udp:open(0, [local]) of
+ case gen_udp:open(0, [local]) of
{ok,S} ->
ok = gen_udp:close(S),
- Config
- catch
- Class:badarg when Class =:= error; Class =:= exit ->
+ Config;
+ {error,eafnosupport} ->
{skip, "AF_LOCAL not supported"}
end;
init_per_group(_GroupName, Config) ->