aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/dets_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2011-10-10 15:44:34 +0200
committerHans Bolinder <[email protected]>2011-10-10 15:44:34 +0200
commit30c169c79a4602d6f63cc0d6f5ba171cca8c1863 (patch)
treeef0ee464edf4d005de577ced2cad1ead5272e35a /lib/stdlib/test/dets_SUITE.erl
parenta5abe96590ec22779f796fc67e5afbbf99a3a922 (diff)
downloadotp-30c169c79a4602d6f63cc0d6f5ba171cca8c1863.tar.gz
otp-30c169c79a4602d6f63cc0d6f5ba171cca8c1863.tar.bz2
otp-30c169c79a4602d6f63cc0d6f5ba171cca8c1863.zip
Fix a minor bug in Dets
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.
Diffstat (limited to 'lib/stdlib/test/dets_SUITE.erl')
-rw-r--r--lib/stdlib/test/dets_SUITE.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/stdlib/test/dets_SUITE.erl b/lib/stdlib/test/dets_SUITE.erl
index b569ed9003..b68d83b12d 100644
--- a/lib/stdlib/test/dets_SUITE.erl
+++ b/lib/stdlib/test/dets_SUITE.erl
@@ -1568,8 +1568,10 @@ repair(Config, V) ->
?line FileSize = dets:info(TabRef, memory),
?line ok = dets:close(TabRef),
crash(Fname, FileSize+20),
- ?line {error, {bad_freelists, Fname}} =
+ %% Used to return bad_freelists, but that changed in OTP-9622
+ ?line {ok, TabRef} =
dets:open_file(TabRef, [{file,Fname},{version,V}]),
+ ?line ok = dets:close(TabRef),
?line file:delete(Fname),
%% File not closed, opening with read and read_write access tried.