aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
AgeCommit message (Collapse)Author
2014-10-23stdlib: fix a bug in qlc_SUITE.erlHans Bolinder
2014-10-23Merge branch 'maint'Hans Bolinder
* maint: Fix rare race condition in Dets
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-20Add upgrade test in stdlib_SUITESiri Hansen
...using ct_release_test:upgrade/4
2014-10-20New function supervisor:get_childspec/2Siri Hansen
Takes the name of the child (or Pid, in the case of a simple_one_for_one supervisor) and returns the map which specifies the child.
2014-10-20Allow maps for supervisor flags and child specsSiri Hansen
Earlier, supervisor flags and child specs were given as tuples. While this is kept for backwards compatibility, it is now also allowed to give these parameters as maps: -type sup_flags() :: #{strategy => strategy(), % optional intensity => non_neg_integer(), % optional period => pos_integer()} % optional -type child_spec() :: #{id => child_id(), % mandatory start => mfargs(), % mandatory restart => restart(), % optional shutdown => shutdown(), % optional type => worker(), % optional modules => modules()} % optional Default values are as follows: Supervisor flags: strategy: one_for_one intensity: 1 period: 5 Child specs: restart: permanent type: worker shutdown: 5000 for workers, 'infinity' for supervisors modules: [M], where M comes from the child's start {M,F,A} Some of these default values are quite hard to decide on, since there really is no "most common way". It always depends on the use case. So we decided that the most important reason for having default values is to lower the start barrier and get "something" running. For production use, most systems must be fine tuned in this respect anyway. This is how we reasoned about it: Strategy: just pick one - and 'one_for_one' was most used in OTP. Max restart frequency (intensity/period): by allowing one restart only we keep the important supervisor feature of restarting children, but we also avoid the possibility of scaling to a huge amount of restarts if the supervisor tree is deep. Restart: just pick one - and 'permanent' is fairly common. Shutdown for workers: to avoid the confusion of why the terminate function is not executed, we decided not to use 'brutal_kill'. Which number to use is probably not that important, so we chose 5000. Shutdown for supervisors: the recommended shutdown value for supervisors is 'infinity', so we decied to use that. Having the same (integer) value as for workers can give very strange results. Type: just pick one - and we believe that 'worker' is most common
2014-10-08Rebase supervisorSiri Hansen
Remove duplicated code related to checking of supervisor flags.
2014-10-08Add more tests of supervisorSiri Hansen
Add tests of code_change/3 and error handling of supervisor flags.
2014-10-06Merge branch 'maint'Bruce Yinhe
2014-10-06Merge branch 'vinoski/edlin-ctrl-u' into maintBruce Yinhe
OTP-12224 * vinoski/edlin-ctrl-u: Make shell ctrl-u save killed text correctly
2014-10-03Merge branch 'egil/maps/variable-keys/OTP-12218'Björn-Egil Dahlberg
* egil/maps/variable-keys/OTP-12218: (22 commits) compiler: Update test for Maps aliasing compiler: Properly support Map aliasing compiler: Refactor Map pairs aliasing compiler: Fix harmless need_heap error for Maps stdlib: Update Map tests stdlib: Use environment bindings for Maps keys in erl_eval matching debugger: Update Map tests compiler: Update Map tests compiler: Fix v3_core Maps pair chains compiler: Use expressions in core patterns compiler: Use variables in Map cerl inliner compiler: Reintroduce binary limit for Map keys compiler: Shameless v3_core hack for variables compiler: Use variables in Map beam assmebler compiler: Use variables in Map kernel pass compiler: Use variables in Map core pass compiler: Normalize unary ops on Maps key literals stdlib: Update Map tests stdlib: erl_lint Map key variables compiler: Maps are always patterns never values in matching ...
2014-10-02Merge branch 'maint'Siri Hansen
Conflicts: lib/stdlib/src/stdlib.appup.src
2014-10-02Merge branch 'siri/appups-17.4' into maintSiri Hansen
* siri/appups-17.4: Fix stdlib.appup for OTP-17.4
2014-10-02Merge branch 'siri/filename-join-2/OTP-12158'Siri Hansen
* siri/filename-join-2/OTP-12158: Fix handling of single dot in filename:join/2
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.)
2014-10-01Merge branch 'maint'Björn-Egil Dahlberg
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 'maint'Björn-Egil Dahlberg
Conflicts: lib/stdlib/src/erl_pp.erl
2014-10-01Merge branch 'egil/fix-erl_pp/OTP-12190' into maintBjörn-Egil Dahlberg
* egil/fix-erl_pp/OTP-12190: stdlib: Handle key type expressions
2014-10-01Merge branch 'maint'Siri Hansen
2014-10-01Merge branch 'siri/new-dialyzer-gen_event/OTP-12206' into maintSiri Hansen
* siri/new-dialyzer-gen_event/OTP-12206: Fix dialyzer warnings for unmatched return in gen_event
2014-10-01Merge branch 'maint'Marcus Arendt
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: erl_parse abstract MapsBjörn-Egil Dahlberg
2014-09-30stdlib: Refactor ?line in erl_pp_SUITE:misc_attrsBjörn-Egil Dahlberg
2014-09-30stdlib: Refactor Maps farity attributesBjörn-Egil Dahlberg
2014-09-30Fix dialyzer warnings for unmatched return in gen_eventSiri Hansen
This was introduced by PR 445, commit 2e78c5f3e7f9991484ceb5d56e5b0086331101be.
2014-09-30Merge branch 'maint'Henrik Nord
2014-09-30Merge branch 'maint-17' into maintHenrik Nord
Conflicts: OTP_VERSION lib/ssh/test/ssh_connection_SUITE.erl
2014-09-29stdlib: Handle key type expressionsBjörn-Egil Dahlberg
2014-09-25Fix handling of single dot in filename:join/2Siri Hansen
The reference manual says that filename:join(A,B) is equivalent to filename:join([A,B]). In some rare cases this turns out not to be true: 1> filename:join("/a/.","b"). "/a/./b" 2> filename:join(["/a/.","b"]). "/a/b" In general, filename:join/1,2 removes single dots from the resulting path, except dots that occur at the beginning or end of the path. The problem above occurs when the first argument to join/2 ends with a dot, then it is not removed even if the second argument differs from an empty string and thus the dot ends up in "the middle" of the path. This commit corrects this problem. A single dot is now only kept if it occurs at the very beginning or the very end of the resulting path. Test of filename:join/1,2 are added in filename_SUITE. In addition, filelib_SUITE is updated with more tests of filelib:wildcard/2 since this failed when the given current directory (second argument) ended with a dot.
2014-09-25Merge branch 'maint'Marcus Arendt
Conflicts: lib/stdlib/src/gen_event.erl
2014-09-25Merge branch 'josevalim/jv-genevent' into maintMarcus Arendt
* josevalim/jv-genevent: Do not rely on macros with implicit vars
2014-09-25Fix stdlib.appup for OTP-17.4Siri Hansen
This is to allow upgrade from stdlib-2.2 (OTP-17.3).
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-22Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: lib/stdlib/src/erl_pp.erl
2014-09-22Merge branch 'egil/fix-maps-type-pretty-print/OTP-12190' into maintBjörn-Egil Dahlberg
* egil/fix-maps-type-pretty-print/OTP-12190: edoc, erl_docgen: Enhance internal map type format stdlib: Fix maps type pretty printing
2014-09-22Merge remote-tracking branch 'upstream/maint'Ingela Anderton Andin
2014-09-22Merge branch 'sstrollo/seb/obsolete_checking_fix/OTP-12187' into maintMarcus Arendt
* sstrollo/seb/obsolete_checking_fix/OTP-12187: Fix broken deprecation warnings in ssh application
2014-09-22Merge branch 'nox/fix-exporting-rules/OTP-12186'Marcus Arendt
* nox/fix-exporting-rules/OTP-12186: Rewrite merge of clause variable tables (in case, try, etc)
2014-09-22Merge branch 'maint'Siri Hansen
Conflicts: OTP_VERSION
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-19Merge branch 'nox/rm-generic_debug/OTP-12183'Marcus Arendt
* nox/rm-generic_debug/OTP-12183: Remove untested option 'generic_debug' from gen_server
2014-09-18Add note about adjacent separator characters in string:tokens/2Siri Hansen
Adjacent separator characters are treated as one in string:tokens/2. This was shown in the example in the reference manual but it was not written in words. A note about this is now added.
2014-09-17Merge tag 'OTP-17.3'Henrik Nord
=== OTP-17.3 === Changed Applications: - asn1-3.0.2 - common_test-1.8.2 - compiler-5.0.2 - crypto-3.4.1 - dialyzer-2.7.2 - diameter-1.7.1 - edoc-0.7.15 - erl_docgen-0.3.6 - erl_interface-3.7.18 - erts-6.2 - eunit-2.2.8 - hipe-3.11.1 - ic-4.3.6 - inets-5.10.3 - jinterface-1.5.10 - kernel-3.0.3 - megaco-3.17.2 - mnesia-4.12.3 - observer-2.0.2 - odbc-2.10.21 - os_mon-2.3 - ose-1.0.1 - public_key-0.22.1 - sasl-2.4.1 - snmp-5.1 - ssh-3.0.5 - ssl-5.3.6 - stdlib-2.2 - tools-2.7 - wx-1.3.1 Unchanged Applications: - cosEvent-2.1.15 - cosEventDomain-1.1.14 - cosFileTransfer-1.1.16 - cosNotification-1.1.21 - cosProperty-1.1.17 - cosTime-1.1.14 - cosTransactions-1.2.14 - debugger-4.0.1 - eldap-1.0.3 - et-1.5 - gs-1.5.16 - orber-3.7 - otp_mibs-1.0.9 - parsetools-2.0.11 - percept-0.8.9 - reltool-0.6.6 - runtime_tools-1.8.14 - syntax_tools-1.6.16 - test_server-3.7.1 - typer-0.9.8 - webtool-0.8.10 - xmerl-1.3.7 Conflicts: OTP_VERSION erts/vsn.mk
2014-09-15Remove untested option 'generic_debug' from gen_serverAnthony Ramine
This undocumented option makes an init:get_argument/1 call every time a gen_server is started. Reported-By: James Fish
2014-09-15Update release notesErlang/OTP
2014-09-15Update version numbersErlang/OTP