Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  Fix a test case
  Fix a test case
  Fix a test case bug
  Fix a test case bug
  Remove ?line from dets_SUITE.erl
  Adjust dets.erl to cope with an evil test case
  Correct a disk_log testcase
  • Loading branch information
uabboli committed Mar 19, 2013
2 parents 0c71334 + ab15d1c commit e3bd19e
Show file tree
Hide file tree
Showing 7 changed files with 1,996 additions and 1,972 deletions.
3 changes: 1 addition & 2 deletions lib/debugger/test/int_SUITE.erl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
Expand Down Expand Up @@ -273,7 +273,6 @@ interpretable(Config) when is_list(Config) ->
%% {error, {app,App}}
?line {error, {app,_}} = int:interpretable(file),
?line {error, {app,_}} = int:interpretable(lists),
?line {error, {app,_}} = int:interpretable(gs),
?line case int:interpretable(dbg_ieval) of
{error, {app,_}} ->
ok;
Expand Down
4 changes: 2 additions & 2 deletions lib/kernel/test/disk_log_SUITE.erl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
Expand Down Expand Up @@ -3205,7 +3205,7 @@ many_users(Conf) when is_list(Conf) ->
?line true = lists:duplicate(NoClients, {error, {full,"log.LOG"}}) == C2,
?line true = length(T2) > 0,
?line {C3, T3} = many(Fun2, NoClients, N, wrap, internal,
{300*NoClients,20}, Dir),
{300*NoClients,200}, Dir),
?line true = lists:duplicate(NoClients, ok) == C3,
?line true = length(T3) == N*NoClients,
ok.
Expand Down
13 changes: 8 additions & 5 deletions lib/kernel/test/interactive_shell_SUITE.erl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
Expand Down Expand Up @@ -193,7 +193,7 @@ job_control_remote(Config) when is_list(Config) ->
{skip,"No new shell found"};
_ ->
?line RNode = create_nodename(),
?line MyNode = atom_to_list(node()),
?line MyNode = atom2list(node()),
?line Pid = spawn_link(fun() ->
receive die ->
ok
Expand Down Expand Up @@ -254,7 +254,7 @@ job_control_remote_noshell(Config) when is_list(Config) ->
end),
?line PidStr = rpc:call(NSNode,erlang,pid_to_list,[Pid]),
?line true = rpc:call(NSNode,erlang,register,[kalaskula,Pid]),
?line NSNodeStr = atom_to_list(NSNode),
?line NSNodeStr = atom2list(NSNode),
?line CookieString = lists:flatten(
io_lib:format("~w",
[erlang:get_cookie()])),
Expand Down Expand Up @@ -715,7 +715,10 @@ get_default_shell() ->
{putline, "whereis(user_drv)."},
{getline, "undefined"}],[]),
old
catch E:R ->
?dbg({E,R}),
catch _E:_R ->
?dbg({_E,_R}),
new
end.

atom2list(A) ->
lists:flatten(io_lib:format("~w", [A])).
14 changes: 9 additions & 5 deletions lib/stdlib/src/dets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2837,14 +2837,18 @@ fsck_try(Fd, Tab, FH, Fname, SlotNumbers, Version) ->

tempfile(Fname) ->
Tmp = lists:concat([Fname, ".TMP"]),
tempfile(Tmp, 10).

tempfile(Tmp, 0) ->
Tmp;
tempfile(Tmp, N) ->
case file:delete(Tmp) of
{error, eacces} -> % 'dets_process_died' happened anyway... (W-nd-ws)
timer:sleep(5000),
file:delete(Tmp);
timer:sleep(1000),
tempfile(Tmp, N-1);
_ ->
ok
end,
Tmp.
Tmp
end.

%% -> {ok, NewHead} | {try_again, integer()} | Error
fsck_try_est(Head, Fd, Fname, SlotNumbers, FH) ->
Expand Down
Loading

0 comments on commit e3bd19e

Please sign in to comment.