aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2017-03-10Update copyright yearRickard Green
2017-03-03Merge branch 'raimo/kernel/gen_statem-progress/OTP-14114' into maintRaimo Niskanen
* raimo/kernel/gen_statem-progress/OTP-14114: Make code_change/4 optional Implement fallback for terminate/3 Clarify code_change and callback mode change Stop pampering with stacktraces Clean up timer handling Remove event timer optimization Clean up timer handling Reduce number of loop variables hence code mass Optimize by using async cancel_timer Bugfix: callback mode not cached after code change Implement repeat_state and repeat_state_and_data Correct type checking function for action {next_event,,} Change arity of type to init_result/1
2017-03-01Merge pull request #1358 from bjorng/bjorn/stdlib/fix-zip-bugs/OTP-14189Björn Gustavsson
zip: Fix bugs ERL-348 and ERL-349 OTP-14246
2017-02-28zip: Eliminate leak of open file after crashBjörn Gustavsson
Make sure that zip:extract() and zip:create() closes the zip file if there is an error. ERL-349
2017-02-27stdlib: Add maps to term traversalHans Bolinder
2017-02-24Merge pull request #1350 from bjorng/bjorn/stdlib/safe-relative-path/OTP-14215Björn Gustavsson
filename: Add safe_relative_path/1 OTP-14215
2017-02-21stdlib: Improve pretty-printing of terms with mapsHans Bolinder
As of committing this branch maps:fold/3 calls maps:to_list/1, which means that the time and memory needed for printing maps is not always proportional to the size of the generated deep list of characters.
2017-02-21filename: Add safe_relative_path/1Björn Gustavsson
Add safe_relative_path/1 to guard against directory traversal attacks. It either returns a shorter path without any ".." or "." components, or 'unsafe' if an ".." component would climb up above the root of the relative path. Here are a few examples: safe_relative_path("a/b/..") => "a" safe_relative_path("a/..") => "" safe_relative_path("a/../..") => unsafe safe_relative_path("/absolute/path") => unsafe The returned path can be used directly or combined with an absolute path using filename:join/2.
2017-02-08stdlib: Improve Erlang shell's tab-completion of long namesHans Bolinder
2017-01-30Implement repeat_state and repeat_state_and_dataRaimo Niskanen
2017-01-23Correct type checking function for action {next_event,,}Raimo Niskanen
2017-01-17Merge branch 'egil/cuddle-tests' into maintBjörn-Egil Dahlberg
* egil/cuddle-tests: stdlib: Increase timetrap for rand_SUITE common_test: Increase timetrap for cth_hooks_SUITE compiler: Increase timetrap timeouts for lc_SUITE
2016-12-19Merge branch 'rickard/stacktrace-bugs' into maintRickard Green
OTP-14055 * rickard/stacktrace-bugs: Remove faulty release note for these fixes New test cases testing stacktrace from apply on erlang:error() Fix stactrace for apply on error/[1,2], exit/1, or throw/1 Fix stack-trace generated by a traced process
2016-12-19Fix stactrace for apply on error/[1,2], exit/1, or throw/1Rickard Green
2016-12-13Allow escripts with only two linesJing Peng
The current implementation assumes that escripts all have at least three lines. But according to the escript documentation, comments on the second line and emulator flags on the third line are all optional. Thus escripts with only two lines -- shebang on the first line and code on the second line -- will not run. This commit fixes the problem by rearranging the escript header parsing logic, and recognize the escript body on the second line if the header only contains a line of shebang.
2016-11-17Correct tar_SUITE:unicode/1Björn Gustavsson
Make sure that we always test the "+fnu" option on all systems. It seems that it was not tested in our daily builds, since they are run non-interactively. Make sure that we sort the list of names in do_unicode/1. Otherwise the test would only work in "+fnl" mode because the list would only contain one element.
2016-11-11stdlib: Increase timetrap for rand_SUITEBjörn-Egil Dahlberg
* valgrind needs a lot of time
2016-11-08Merge branch 'raimo/gen_statem-improvements/OTP-13929' into maintRaimo Niskanen
* raimo/gen_statem-improvements/OTP-13929: Log terminate to sys debug Optimize event timeout Rework timeout handling Clarify the chapter 'Postponing Events' (ERL-284) Fix doc and type for state enter calls
2016-11-04stdlib: Increase timeouts in ets_SUITEBjörn-Egil Dahlberg
* valgrind needs lots of time
2016-11-04stdlib: Increase timeouts in rand_SUITEBjörn-Egil Dahlberg
* valgrind needs lots of time
2016-11-04stdlib: Increase timeouts in base64_SUITEBjörn-Egil Dahlberg
* valgrind needs lots of time
2016-10-26Rework timeout handlingRaimo Niskanen
Handling of timers and timeouts has been cleaned up and generalized. Semantic change regarding state timeout zero: Previously if one state caused a state timeout zero and managed to stay in the same state to insert additional timeout zero(s) in the next state callback invocation, then there would be only one timeout zero event. The mindset was that the machine was faster then the timeout zero. This has changed with the mindset that all state callback invocations should be independent, so now the machine will get one state timeout zero event per started state timeout zero. Note that just using zero timeouts is fairly esoteric...
2016-10-19Merge branch 'gomoripeti/stdlib/ms_fix/PR-1203/OTP-13974' into maintHans Bolinder
* gomoripeti/stdlib/ms_fix/PR-1203/OTP-13974: dbg:fun2ms: allow empty list as head
2016-10-19Merge branch 'raimo/gen_statem-improvements/OTP-13929' into maintRaimo Niskanen
* raimo/gen_statem-improvements/OTP-13929: Fix race condition in cancel_timer/1 Use parameterized types Implement state timeouts Improve docs and types Change state entry events into state enter calls Improve docs Improve docs Implement state entry events Implement call/3 dirty_timeout
2016-10-13dbg:fun2ms: allow empty list as headPéter Gömöri
Running 'dbg:fun2ms(fun([]) -> return_trace() end' resulted in an error "dbg:fun2ms requires fun with single variable or list parameter" But the empty list is actually a list and it is a valid value as a match-spec head (matching on arity-0 functions). Although its practical use is questionable this commit eliminates a small limitation of ms_transform which is not present in the match-spec grammar.
2016-10-12Implement state timeoutsRaimo Niskanen
2016-09-30Change state entry events into state enter callsRaimo Niskanen
2016-09-27Merge branch 'andrey/stdlib/fix_edlin_expand/ERL-1152' into maintHans Bolinder
* andrey/stdlib/fix_edlin_expand/ERL-1152: stdlib: Add a testcase for Unicode expander Support for unicode expander
2016-09-23stdlib: Add a testcase for Unicode expanderHans Bolinder
2016-09-16Implement state entry eventsRaimo Niskanen
2016-09-16Implement call/3 dirty_timeoutRaimo Niskanen
2016-09-05Add test case in zip_SUITEPeter Andersson
2016-08-17Clarify error valuesRaimo Niskanen
2016-07-27Rewrite gen_statem TCs for M:callback_mode/0Raimo Niskanen
2016-07-14Merge branch 'sverker/update_counter-deadlock/ERL-188/OTP-13731' into maint-19Erlang/OTP
* sverker/update_counter-deadlock/ERL-188/OTP-13731: erts: Add test ets_SUITE:update_counter_table_growth erts: Fix deadlock in ets:update_counter/4 erts: Optimize db_finalize_dbterm_hash
2016-07-11erts: Add test ets_SUITE:update_counter_table_growthSverker Eriksson
2016-07-04stdlib: Correct a bug regarding records in the shellHans Bolinder
See also ERL-182.
2016-06-15Merge branch 'sverker/revert-ets-load-factor'Sverker Eriksson
2016-06-15Merge branch 'siri/cuddle-master'Siri Hansen
* siri/cuddle-master: Add short sleep when killing slave nodes [ct test] Do reload_config instead of get_config
2016-06-15Add short sleep when killing slave nodesSiri Hansen
slave_SUITE:t_start_link somtimes fails when checking that a slave is dead. This commit add a short sleep before the check to allow the node to terminate.
2016-06-13stdlib: Let epp handle long file namesHans Bolinder
2016-06-09Remove support for '...' in Maps typesHans Bolinder
It is possible that '...' is added later (OTP 20.0), but for now we are not sure of all details.
2016-06-08Revert "erts: Change ETS hash load factor"Sverker Eriksson
This reverts commit 7c133fb1094ad1cabbb5cfc157483a43c816c6a9.
2016-06-08Revert "Temporally disable of failing ets_SUITE:memory_check_summary"Sverker Eriksson
This reverts commit f1987d5299ce67b0eb4c4a83d8ee9bcf7426c307.
2016-06-08Merge branch 'zandra/test_server/unmatched_returns/OTP-13345'Zandra Hird
* zandra/test_server/unmatched_returns/OTP-13345: vts - Fix unmatched_return warnings test_server_sup - Fix unmatched_return warnings test_server_node - Fix unmatched_return warnings test_server_io - Fix unmtached_return warnings test_server_gl - Fix unmatched_return warnings test_server_ctrl - Fix unmatched_return warnings test_server - fix unmatched_return warnings remove unused purify functions
2016-06-08Merge branch 'josevalim/supervisor-get-callback-module/PR-1000/OTP-13619'Siri Hansen
* josevalim/supervisor-get-callback-module/PR-1000/OTP-13619: Return callback module in supervisor format_status
2016-06-07remove unused purify functionsZandra
2016-06-04Return callback module in supervisor format_statusJosé Valim
The previous implementation of supervisor:get_callback_module/1 used sys:get_status/1 to get the supervisor inner state and retrieve the callback module. Such implementation forbids any other supervisor implementation that has an internal state different than the #state{} record in supervisor.erl. This patch allows supervisors to return the callback module as part of the sys:get_status/1 data, no longer coupling the callback module implementation with the inner #state{} record. Notice we have kept the clause matching the previous sys:get_status/1 reply for backwards compatibility purposes.
2016-06-01Merge branch 'sverker/ets-load-factor/OTP-13642'Sverker Eriksson
2016-06-01Temporally disable of failing ets_SUITE:memory_check_summarySverker Eriksson
Seems to be the growing meta tables that is causing increasing failed memchecks after load factor was lowered.