aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2014-11-26Merge branch 'dgud/testcasecuddling' into maintDan Gudmundsson
* dgud/testcasecuddling: stdlib: Fix timing issue in testcase
2014-11-20Merge branch 'legoscia/io-message-queue-optimisation' into maintHenrik Nord
* legoscia/io-message-queue-optimisation: Optimise io requests for long message queues
2014-11-18erl_tar: Extend api to define own storage media access functions.Hans Nilsson
The reason for this is a requirement on enabling ssh_sftp to write a tar file on the server. This new api function is used by ssh_sftp:open_tar/3,4.
2014-11-17Merge branch 'nox/stdlib/ms_transform-locate-shadow-warning/OTP-12264' into ↵Björn Gustavsson
maint * nox/stdlib/ms_transform-locate-shadow-warning/OTP-12264: Fix locations of shadowing warnings in ms_transform
2014-11-07Add stack trace for gen_server exit in ERROR REPORTSiri Hansen
If a callback function was terminated with exit/1, there would be no stack trace in the ERROR REPORT produced by gen_server. This has been corrected. The actual exit reason for the process is not changed.
2014-10-23Fix rare race condition in DetsHans Bolinder
The correction is due to the the evil testcase dets_SUITE:simultaneous_open(). If the process repairing a Dets file is killed (should normally never happen), and another process tries to repair the file, a temporary file from the first process could live on for a while, even after a successful call to file:delete(). This has only been seen on W-nd-ows, where it is a known problem. There are other ways to deal with the problem (rename the file; use some other filename), but we continue using one certain filename in order to be as backwards compatible as possible.
2014-10-01Merge branch 'ap/attribute_fun_arity_in_map/OTP-12213' into maintBjörn-Egil Dahlberg
* ap/attribute_fun_arity_in_map/OTP-12213: stdlib: Test Map attributes via erl_pp stdlib: erl_parse abstract Maps stdlib: Refactor ?line in erl_pp_SUITE:misc_attrs stdlib: Refactor Maps farity attributes Allow Name/Arity syntax in maps inside attributes
2014-10-01Merge branch 'capflam/filelib_wildcard_fix' into maintMarcus Arendt
* capflam/filelib_wildcard_fix: Fix filelib:wildcard/2 when 'Cwd' ends with a dot
2014-09-30stdlib: Test Map attributes via erl_ppBjörn-Egil Dahlberg
2014-09-30stdlib: Refactor ?line in erl_pp_SUITE:misc_attrsBjörn-Egil Dahlberg
2014-09-25Do not test appup of core apps for upgrade from current vsnSiri Hansen
The appup tests for kernel, stdlib and sasl tests that the appup file allows upgrade from the previous and current major release to the current release. If, in the current release, the application version was not changed compared to the previous release, then we would still test that the appup supported the upgrade (i.e. from current release to current release). This is now changed, in order to avoid test failures on patch releases where kernel, stdlib and sasl are not changed.
2014-09-24stdlib: Fix timing issue in testcaseDan Gudmundsson
Another error message is generated when the process exits, ignore it.
2014-09-19Optimise io requests for long message queuesMagnus Henoch
Ensure that the monitor reference is present in all receive clauses, so that the compiler optimisation kicks in and the run time won't depend on the length of the message queue of the calling process. Remove the 'EXIT' clause, as its presence breaks the optimisation, and that case is handled by the 'DOWN' clause anyway. The test io_SUITE:io_with_huge_message_queue is an adaptation of gen_server_SUITE:call_with_huge_message_queue.
2014-09-04Merge branch 'egil/maps-with-doc-tests/OTP-12137' into maintBjörn-Egil Dahlberg
* egil/maps-with-doc-tests/OTP-12137: stdlib: Test maps:with/2 stdlib: Document maps:with/2
2014-09-01Merge branch 'nox/erl_scan-fix-column-tracking' into maintMarcus Arendt
* nox/erl_scan-fix-column-tracking: Properly track column numbers in erl_scan
2014-08-28Merge branch 'dgud/stdlib/format_status_terminate/OTP-11967' into maintDan Gudmundsson
* dgud/stdlib/format_status_terminate/OTP-11967: stdlib: Call format_status even if terminate callback crashes
2014-08-26stdlib: Test maps:with/2Björn-Egil Dahlberg
2014-07-15Merge branch 'nox/maps-shell-expansion' into maintBruce Yinhe
OTP-12063 * nox/maps-shell-expansion: Expand shell functions in map expressions
2014-07-14Fix filelib:wildcard/2 when 'Cwd' ends with a dotChristopher Faulet
In such case, filelib:wildcard/2 returned truncated results: 1> file:set_cwd("/usr/lib/erlang/lib"). ok 2> filelib:wildcard("stdlib-*/ebin/*.app", filename:absname(".")). ["dlib-2.1/ebin/stdlib.app"]
2014-07-11Merge branch 'maint-17' into maintErland Schönbeck
2014-07-09Add tests of filelib and symlinksSiri Hansen
This commit complements 769996c0cd4cb68c157e39de725642f209ed7423 and adds tests for the following problems introduced by f11aabdc9fec593c31e6c4f3fa25c1707e9c35df: Given the symlink 'dirlink' pointing to an existing dir, then - filelib:is_regular("dirlink") -> false - filelib:is_dir("dirlink") -> false Given the symlink 'filelink' pointing to an existing file, then - filelib:is_regular("filelink") -> false - filelib:is_file("filelink") -> false - filelib:last_modified("filelink") and filelib:filesize("filelink") return the info of the link and not the file Given the symlink "broken_symlink" pointing to a non-existing file, then - filelib:wildcard("broken_symlink",File) -> []
2014-07-09Fix handling of broken symlinks in filelibAnthony Ramine
This fixes a bug introduced in f11aabdc9fec593c31e6c4f3fa25c1707e9c35df where filelib:eval_read_file_info/2 was made to use file:read_link_info/1 to never follow symlinks. This fixed wildcard/1 but broke every other function using eval_read_file_info/2. Reported-by: Louis-Philippe Gauthier Reported-by: Danil Zagoskin
2014-07-07Merge branch 'nox/io_lib_format-width-too-small' into maintBruce Yinhe
* nox/io_lib_format-width-too-small: Properly handle fields too short in io_lib_format OTP-12041
2014-07-04stdlib: Call format_status even if terminate callback crashesDan Gudmundsson
The format_status callback (if exists) should always be invoked when logging errors.
2014-07-01Expand shell functions in map expressionsAnthony Ramine
Reported-by: Danil Zagoskin
2014-06-30stdlib: Correct documentation of dets:insert/2Hans Bolinder
Thanks to Alexei Sholik for reporting the bug.
2014-06-16Properly track column numbers in erl_scanAnthony Ramine
This is a partial revert of 05c4d31b2c5c5f6ade7d91b55c598fe7fa58e509 in which a new macro `?STR()` was introduced. This macro shouldn't be used in scan_number/6 and scan_based_int/6 because the length of the string is needed when computing column numbers through tok3/8.
2014-06-15Fix locations of shadowing warnings in ms_transformAnthony Ramine
A shadowed variable in an ms_transform match expression emits a warning located at the match expression instead of the variable.
2014-05-26Merge branch 'saa/add_default_value_for_maps_get/OTP-11951' into maintBjörn-Egil Dahlberg
* saa/add_default_value_for_maps_get/OTP-11951: stdlib: Fix indentation of maps doc Add docs and test for maps:get/3 Add default value for maps:get
2014-05-20Properly handle fields too short in io_lib_formatAnthony Ramine
Values for which the precision or field width were too small in io_lib_format could trigger an infinite loop or crash in term/5. Reported-by: Richard Carlsson
2014-05-12Merge branch 'nox/fix-eval-map-update/OTP-11922' into maintBjörn-Egil Dahlberg
* nox/fix-eval-map-update/OTP-11922: Fix evaluation of map updates in the debugger and erl_eval
2014-05-09Merge branch 'bjorn/stdlib/erl_tar/OTP-11854' into maintBjörn Gustavsson
* bjorn/stdlib/erl_tar/OTP-11854: Correct typo in type specification Fix typo in erl_tar docs Update information about compatibility Correct end of tape marker Support path names with characters outside the US ASCII range
2014-05-09Merge branch 'siri/cuddle-with-tests' into maintSiri Hansen
* siri/cuddle-with-tests: Fix regexp in release_handler test so versions are correctly replaced Update kernel, stdlib and sasl appup tests Minor update to test_server for finding old releases
2014-05-08Correct end of tape markerBjörn Gustavsson
The POSIX standard for tar says that there must be at least two 512-bytes zero blocks at the end of the tar archive file. Our implementation would only emit a single 512-byte zero block if the size of the last file was in the range 18*512 through 19*512-1 (modulo 20*512). GNU tar would correctly unpack such tar archive file, but would emit a warning: tar: A lone zero block at 20
2014-05-08Support path names with characters outside the US ASCII rangeBjörn Gustavsson
2014-05-08Merge branch 'bjorn/stdlib/file_lib-wildcard/OTP-11850' into maintBjörn Gustavsson
* bjorn/stdlib/file_lib-wildcard/OTP-11850: filelib:wildcard() should show broken symlinks
2014-05-03Fix evaluation of map updates in the debugger and erl_evalAnthony Ramine
Reported-by: José Valim
2014-04-23Update kernel, stdlib and sasl appup testsSiri Hansen
Add test of update instructions from current major to current minor. Earlier only previous major to current was tested.
2014-04-16stdlib: Fix error message when exporting (redefined) map() typeHans Bolinder
When redefining and exporting the type map() erl_lint erroneously emitted an error. This bug has been fixed.
2014-04-15Add docs and test for maps:get/3Sergey Abramyan
2014-04-10filelib:wildcard() should show broken symlinksBjörn Gustavsson
filelib:wildcard("broken_symlink") would return an empty list if "broken_symlink" is a symlink that does not point to an existing file.
2014-04-03stdlib: Deny map keys defined as #{ .. := .. } in patternsBjörn-Egil Dahlberg
2014-03-28Merge branch 'egil/maps-fix-src-listing'Björn-Egil Dahlberg
* egil/maps-fix-src-listing: stdlib: Fix map type listing
2014-03-28stdlib: loosen testcasesDan Gudmundsson
Stabilize tests for all kind of machines Old sparc (and newer smaller) machines timeouts in 'random_ref_comp' decrease load and increase timeouts. Supervisor: Turn up accepted time, since if non-linear it should be much worse, now the test failes on slow multicore machines Remove memory tests, they fail sometimes and those tests are not needed to be tested. Hard to predict GC's and other processes behaviours.
2014-03-27stdlib: Fix map type listingBjörn-Egil Dahlberg
2014-03-26Merge branch 'bjorn/stdlib/otp_internal'Björn Gustavsson
* bjorn/stdlib/otp_internal: otp_internal: No longer warn for funtions removed in R13B otp_internal: Postpone removals from R17 to OTP 18
2014-03-25Merge branch 'vinoski/sys-get-rep-state2'Siri Hansen
* vinoski/sys-get-rep-state2: remove tuple funs from special process documentation fix sys:get_state/1,2 and sys:replace_state/2,3 when sys suspended OTP-11817
2014-03-25stdlib: Generalize erl_parse:abstract/2Hans Bolinder
The 'encoding' option of erl_parse:abstract/2 has been extended to include 'none' and a callback function (a predicate). The rationale is that a more general means of determining what integer lists are to be represented as strings may help readability when generating Erlang code given input in some other encoding than Latin-1 or UTF-8.
2014-03-25otp_internal: No longer warn for funtions removed in R13BBjörn Gustavsson
The grace period is over.
2014-03-24stdlib: warn if the type map() is redefinedHans Bolinder