aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2011-09-27beam_lib: Handle rare race in the crypto key server functionalityBjörn Gustavsson
In rare circumstances, there can be a race when the crypto key server is started by beam_lib:crypto_key_fun/1 shortly after stopping it using beam_lib:clear_crypto_key_fun/0. The race occurs because the crypto key server first sends back the reply to the calling process, then terminates. (The race is probably more likely to happen on CPUs with hyper threading.)
2011-09-19Merge branch 'bjorn/stdlib/fix-tar_SUITE' into devBjörn Gustavsson
* bjorn/stdlib/fix-tar_SUITE: tar_SUITE: Work around limited pathname length on Windows
2011-09-16Merge branch 'pan/erl-bif-types/OTP-9496' into devBjörn-Egil Dahlberg
* pan/erl-bif-types/OTP-9496: Cleanup ETS bif's in hipe:erl_bif_types.erl (for dialyzer)
2011-09-16tar_SUITE: Work around limited pathname length on WindowsBjörn Gustavsson
Ever since the test suites were converted to the common_test convention, the tests for long names started to fail on Windows. The reason is that those test cases depend on the current working directory, and that the current working directory in common_test test cases is usually set to a directory with a longer pathname than in test_server test suites. Since neither Erlang/OTP nor common_test provides a portable way to create a temporary directory with a short name, we will have to abuse priv_dir by going upwards from it. For further information, see the comment in run_in_short_tempdir/2.
2011-09-14Merge branch 'lukas/erts/ets_order_testcases/OTP-9459' into devLukas Larsson
* lukas/erts/ets_order_testcases/OTP-9459: Add a high value to test data to catch type cast truncation errors
2011-09-12Cleanup ETS bif's in hipe:erl_bif_types.erl (for dialyzer)Patrik Nyblom
2011-08-31Add a high value to test data to catch type cast truncation errorsLukas Larsson
2011-08-31Improve and correct types and specifications in Kernel and STDLIBHans Bolinder
Running Dialyzer on the test suites revealed a few type errors.
2011-08-23fix supervisors restarting temporary childrenFred Hebert
In the current implementation of supervisors, temporary children should never be restarted. However, when a temporary child is restarted as part of a one_for_all or rest_for_one strategy where the failing process is not the temporary child, the supervisor still tries to restart it. Because the supervisor doesn't keep some of the MFA information of temporary children, this causes the supervisor to hit its restart limit and crash. This patch fixes the behaviour by inserting a clause in terminate_children/2-3 (private function) that will omit temporary children when building a list of killed processes, to avoid having the supervisor trying to restart them again. Only supervisors in need of restarting children used the list, so the change should be of no impact for the functions that called terminate_children/2-3 only to kill all children. The documentation has been modified to make this behaviour more explicit.
2011-08-18Fix a bug in zip:zip_open/1,2.Hans Bolinder
zip:zip_open/1,2 did not accept binary archives. Also corrected the contracts of t/1 and tt/1.
2011-07-26Merge branch 'sverker/testcase/OTP-9423' into devSverker Eriksson
* sverker/testcase/OTP-9423: Add test case for ETS bug OTP-9423
2011-07-21EOF before first field is only ok for first character in io:freadRaimo Niskanen
2011-07-21At end of input ask for more also for for literal format charactersRaimo Niskanen
2011-07-20Add test case for ETS bug OTP-9423Sverker Eriksson
2011-07-12Merge branch 'maint-r14' into devSverker Eriksson
Conflicts: erts/vsn.mk
2011-07-08Use separate memory carriers for small blocksRickard Green
2011-07-08Make sure supervisor_SUITE:count_children_memory is always skipped when ↵Siri Hansen
erlang:memory is not supported Replace the count_children_allocator_test with try erlang:memory in order to make sure there is no attempt at running this test case if erlang:memory is not supported.
2011-07-06Fix a bug in erl_scan:set_attribute/3Hans Bolinder
2011-05-13Merge branch 'hb/stdlib/dets_tablenames/OTP-9282' into devHans Bolinder
* hb/stdlib/dets_tablenames/OTP-9282: Allow Dets tablenames to be arbitrary terms Conflicts: lib/stdlib/src/dets.erl
2011-05-13Merge branch 'hb/stdlib/specs/OTP-9267' into devHans Bolinder
* hb/stdlib/specs/OTP-9267: Types and specifications have been modified and added Conflicts: lib/stdlib/src/timer.erl
2011-05-12Types and specifications have been modified and addedHans Bolinder
2011-05-11Add timer:tc/1 which measures elapsed time for a fun/0Dan Gudmundsson
Also removes the 'catch' from timer:tc functions which masked errors in measuring code.
2011-05-11Allow Dets tablenames to be arbitrary termsHans Bolinder
2011-05-04Change list to set in supervisor for saving pids of dynamic temprary childrenSiri Hansen
Since initial arguments of temporary children under simple_one_for_one supervisors are not saved, only a list of pids was stored in such supervisors. When adding/deleting many children, this would scale badly. To avoid this the list is now changed to a set.
2011-04-28Merge branch ↵Siri Hansen
'siri/stdlib/supervisor-terminate_child-simple_one_for_one/OTP-9201' into dev * siri/stdlib/supervisor-terminate_child-simple_one_for_one/OTP-9201: Add terminate_child(Sup, Pid) for simple_one_for_one Allow supervisor:terminate_child(SupRef,Pid) for simple_one_for_one
2011-04-12Allow supervisor:terminate_child(SupRef,Pid) for simple_one_for_oneSiri Hansen
supervisor:terminate_child/2 was not allowed if the supervisor used restart strategy simple_one_for_one. This is now changed so that children of this type of supervisors can be terminated by specifying the child's Pid.
2011-04-12Merge branch 'gc/gen-format-status-improvements' into devHenrik Nord
* gc/gen-format-status-improvements: Fix format_status bug for unregistered gen_event processes Conflicts: lib/stdlib/test/gen_event_SUITE.erl OTP-9218
2011-04-04Completed bug fix "temporary child specs should not be kept when childIngela Anderton Andin
terminates" and improved test suite The bug fix supplied by Filipe David Manana <[email protected]> did not cover all possible ways that a process may be terminated as for instance with supervisor:terminate_child. Also there was a bug in the base case of the patch returning a list of a list instead of only the list. Added a timeout for the test cases, eliminated unnecessary sleeps, improved code.
2011-03-30Merge branch 'hw/call-chmod-without-f' into devHenrik Nord
* hw/call-chmod-without-f: Call chmod without the "-f" flag Conflicts: erts/emulator/test/Makefile lib/asn1/test/Makefile lib/crypto/test/Makefile lib/debugger/test/Makefile lib/docbuilder/test/Makefile lib/edoc/test/Makefile lib/erl_interface/test/Makefile lib/inviso/test/Makefile lib/parsetools/test/Makefile lib/percept/test/Makefile lib/ssl/test/Makefile lib/syntax_tools/test/Makefile lib/test_server/test/Makefile lib/tools/test/Makefile OTP-9170
2011-03-23v3_core: Fix variable incorrectly unbound after binary matchBjörn Gustavsson
In the following code: m(<<Sz:8,_:Sz/binary>>) -> Sz = wrong. the Sz variable is supposed to be bound in the function header and the matching "Sz = wrong" should cause a badarg exception. But what happens is that the Sz variables seems to be unbound and the matching succeds and the m/1 function returns 'wrong'. If the Sz variable is used directly (not matched), it will have the expected value. Thus the following code: m(<<Sz:8,_:Sz/binary>>) -> Sz. will correctly return the value of Sz that was matched out from the binary. Reported-by: Bernard Duggan
2011-03-22Fix a bug concerning record field typesHans Bolinder
The default value 'undefined' was added to records field types in such a way that the result was not always a well-formed type. This bug has been fixed. --- erl_pp has since OTP-8150 formatted types so that 'undefined' was removed from union types assigned to record fields. Since one cannot distinguish between 'undefined' added by the parser or supplied by the user, a side effect was that user supplied 'undefined's were also removed. Now the pretty printer shows 'undefined' even if added by the parser. This is a minor issue.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-10Fix ~F.Fs bug, add testcase and improve documentationRaimo Niskanen
2011-03-02Add ISO week number calculation functions to the calendar module in stdlibImre Horvath
This new feature adds the missing week number function to the calendar module of the stdlib application. The implementation conforms to the ISO 8601 standard. The new feature has been implemented tested and documented.
2011-02-25Fix trivial typos in supervisor_SUITETuncer Ayaz
2011-02-23stdlib tests: Eliminate some compiler warningsBjörn Gustavsson
2011-02-23Merge branch 'ia/supervisor-saves-unnecessary-data/OTP-9064' into devIngela Anderton Andin
* ia/supervisor-saves-unnecessary-data/OTP-9064: Added test case do_not_save_start_parameters_for_temporary_children and fixed dialyzer spec. Do not save parameter list for any temporary processes Do not save initial arguments for dynamic temporary processes Conflicts: lib/stdlib/test/supervisor_SUITE.erl
2011-02-22Added test case do_not_save_start_parameters_for_temporary_children and fixedIngela Anderton Andin
dialyzer spec.
2011-02-22Do not save parameter list for any temporary processesIngela Anderton Andin
Previous commit changed the supervisor to not save parameter lists for temporary processes supervised by simple-one-for-one supervisors. But it is unnecessary to save them for any temporary processes as they should not be restarted. Proably the biggest gain is in the simple-one-for-one case. Also changed the test case count_children_memory so it does not test that which_children will produce garbage that must be reclaimed later. This is a strange thing to test and it is no longer true for all invocations of which_children.
2011-02-18Merge branch 'sverker/ets_halfword_highmem/OTP-8941' into devSverker Eriksson
* sverker/ets_halfword_highmem/OTP-8941: HALFWORD ETS Fix copyright year in some source files Fix vm crash in kernel test case seq_trace_SUITE:call remove NIF compile warning: no previous prototype for ‘nif_init’ Refuse to load NIF library on wrong VM variant (halfword/fullword) HALFWORD ETS match spec heap fragment optimization HALFWORD ETS removed eheap and improved test case t_match_spec_run HALFWORD ETS Further match spec optimization to minimize copying and garbage HALFWORD ETS db_prog_match optimization HALFWORD ETS Fix segv for match spec with several function and guards HALFWORD Make system_info mseg_alloc report both low/high mem HALFWORD Fix segv caused by erlang:halt HALFWORD Make more allocators use high mem (binary, fixed and driver) HALFWORD ETS 32-bit arch fixes and other cleanups HALFWORD ETS nicer update_element HALFWORD ETS Real matching on relative terms HALFWORD first stab at high mem alloc HALFWORD ETS relative terms Conflicts: erts/emulator/test/driver_SUITE.erl
2011-02-17Rename Suite Callback to Common Test HookLukas Larsson
2011-02-17Update so that count_children_memory is skipped on +Meamin emulatorsLukas Larsson
2011-02-17Update and add cover spec files to work with common_testLukas Larsson
2011-02-17Update all test specsLukas Larsson
2011-02-17Fix formatting for stdlibLukas Larsson
2011-02-17Add init_per_suite and end_per_suiteLukas Larsson
2011-02-17Add ts_install_scb to suite/0Lukas Larsson
2011-02-17Update stdlib tests to conform with common_test standardLukas Larsson
2011-02-17Update all fin_per_testcase to end_per_testcase.Lukas Larsson
2011-02-03HALFWORD ETS removed eheap and improved test case t_match_spec_runSverker Eriksson