From 5334dab8e5491fa8fc710e4d83cdc744055446cf Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 28 Aug 2012 16:40:26 +0200 Subject: Update command line test for changed ct:run_test/1 return value --- lib/diameter/test/diameter_ct.erl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/diameter/test/diameter_ct.erl b/lib/diameter/test/diameter_ct.erl index f8ee3dc1d7..ded50bf6c5 100644 --- a/lib/diameter/test/diameter_ct.erl +++ b/lib/diameter/test/diameter_ct.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2011. All Rights Reserved. +%% Copyright Ericsson AB 2010-2012. 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 @@ -25,15 +25,14 @@ -export([run/1]). -%% ct:run_test/1 is currently documented as returning a list of test -%% results ... but no. Instead it returns 'ok' regardless of whether -%% or not the suite in question has failed testcases. +%% The makefile looks for signs of failure so ignore the ct:run_test/1 +%% return value. run([Suite]) -> Start = info(), - ok = ct:run_test([{suite, Suite}, - {logdir, "./log"}, - {auto_compile, false}]), + ct:run_test([{suite, Suite}, + {logdir, "./log"}, + {auto_compile, false}]), info(Start , info()). info() -> -- cgit v1.2.3 From e931991f305a27af5d99478e35b3b29b24ca3b48 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Wed, 29 Aug 2012 12:03:37 +0200 Subject: Learn to keep time in diameter_gen_sctp_SUITE Microseconds /= milliseconds. --- lib/diameter/test/diameter_gen_sctp_SUITE.erl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/diameter/test/diameter_gen_sctp_SUITE.erl b/lib/diameter/test/diameter_gen_sctp_SUITE.erl index 7f435a6b7a..acc3b9e254 100644 --- a/lib/diameter/test/diameter_gen_sctp_SUITE.erl +++ b/lib/diameter/test/diameter_gen_sctp_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2011. All Rights Reserved. +%% Copyright Ericsson AB 2010-2012. 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 @@ -175,7 +175,8 @@ send(Sock, Id) -> send_from_multiple_clients(_) -> {S, Rs} = T = send_from_multiple_clients(8, 1024), - {false, [], _} = {?FOREVER < S, + Max = ?FOREVER*1000, + {false, [], _} = {Max < S, Rs -- [OI || {O,_} = OI <- Rs, is_integer(O)], T}. @@ -223,6 +224,11 @@ send_from_multiple_clients(_) -> %% {134,100}, %% {117,98}, %% {149,125}]} +%% +%% This turns out to have been due to SCTP resends as a consequence of +%% the listener having an insufficient recbuf. Increasing the size +%% solves the problem. +%% send_from_multiple_clients(N, Sz) when is_integer(N), 0 < N, is_integer(Sz), 0 < Sz -> -- cgit v1.2.3 From 8f790a3a995ac8b713d039308ab4796fdf27f853 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Wed, 29 Aug 2012 15:25:09 +0200 Subject: Dialyzer spec fix --- lib/diameter/src/transport/diameter_tcp.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/diameter/src/transport/diameter_tcp.erl b/lib/diameter/src/transport/diameter_tcp.erl index 78dbda6888..f98ae84cf4 100644 --- a/lib/diameter/src/transport/diameter_tcp.erl +++ b/lib/diameter/src/transport/diameter_tcp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2011. All Rights Reserved. +%% Copyright Ericsson AB 2010-2012. 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 @@ -74,7 +74,7 @@ %% Accepting/connecting transport process state. -record(transport, - {socket :: inet:socket(), %% accept or connect socket + {socket :: inet:socket() | ssl:sslsock(), %% accept or connect socket parent :: pid(), %% of process that started us module :: module(), %% gen_tcp-like module frag = <<>> :: binary() | {tref(), frag()}, %% message fragment -- cgit v1.2.3