aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
AgeCommit message (Collapse)Author
2018-09-18[socket-nif] Add support for socket (level sctp) option initmsgMicael Karlberg
Added support for the SCTP option INITMSG. OTP-14831
2018-09-18[socket-nif] Add support for socket (level sctp) option maxsegMicael Karlberg
Added support for the SCTP option MAXSEG. OTP-14831
2018-09-18[socket-nif] Add (partial) support for socket (level sctp) option rtoinfoMicael Karlberg
Added support for the SCTP option RTOINFO. We have the same questions for this option as for ASSOCINFO. Maybe the assoc field shall be made 'out' only (that is, it will be ignored for setopt). The assoc id used will be that which is stored in the descriptor (how do we get it to begin with?). Questions, questions... OTP-14831
2018-09-18[socket-nif] Add (partial) support for socket (level sctp) option associnfoMicael Karlberg
Added support for the SCTP option ASSOCINFO. This option is a bit tricky. As the underlying structure (sctp_assocparams) contains the assoc_id, it begs the question what happens if this option is fetched for: * The own assoc (which means that we might have the assoc id in the descriptor and can initiate that part of the struct accordningly). * Another assoc: From assoc A asks for info with assoc_id set to that of assoc B. * The "owning" endpoint. * Another endpoint (an endpoint to which the assoc does not belong). So, if the user calls socket:[getopt|setopt] for an association socket, shall we require that the assoc_id field is set to -1? Or not set at all and therefor filled in automatically by the nif-code? And, if the user calls socket:[getopt|setopt] for an endpoint socket, shall we require that the assoc_id field is set to a valid id? Or shall it not be allowed? Questions, questions... OTP-14831
2018-09-18[socket-nif] Add support for socket (level sctp) option disable_fragmentsMicael Karlberg
Added support for the SCTP option DISABLE_FRAGMENTS. OTP-14831
2018-09-18[socket-nif] Add support for socket (level sctp) option eventsMicael Karlberg
Added support for the SCTP option EVENTS. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ipv6) option mtuMicael Karlberg
Added support for the VPv6 socket option MTU. OTP-14831.
2018-09-18[socket-nif] Add support for multiple acceptor processesMicael Karlberg
Its now possible to have multiple (simultaneous) acceptor processes for the same listening socket. OTP-14831
2018-09-18[socket-nif] Add support for socket (level socket) option reuseportMicael Karlberg
Added support for socket level socket option REUSEPORT. OTP-14831
2018-09-18[socket-nif] Add support for socket (level socket) option bindtodeviceMicael Karlberg
Added support for socket level socket option BINDTODEVICE. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option recvttlMicael Karlberg
Added support for the IP option RECVTTL. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option nodefragMicael Karlberg
Added support for the IP option NODEFRAG. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option multicast_allMicael Karlberg
Added support for the IP option MULTICAST_ALL. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option mtu_discoverMicael Karlberg
Added support for the IP option MTU_DISCOVER. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option mtuMicael Karlberg
Added support for the IP option MTU. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option multicast_ifMicael Karlberg
Added support for the IP option MULTICAST_IF. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option multicast_ttlMicael Karlberg
Added support for the IP option MULTICAST_TTL. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option multicast_loopMicael Karlberg
Added support for the IP option MULTICAST_LOOP. OTP-14831
2018-09-18[socket-nif] Add support for socket (level socket) option oobinlineMicael Karlberg
Added support for socket level socket option oobinline (both get and set). OTP-14831
2018-09-18[socket-nif] Add support for socket (level socket) option peek_offMicael Karlberg
The socket option (level socket) peek_off is now supported. OTP-14831
2018-09-18[socket-nif] Add support for socket (level socket) option debugMicael Karlberg
The socket option (level socket) debug is now supported. To actually set this option, the user must have the proper "authority" (CAP_NET_ADMIN capability or an effective user ID of 0). OTP-14831
2018-09-18[socket-nif] Add support for socket (level socket) option acceptconnMicael Karlberg
The socket (level socket) option acceptconn is now supported (for getopt). OTP-14831
2018-09-18[socket-nif] Add support for socket (level socket) options domain and protocolMicael Karlberg
Make it possible to *get* the socket options domain and protocol (in addition to type). OTP-14831
2018-09-18[socket-test-nif] Testing with the (recv/recvfrom) peek flagMicael Karlberg
2018-09-18[socket-nif] Fixed (dgram) recvMicael Karlberg
Fixed handling of recvfrom (used by dgram sockets). Had forgot to do select(read) when we got block from the call to recvfrom. Argh! Also updated the (simple) test server and client to to be able to use udp (dgram+udp). OTP-14831
2018-09-18[socket-nif] Restructure of the socket (test) serverMicael Karlberg
2018-09-18[socket-nif] Fixed (stream) recvMicael Karlberg
Fixed handling of closed in the recv function. We still need to properly handle when we get 0 bytes of data for other types ock sockets then stream (its valid for dgram for instance). OTP-14831
2018-09-18[socket-nit-test] Added some more test codeMicael Karlberg
Added some more features o the simple socket test server and client. OTP-14831
2018-09-18[test-socket-nif] Add *very primitive* test progsMicael Karlberg
2018-09-18Merge branch 'maint'Sverker Eriksson
2018-09-18Merge branch 'siri/cuddle' into maintSiri Hansen
* siri/cuddle: [logger] Skip app level test if app cannot be loaded Terminate nodes after failed test cases in erl_distribution_SUITE Skip performance test on build types other than 'opt'
2018-09-17[logger] Skip app level test if app cannot be loadedSiri Hansen
2018-09-17Merge branch 'maint'Raimo Niskanen
2018-09-17Merge branch 'raimo/receive-TOS-TCLASS/ERIERL-187/OTP-15145' into maintRaimo Niskanen
* raimo/receive-TOS-TCLASS/ERIERL-187/OTP-15145: Write testcases for recvtos and friends Fix term buffer overflow bug Fix documentation due to feedback Implement socket option recvtos and friends
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-09-17Terminate nodes after failed test cases in erl_distribution_SUITESiri Hansen
A hanging node from this suite can fail later tests, so terminate all nodes() after each test case.
2018-09-17Merge branch 'maint'Hans Bolinder
* maint: kernel: Adjust disk_log tests kernel: Adjust global testcase
2018-09-17Merge branch 'hasse/kernel/adjust_tests' into maintHans Bolinder
* hasse/kernel/adjust_tests: kernel: Adjust disk_log tests kernel: Adjust global testcase
2018-09-17Merge branch 'maint'Siri Hansen
2018-09-12[logger] Increase timetrap timer for handler_requests_under_load testSiri Hansen
2018-09-12[logger] Improve code coverage in testSiri Hansen
2018-09-12[logger] Refactor, and add error detection for configurationSiri Hansen
2018-09-12[logger] Fix logger_disk_log_h_SUITE:sync and add som debug infoSiri Hansen
2018-09-12[logger] Remove encoding option from logger_formatterSiri Hansen
The encoding option was introduced in commit 270d909696a753af022df72a404c73f2895b4a02, to allow report callbacks to format according to a given encoding. There was, however, no connection between this encoding option, and the encoding of the device to which the logger handler was writing. Since a formatter is defined to return unicode:chardata(), and in order to avoid mismatch with the encoding of the device, the encoding option is now removed from the formatter. The handler itself must make sure that it does not write illegal data to its device.
2018-09-12[logger] Refactor some logger internalsSiri Hansen
2018-09-04Implement socket option recvtos and friendsRaimo Niskanen
Implement socket options recvtclass, recvtos, recvttl and pktoptions. Document the implemented socket options, new types and message formats. The options recvtclass, recvtos and recvttl are boolean options that when activated (true) for a socket will cause ancillary data to be received through recvmsg(). That is for packet oriented sockets (UDP and SCTP). The required options for this feature were recvtclass and recvtos, and recvttl was only added to test that the ancillary data parsing handled multiple data items in one message correctly. These options does not work on Windows since ancillary data is not handled by the Winsock2 API. For stream sockets (TCP) there is no clear connection between a received packet and what is returned when reading data from the socket, so recvmsg() is not useful. It is possible to get the same ancillary data through a getsockopt() call with the IPv6 socket option IPV6_PKTOPTIONS, on Linux named IPV6_2292PKTOPTIONS after the now obsoleted RFC where it originated. (unfortunately RFC 3542 that obsoletes it explicitly undefines this way to get packet ancillary data from a stream socket) Linux also has got a way to get packet ancillary data for IPv4 TCP sockets through a getsockopt() call with IP_PKTOPTIONS, which appears to be Linux specific. This implementation uses a flag field in the inet_drv.c socket internal data that records if any setsockopt() call with recvtclass, recvtos or recvttl (IPV6_RECVTCLASS, IP_RECVTOS or IP_RECVTTL) has been activated. If so recvmsg() is used instead of recvfrom(). Ancillary data is delivered to the application by a new return tuple format from gen_udp:recv/2,3 containing a list of ancillary data tuples [{tclass,TCLASS} | {tos,TOS} | {ttl,TTL}], as returned by recvmsg(). For a socket in active mode a new message format, containing the ancillary data list, delivers the data in the same way. For gen_sctp the ancillary data is delivered in the same way, except that the gen_sctp return tuple format already contained an ancillary data list so there are just more possible elements when using these socket options. Note that the active mode message format has got an extra tuple level for the ancillary data compared to what is now implemented gen_udp. The gen_sctp active mode format was considered to be the odd one - now all tuples containing ancillary data are flat, except for gen_sctp active mode. Note that testing has not shown that Linux SCTP sockets deliver any ancillary data for these socket options, so it is probably not implemented yet. Remains to be seen what FreeBSD does... For gen_tcp inet:getopts([pktoptions]) will deliver the latest received ancillary data for any activated socket option recvtclass, recvtos or recvttl, on platforms where IP_PKTOPTIONS is defined for an IPv4 socket, or where IPV6_PKTOPTIONS or IPV6_2292PKTOPTIONS is defined for an IPv6 socket. It will be delivered as a list of ancillary data items in the same way as for gen_udp (and gen_sctp). On some platforms, e.g the BSD:s, when you activate IP_RECVTOS you get ancillary data tagged IP_RECVTOS with the TOS value, but on Linux you get ancillary data tagged IP_TOS with the TOS value. Linux follows the style of RFC 2292, and the BSD:s use an older notion. For RFC 2292 that defines the IP_PKTOPTIONS socket option it is more logical to tag the items with the tag that is the item's, than with the tag that defines that you want the item. Therefore this implementation translates all BSD style ancillary data tags to the corresponding Linux style data tags, so the application will only see the tags 'tclass', 'tos' and 'ttl' on all platforms.
2018-08-15Merge branch 'maint'Lukas Larsson
2018-08-15lukas/kernel/logger_set_app_lvl/PR-1843/OTP-15146Lukas Larsson
Add logger:set_application_level/2
2018-08-14Merge branch 'maint'Siri Hansen
2018-08-13[logger] Avoid unwanted commas introduced by formatter's single_line optionSiri Hansen
When printing a map with ~p in a log message, the formatter's single_line option in some cases introduced unwanted commas after '=>', for example: This is now corrected. When single_line==true, width 0 is added to all ~p and ~P control sequences in the format string.