aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/dets_SUITE.erl
AgeCommit message (Collapse)Author
2017-02-06Use magic refs for compiled match specsRickard Green
2016-11-30stdlib: Remove support for Dets version 8 tablesHans Bolinder
When at it, types have been added to record fields.
2016-03-09Eliminate use of ?config() macroBjörn Gustavsson
2016-03-09Replace "%" with "%%" at the beginning of a lineBjörn Gustavsson
We want to re-ident the source files after having taken out all ?line macros. When re-indenting using Emacs, it's important that comments that should be at the beginning of a line (or follow the indentation of statements around it) must start with "%%".
2016-03-09Eliminate 'suite' and 'doc' clausesBjörn Gustavsson
2016-03-09Eliminate use of test_server:fail/0,1Björn Gustavsson
2016-03-09Modernize use of timetrapsBjörn Gustavsson
Either rely on the default 30 minutes timetrap, or set the timeout using the supported methods in common_test.
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2016-02-02Merge branch 'maint'Rickard Green
* maint: Introduce time management in native APIs Introduce time warp safe replacement for safe_fixed option Introduce time warp safe trace timestamp formats Conflicts: erts/emulator/beam/erl_bif_trace.c erts/emulator/beam/erl_driver.h erts/emulator/beam/erl_nif.h erts/emulator/beam/erl_trace.c erts/preloaded/ebin/erlang.beam
2016-01-26Fix a race bug affecting dets_SUITE:open_file/2Hans Bolinder
The Dets server pretends the file is open before internal_open() has been called, which means that unless the internal_open message is applied first, other processes can find the pid by calling dets_server:get_pid() and do things before Head has been initialized properly.
2016-01-20Introduce time warp safe replacement for safe_fixed optionRickard Green
The new time warp safe option is safe_fixed_monotonic_time which gives erlang:monotonic_time(). The safe_fixed option was also slightly changed. It now gives erlang:timestamp() instead of erlang:now(). This has however not been documented, so it is considered a compatible change. The above effects both ets, and dets. This commit also include the bugfix OTP-13239 for dets:info(Tab, safe_fixed). The timestamp in the result returned by dets:info(Tab, safe_fixed) was unintentionally broken as a result of the time API rewrites in OTP 18.0.
2016-01-13stdlib: Let dets:open_file() crash when given raw file nameHans Bolinder
See also ERL-55.
2015-06-18Change license text to APLv2Bruce Yinhe
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-06-30stdlib: Correct documentation of dets:insert/2Hans Bolinder
Thanks to Alexei Sholik for reporting the bug.
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-05stdlib: Fix a Dets bug where files were deletedHans Bolinder
Instead of deleting the small file when opening it with dets:open_file/2 an error message is returned, mimicking the behaviour when the file is bigger. open_file/1 has been modified to return the same error message when the file is small as when the file is bigger. Thanks to Hakan Mattson for reporting this bug.
2014-03-05stdlib: Fix a Dets bug with leaking file descriptorsHans Bolinder
Thanks to Hakan Mattson for reporting this bug.
2013-08-19Fix a Dets bug concerning traversal of tablesHans Bolinder
The bug was introduced in R16B. Thanks to Manuel Durán Aguete.
2013-03-27stdlib: Remove obsolete testcase dets_SUITE:otp_9607Sverker Eriksson
2013-03-18Remove ?line from dets_SUITE.erlHans Bolinder
2013-03-18Adjust dets.erl to cope with an evil test caseHans Bolinder
The test case deletes a Dets process while it is repairing a file. Another client waiting for the Dets process to reply then kicks in and repairs the file. Apparently the temporary file was still open, resulting in an eacces error on Windows.
2012-08-21Optimize traversal of Dets tables with bound keyHans Bolinder
Dets tables are no longer fixed while traversing with a bound key (when only the objects with the right key are matched). This optimization affects the functions match/2, match_object/2, select/2, match_delete/2, and select_delete/2.
2012-07-19stdlib: Remove VxWorksBjörn-Egil Dahlberg
2011-10-21Fix a few tests that used to fail on the HiPE platformHans Bolinder
2011-10-17Fix a bug in Dets concerning repair of almost full tablesHans Bolinder
A Dets table with sufficiently large buckets could not always be repaired. (Reported by Gordon Guthrie.) The format of Dets files has been modified. When downgrading tables created with the new system will be repaired. Otherwise the modification should not be noticeable.
2011-10-10Fix a minor bug in DetsHans Bolinder
If a Dets table had been properly closed but the space management data could not been read, it was not possible to repair the file.
2011-09-02Merge branch 'dev' into majorHans Bolinder
* dev: Fix a couple of minor bugs with hook priority Update to reflect addition of CTH priority addition Update CTH priority default to be 0 Update to reflect new cth callback api Update the return from init/2 to be {ok, NewState} or {ok,NewState,Priority} instead of NewState. Add priority functionality and tests for ct hooks Update internal hooks state to use a record instead of tuples Improve and correct types and specifications in Kernel and STDLIB
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-16emulator: Add a fourth element in exception stacktracesBjörn Gustavsson
This commit is a preparation for introducing location information (filename/line number) in stacktraces in exceptions. Currently a stack trace looks like: [{Mod1,Function1,Arity1}, . . . {ModN,FunctionN,ArityN}] Add a forth element to each tuple that can be used indication the filename and line number of the source file: [{Mod1,Function1,Arity1,Location1}, . . . {ModN,FunctionN,ArityN,LocationN}] In this commit, the fourth element will just be an empty list, and we will change all code that look at or manipulate stacktraces.
2011-05-11Allow Dets tablenames to be arbitrary termsHans Bolinder
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-02-17Rename Suite Callback to Common Test HookLukas 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
2010-11-04Fix badly formed Dets file after initializationHans Bolinder
If a Dets table with fewer slots than keys was opened and then closed after just a lookup, the contents were no longer well-formed. This bug has been fixed. (Thanks to Matthew Evans.)
2010-10-21Merge branch 'hb/stdlib/dets_chunk_match/OTP-8903' into devHans Bolinder
* hb/stdlib/dets_chunk_match/OTP-8903: Fix a bug concerning bchunk(), match() and select() Conflicts: lib/stdlib/test/dets_SUITE.erl
2010-10-21Fix a bug concerning bchunk(), match() and select()Hans Bolinder
If a Dets table was closed after calling bchunk/2, match/1,3, match_object/1,3, or select/1,3 and then opened again, a subsequent call using the returned continuation would normally return a reply. This bug has fixed; now the call fails with reason 'badarg'.
2010-10-21Merge branch 'hb/stdlib/dets_stream_op/OTP-8899' into devHans Bolinder
* hb/stdlib/dets_stream_op/OTP-8899: Fix a bug that could cause 'bad_object' errors Conflicts: lib/stdlib/test/dets_SUITE.erl
2010-10-21Fix a bug that could cause 'bad_object' errorsHans Bolinder
When several clients accessed a Dets table simultaneously, modifications of the Dets server's internal state were sometimes thrown away. The symptoms are diverse: error with reason 'bad_object'; inserted objects not returned by lookup(); et cetera.
2010-10-21Merge branch 'hb/stdlib/dets_fixed_dirty/OTP-8898' into devHans Bolinder
* hb/stdlib/dets_fixed_dirty/OTP-8898: Fix a bug concerning truncated Dets files Conflicts: lib/stdlib/src/dets.erl lib/stdlib/test/dets_SUITE.erl
2010-10-21Fix a bug concerning truncated Dets filesHans Bolinder
When several clients accessed a Dets table simultaneously, inserted or updated objects were sometimes lost due to the Dets file being truncated.
2010-10-21Fix a bug in dets:insert_new()Hans Bolinder
When several clients accessed a Dets table simultaneously, one of them calling dets:insert_new/2, the Dets server could crash. Alternatively, under the same conditions, 'ok' was sometimes returned instead of 'true'.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP