aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd
diff options
context:
space:
mode:
Diffstat (limited to 'erts/epmd')
-rw-r--r--erts/epmd/src/epmd.c2
-rw-r--r--erts/epmd/src/epmd_srv.c8
-rw-r--r--erts/epmd/test/epmd.spec2
-rw-r--r--erts/epmd/test/epmd_SUITE.erl75
4 files changed, 42 insertions, 45 deletions
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
index 65ff0cd6b2..e94533f0ba 100644
--- a/erts/epmd/src/epmd.c
+++ b/erts/epmd/src/epmd.c
@@ -433,7 +433,7 @@ static void usage(EpmdVars *g)
fprintf(stderr, " List names registered with the currently "
"running epmd\n");
fprintf(stderr, " -kill\n");
- fprintf(stderr, " Kill the currently runniing epmd\n");
+ fprintf(stderr, " Kill the currently running epmd\n");
fprintf(stderr, " (only allowed if -names show empty database or\n");
fprintf(stderr, " -relaxed_command_check was given when epmd was started).\n");
fprintf(stderr, " -stop Name\n");
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
index ef471a473a..3499ab2934 100644
--- a/erts/epmd/src/epmd_srv.c
+++ b/erts/epmd/src/epmd_srv.c
@@ -2,7 +2,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2010. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2011. 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
@@ -157,8 +157,10 @@ void run(EpmdVars *g)
dbg_printf(g,2,"starting");
- listen(listensock, SOMAXCONN);
-
+ if(listen(listensock, SOMAXCONN) < 0) {
+ dbg_perror(g,"failed to listen on socket");
+ epmd_cleanup_exit(g,1);
+ }
FD_ZERO(&g->orig_read_mask);
FD_SET(listensock,&g->orig_read_mask);
diff --git a/erts/epmd/test/epmd.spec b/erts/epmd/test/epmd.spec
index 0e2496bc72..e72272cf94 100644
--- a/erts/epmd/test/epmd.spec
+++ b/erts/epmd/test/epmd.spec
@@ -1 +1 @@
-{topcase, {dir, "../epmd_test"}}.
+{suites,"../epmd_test",all}.
diff --git a/erts/epmd/test/epmd_SUITE.erl b/erts/epmd/test/epmd_SUITE.erl
index da69412e12..72c890503d 100644
--- a/erts/epmd/test/epmd_SUITE.erl
+++ b/erts/epmd/test/epmd_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2011. 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
@@ -17,7 +17,7 @@
%% %CopyrightEnd%
%%
-module(epmd_SUITE).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
-include_lib("kernel/include/file.hrl").
@@ -35,7 +35,9 @@
-record(node_info, {port, node_type, prot, lvsn, hvsn, node_name, extra}).
% Test server specific exports
--export([all/1, init_per_testcase/2, fin_per_testcase/2]).
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2,
+ init_per_testcase/2, end_per_testcase/2]).
-export(
[
@@ -64,7 +66,7 @@
returns_valid_empty_extra/1,
returns_valid_populated_extra_with_nulls/1,
- buffer_overrun/1,
+
buffer_overrun_1/1,
buffer_overrun_2/1,
no_nonlocal_register/1,
@@ -101,42 +103,37 @@
%% all/1
%%
-all(suite) ->
- [
- register_name,
- register_names_1,
- register_names_2,
- register_duplicate_name,
- get_port_nr,
- slow_get_port_nr,
- unregister_others_name_1,
- unregister_others_name_2,
- register_overflow,
- name_with_null_inside,
- name_null_terminated,
- stupid_names_req,
-
- no_data,
- one_byte,
- two_bytes,
- partial_packet,
- zero_length,
- too_large,
- alive_req_too_small_1,
- alive_req_too_small_2,
- alive_req_too_large,
-
- returns_valid_empty_extra,
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [register_name, register_names_1, register_names_2,
+ register_duplicate_name, get_port_nr, slow_get_port_nr,
+ unregister_others_name_1, unregister_others_name_2,
+ register_overflow, name_with_null_inside,
+ name_null_terminated, stupid_names_req, no_data,
+ one_byte, two_bytes, partial_packet, zero_length,
+ too_large, alive_req_too_small_1, alive_req_too_small_2,
+ alive_req_too_large, returns_valid_empty_extra,
returns_valid_populated_extra_with_nulls,
+ {group, buffer_overrun}, no_nonlocal_register,
+ no_nonlocal_kill, no_live_killing].
+
+groups() ->
+ [{buffer_overrun, [],
+ [buffer_overrun_1, buffer_overrun_2]}].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
- buffer_overrun,
- %buffer_overrun_1,
- %buffer_overrun_2,
+end_per_group(_GroupName, Config) ->
+ Config.
- no_nonlocal_register,
- no_nonlocal_kill,
- no_live_killing
- ].
%%
%% Run before and after each test case
@@ -147,7 +144,7 @@ init_per_testcase(_Func, Config) ->
cleanup(),
[{watchdog, Dog} | Config].
-fin_per_testcase(_Func, Config) ->
+end_per_testcase(_Func, Config) ->
cleanup(),
Dog = ?config(watchdog, Config),
catch test_server:timetrap_cancel(Dog), % We may have canceled already
@@ -725,8 +722,6 @@ returns_valid_populated_extra_with_nulls(Config) when is_list(Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-buffer_overrun(suite) ->
- [buffer_overrun_1,buffer_overrun_2].
buffer_overrun_1(suite) ->
[];