aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
AgeCommit message (Collapse)Author
2015-06-04Fix 6 tests in gen_tcp_misc_SUITERory Byrne
All of the tests are related to gen_tcp:accept/[1,2] and each of them has the same problem: they ignore the return value of the ?EXPECT_ACCEPTS macro.
2015-06-04Merge branch 'egil/cuddle-tests'Björn-Egil Dahlberg
* egil/cuddle-tests: erts: Remove remaining ?line macros in trace_meta_SUITE erts: Relax trace_meta_SUITE:on_and_off_test/1 erts: Remove ?line macro in trace_meta_SUITE:on_and_off_test/1 kernel: Remove remaining ?line macros in gen_tcp_misc_SUITE kernel: Relax gen_tcp_misc_SUITE don't wait for timeout kernel: Relax test gen_tcp_misc_SUITE:wrapping_oct/1
2015-06-04kernel: Remove remaining ?line macros in gen_tcp_misc_SUITEBjörn-Egil Dahlberg
Also, fixup some confusing indentations. This commit only contains whitespace changes and removal of ?line macros.
2015-06-02Merge branch 'nybek/fix_gen_tcp_shutdown'Zandra Hird
OTP-12797
2015-05-28kernel: Relax gen_tcp_misc_SUITE don't wait for timeoutBjörn-Egil Dahlberg
It's unnecessary to wait for timeout in some of these testcases. The tests should not check for stray messages while waiting for timeout, that is mostly covered by message order and pattern matching anyway.
2015-05-28kernel: Relax test gen_tcp_misc_SUITE:wrapping_oct/1Björn-Egil Dahlberg
2015-05-28Merge branch 'richcarl/warnings-by-default/OTP-12781'Björn-Egil Dahlberg
* richcarl/warnings-by-default/OTP-12781: stdlib: Use warning channel in test qlc_SUITE:otp_6964/1 stdlib: Fix testcase for qlc_SUITE kernel: Fix code_SUITE with respect to new logger default Map error logger warnings to warning messages by default
2015-05-27kernel: Fix code_SUITE with respect to new logger defaultBjörn-Egil Dahlberg
2015-05-26Merge branch 'nybek/limit_leading_zeros_in_ipv6_addresses'Henrik Nord
* nybek/limit_leading_zeros_in_ipv6_addresses: Fix parsing of IPv6 addresses to limit leading zeros OTP-12773
2015-05-22Map error logger warnings to warning messages by defaultRichard Carlsson
Also fix and document the broken +We option.
2015-05-22Fix parsing of IPv6 addresses to limit leading zerosRory Byrne
The current implementations of inet:parse_ipv6_address/1 and inet:parse_ipv6strict_address/1 permit address strings which have an unlimited number of leading zeros. Addresses such as: "0000000000000000000000000000000ffff::" "::00000000000000000000000000000000000000000000000000000000" "::0000000f435:1" If we are using this facility to validate string representations of IPv6 addresses, then we would end up validating addresses which are non-conformant (with respect to RFC 4291 section 2.2) and potentially dangerous. This patch ensures that each segment of an IPv6 address has a maximum of 4 hex digits.
2015-05-20Revert "Map error logger warnings to warning messages by default"Zandra Hird
This reverts commit 4c4d7fa40e5fb59854724ce74b8aa3546525cb90. This pr is causing some test failures that were missed at first.
2015-05-18Map error logger warnings to warning messages by defaultRichard Carlsson
Also fix and document the broken +We option.
2015-05-12Fix gen_tcp:shutdown/2 by making it asynchronousRory Byrne
If the driver queue is empty, or the user is requesting a 'read' shutdown, then the shutdown() syscall is performed synchronously, as per the old version of shutdown/2. However, if the user is requesting a 'write' or 'read_write' shutdown, and there is data in the driver queue for the socket, then the shutdown() syscall is delayed and handled asynchronously when the driver queue is written out. This version of shutdown solves a number of issues with the old version. The two main solutions it offers are: * It doesn't block when the TCP peer is idle or slow. This is the expected behaviour when shutdown() is called: the caller needs to be able to continue reading from the socket, not be prevented from doing so. * It doesn't truncate the output. The current version of gen_tcp:shutdown/2 will truncate any outbound data in the driver queue after about 10 seconds if the TCP peer is idle of slow. Worse yet, it doesn't even inform anyone that the data has been truncated: 'ok' is returned to the caller; and a FIN rather than an RST is sent to the TCP peer. For a detailed description of all the problems with the old version of shutdown, please see the EEP Light that was written to justify this patch.
2015-05-11Send format and args on process exit to error_loggerJosé Valim
Previously, the emulator would generate a whole string with values and call the error_logger passing "~s~n". This commit changes it to a format string containing ~p with the respective values as arguments.
2015-04-30kernel: Use module erl_annoHans Bolinder
2015-03-17Merge branch 'essen/zlib-windowbits'Zandra Hird
* essen/zlib-windowbits: Update zlib:zwindowbits/0 type to accept 8 and -8 OTP-12564
2015-03-13Merge branch 'maint'Raimo Niskanen
2015-03-13Merge branch 'raimo/infinite-loop-gethostbyname/OTP-12133' into maintRaimo Niskanen
* raimo/infinite-loop-gethostbyname/OTP-12133: Restore lookup order after test
2015-03-11Merge branch 'dgud/kernel/unicode_file_read/OTP-12144'Dan Gudmundsson
* dgud/kernel/unicode_file_read/OTP-12144: kernel: Add test for unicode mode in file kernel: Fix file:read_line/1 unicode error handling
2015-03-10kernel: Add test for unicode mode in fileDan Gudmundsson
2015-03-09Merge branch 'seriyps/zlib-inflate-bound'Henrik Nord
* seriyps/zlib-inflate-bound: Add zlib limited output buffer size functionality Conflicts: erts/preloaded/ebin/zlib.beam OTP-12548
2015-03-09Restore lookup order after testRaimo Niskanen
2015-03-03Update zlib:zwindowbits/0 type to accept 8 and -8Loïc Hoguin
Commit 7e8f5a776cbfa376e03369d058a90c8dd9f217fc (importing R11B-3) updated zlib, which had changed what values it accepts for window bits from 9-15 to 8-15. From deflate.c: - windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { return Z_STREAM_ERROR; } + if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ In inflate.c 8 was already an accepted value. This commit updates OTP to also accept the values 8 and -8.
2015-03-02Merge branch 'maint'Raimo Niskanen
2015-03-02Merge branch 'raimo/inet_tcp_dist-priority-option/OTP-12476' into maintRaimo Niskanen
* raimo/inet_tcp_dist-priority-option/OTP-12476: Document kernel inet_dist_{listen,connect}_options Test kernel inet_dist_{listen,connect}_options Implement kernel inet_dist_{listen,connect}_options
2015-02-23Merge branch 'maint'Peter Andersson
2015-02-20Merge branch 'raimo/infinite-loop-gethostbyname/OTP-12133' into maintRaimo Niskanen
* raimo/infinite-loop-gethostbyname/OTP-12133: Remove infinite loop in inet:gethostbyname_tm/4
2015-02-20Test kernel inet_dist_{listen,connect}_optionsRaimo Niskanen
2015-02-18Remove infinite loop in inet:gethostbyname_tm/4Raimo Niskanen
An erroneous lookup option is needed to trigger the bug, and that can only enter the system from a parsed file e.g .inetrc. Pinpointed by Emil Holmström
2015-02-12Add zlib limited output buffer size functionalityСергей Прохоров
This functionality may be useful for compressed streams with high compression ratio (in case of gzip it may be up to x1000), when small amount of compressed data will produce large amount of uncompressed output. This may lead to DoS attacks, because server easily goes out of memory. Example of such high compression ratio stream: ``` dd if=/dev/zero of=sparse.bin bs=1MB count=100 # 100mb of zeroes gzip sparse.bin # 95kb sparse.bin.gz $ erl > {ok, Compressed} = file:read_file("sparse.bin.gz"), > 97082 = size(Compressed), > Uncompressed = zlib:gunzip(Compressed), > 100000000 = iolist_size(Uncompressed). ```
2015-01-23Merge branch 'maint'Marcus Arendt
2015-01-23Merge branch 'nox/standard_error/OTP-12424' into maintMarcus Arendt
* nox/standard_error/OTP-12424: Test standard_error Properly handle broken input in standard_error Fix io:getopts(standard_error)
2015-01-20Test standard_errorAnthony Ramine
2014-12-29Merge branch 'lemenkov/use_os_getenv_2'Marcus Arendt
* lemenkov/use_os_getenv_2: fix missing include Start using os:getenv/2 fun Introduce os:getenv/2
2014-12-22Merge branch 'maint'Bruce Yinhe
2014-12-22Merge branch 'mikpe/fix-eacces-spelling' into maintBruce Yinhe
* mikpe/fix-eacces-spelling: fix eacces spelling
2014-12-15Start using os:getenv/2 funPeter Lemenkov
See #535 Signed-off-by: Peter Lemenkov <[email protected]>
2014-12-03Merge branch 'maint'Raimo Niskanen
2014-12-03Merge branch 'raimo/netns-opt-gen_udp/OTP-12314' into maintRaimo Niskanen
* raimo/netns-opt-gen_udp/OTP-12314: Text netns option at socket open Fix handling netns option in gen_udp
2014-12-02fix eacces spellingMikael Pettersson
2014-12-02Text netns option at socket openRaimo Niskanen
2014-11-26Merge branch 'nox/read_file_info-raw/OTP-12325' into maintLukas Larsson
* nox/read_file_info-raw/OTP-12325: kernel: Do not check unsync:ed file size Introduce new option 'raw' in file_info functions
2014-11-26Merge branch 'maint'Lukas Larsson
* maint: kernel: Do not check unsync:ed file size Introduce new option 'raw' in file_info functions
2014-11-26Merge branch 'nox/read_file_info-raw/OTP-12325' into maintLukas Larsson
* nox/read_file_info-raw/OTP-12325: kernel: Do not check unsync:ed file size Introduce new option 'raw' in file_info functions
2014-11-25kernel: Do not check unsync:ed file sizeLukas Larsson
2014-11-05Merge branch 'maint'Lukas Larsson
* maint: erts: getsockname is not allowed on non-bound sockets
2014-11-05Merge branch 'lukas/erts/fdopen_non_bound_win32_fix/OTP-12289' into maintLukas Larsson
* lukas/erts/fdopen_non_bound_win32_fix/OTP-12289: erts: getsockname is not allowed on non-bound sockets
2014-10-06Merge branch 'maint'Bruce Yinhe
2014-10-01Make shell ctrl-u save killed text correctlySteve Vinoski
Fix edlin to correctly save text killed with ctrl-u. Prior to this fix, entering text into the Erlang shell and then killing it with ctrl-u followed by yanking it back with ctrl-y would result in the yanked text being the reverse of the original killed text. Add a test for the fix to interactive_shell_SUITE. (This is the same fix as in PR#416, but that PR was never completed.)