aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/gen_udp_SUITE.erl
AgeCommit message (Collapse)Author
2018-09-19Improve platform filterRaimo Niskanen
2018-09-17Write testcases for recvtos and friendsRaimo Niskanen
Use os:type() and os:version() to predict if the individual options are supposed to be supported. We'll see if this holds.
2018-07-30erts: Limit the automatic max buffer for UDP to 2^16Lukas Larsson
There is no reason to have a larger buffer than this as the recvmsg call will never return more data. OTP-15206
2018-06-18Update copyright yearHenrik Nord
2018-02-05kernel: Do not call erlang:get_stacktrace()Hans Bolinder
2017-10-02kernel: Rewrite gen_udp_SUITE:read_packet tcLukas Larsson
The old testcase did not test anything at all, it seems like it was written with the non-smp emulator inmind.
2017-07-17Fix testcases after removal of non-smp emulatorLukas Larsson
2017-06-14Update copyright yearHans Nilsson
2017-05-22kernel: Skip ipv6 tcs when cpiv6 is disabledLukas Larsson
For some reason doing a gen_udp:open(0, [inet6,{ipv6_v6only,true}]) works on some systems where ipv6 is disabled. So instead we explicitly require the localhost ip to do the test at which seems to work better. ipv6 was disabled in sysctl using the line net.ipv6.conf.all.disable_ipv6=1 when this behaviour was found.
2016-06-17Merge branch 'zandra/kernel-test-cuddle'Zandra Hird
Conflicts: lib/kernel/test/gen_tcp_api_SUITE.erl lib/kernel/test/gen_udp_SUITE.erl
2016-06-17Merge branch 'raimo/uds-support/OTP-13643'Raimo Niskanen
* raimo/uds-support/OTP-13643: Update test cases after daily builds Return eafnosupport when not supported Add AF_LOCAL test cases Handle 'undefined' in fdopen
2016-06-17Update test cases after daily buildsRaimo Niskanen
2016-06-16Return eafnosupport when not supportedRaimo Niskanen
2016-06-16Test: Try ipv6 versions of localhost if it fails for inet6Zandra Hird
Most systems alias localhost to both the ipv4 and ipv6 localhost address, but in some cases localhost6 is used instead.
2016-06-15Add AF_LOCAL test casesRaimo Niskanen
2016-06-13gen_udp_SUITE: Increase timeout to stabilize connect testZandra Hird
2016-03-15update copyright-yearHenrik Nord
2016-03-10Remove ?line macrosBjörn Gustavsson
While we are it, also re-ident the files.
2016-03-10Fix commentsBjörn Gustavsson
Remove out-commented code. Make sure that comments that are not at the end of a line starts with two '%' characters and not just one. That will become important later when we'll remove all ?line macros and ask Emacs to re-indent the files.
2016-03-10Eliminate use of the ?t macroBjörn Gustavsson
2016-03-10Eliminate use of doc and suite clausesBjörn Gustavsson
Those clause are obsolete and never used by common_test.
2016-03-09Eliminate use of test_server:fail/0,1Björn Gustavsson
2016-03-09Modernize timetrapsBjörn Gustavsson
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2015-06-18Change license text to APLv2Bruce Yinhe
2014-07-24Merge branch 'maint-r16' into maintHenrik Nord
Conflicts: erts/doc/src/notes.xml erts/preloaded/ebin/prim_inet.beam erts/vsn.mk lib/kernel/doc/src/notes.xml lib/kernel/vsn.mk
2014-07-22Fix default behaviour for legacy fdopenHenrik Nord
Update testcase for gen_udp:open/2 with option fd
2013-09-23add {active,N} socket option for TCP, UDP, and SCTPSteve Vinoski
Add the {active,N} socket option, where N is an integer in the range -32768..32767, to allow a caller to specify the number of data messages to be delivered to the controlling process. Once the socket's delivered message count either reaches 0 or is explicitly set to 0 with inet:setopts/2 or by including {active,0} as an option when the socket is created, the socket transitions to passive ({active, false}) mode and the socket's controlling process receives a message to inform it of the transition. TCP sockets receive {tcp_passive,Socket}, UDP sockets receive {udp_passive,Socket} and SCTP sockets receive {sctp_passive,Socket}. The socket's delivered message counter defaults to 0, but it can be set using {active,N} via any gen_tcp, gen_udp, or gen_sctp function that takes socket options as arguments, or via inet:setopts/2. New N values are added to the socket's current counter value, and negative numbers can be used to reduce the counter value. Specifying a number that would cause the socket's counter value to go above 32767 causes an einval error. If a negative number is specified such that the counter value would become negative, the socket's counter value is set to 0 and the socket transitions to passive mode. If the counter value is already 0 and inet:setopts(Socket, [{active,0}]) is specified, the counter value remains at 0 but the appropriate passive mode transition message is generated for the socket. This commit contains a modified preloaded prim_inet.beam due to changes in prim_inet.erl. Add tests for {active,N} mode for TCP, UDP, and SCTP sockets. Add documentation for {active,N} mode for inet, gen_tcp, gen_udp, and gen_sctp.
2013-04-19Remove the "coding: utf-8" comment from all Erlang source filesHans Bolinder
2013-01-09Prepare OTP files for Unicode as default encodingHans Bolinder
2011-11-18gen_udp_SUITE:buffer_size test case fixRaimo Niskanen
2011-08-27Fix type of Packet arg of gen_tcp:send/2 and gen_udp:send/4Filipe David Manana
The type is marked as a binary() or a string() but in practice it can be an iodata(). The test suite was updated to confirm the gen_tcp/2 and gen_udp:send/4 functions accept iodata() (iolists) packets.
2011-05-24inet: error if fd does not match socket domainMichael Santos
If an IPv4 fd is opened as an IPv6 socket, unexpected behaviour can occur. For example, if an IPv4 UDP socket is opened and passed into Erlang as an IPv6 socket, the first 3 bytes (corresponding to 1 byte representing the protocol family, 2 bytes set to the port) are stripped from the payload. The cause of the UDP payload truncation happens in inet_drv.c:packet_inet_input when a call to inet_get_address fails silently because the family is set to PF_INET6 but the buffer len is the size of an IPv4 struct sockaddr_in. Prevent this behaviour by checking that the protocol family of the file descriptor matches the family of the requested Erlang socket. {ok, S1} = gen_udp:open(0, [binary, inet]), {ok, FD} = inet:getfd(S1), {ok, Port} = inet:port(S1), {ok, S} = gen_udp:open(Port, [binary, {fd, FD}, inet6]), {ok, C} = gen_udp:open(0, [binary]), Msg = <<1,2,3,4,5>>, gen_udp:send(C, "127.0.0.1", Port, Msg), receive {udp, S, _, _, Msg} -> ok; {udp, S, _, _, NewMsg} -> {error, Msg, NewMsg} end. This test results in: {error,<<1,2,3,4,5>>,<<4,5>>} Thanks to Andrew Tunnell-Jones for finding the bug and the test case!
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-07Merge branch 'raimo/kernel-implicit_inet6-testcase' into devRaimo Niskanen
* raimo/kernel-implicit_inet6-testcase: Improve implicit_inet6 testcase skip conditions
2011-02-17Rename Suite Callback to Common Test HookLukas Larsson
2011-02-17Fix formatting for kernelLukas Larsson
2011-02-17Add init_per_suite and end_per_suiteLukas Larsson
2011-02-17Add ts_install_scb to suite/0Lukas Larsson
2011-02-17Update kernel tests to conform with common_test standardLukas Larsson
2011-02-17Update all fin_per_testcase to end_per_testcase.Lukas Larsson
2010-12-07Improve implicit_inet6 testcase skip conditionsRaimo Niskanen
2010-09-21Teach gen_udp_SUITE:connect testcase about econnreset on WindowsPatrik Nyblom
2010-09-13Add line macros to gen_udp_SUITE:connectPatrik Nyblom
2010-09-06Add testsRaimo Niskanen
Conflicts: lib/kernel/test/gen_sctp_SUITE.erl
2010-07-07Fix inet_drv to detect passive mode UDP errors for SCTP buildsRaimo Niskanen
Debug and patch by Per Hedeland for R13B04 on erlang-patches: Connected UDP (and handling of any other errors in UDP recv()) is broken in passive mode for all SCTP-enabled builds.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP