Skip to content

Commit dd96f6d

Browse files
authored
Merge pull request #267 from basho/develop-3.0-292
Develop 3.0 292
2 parents fa9db57 + a0b2748 commit dd96f6d

File tree

6 files changed

+20
-7
lines changed

6 files changed

+20
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ _build/*
1212
/.eqc-info
1313
/current_counterexample.eqc
1414
.pulse
15+
rebar.lock

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
language: erlang
22
otp_release:
33
- 20.3.8
4+
- 21.3
5+
- 22.3
46
script:
57
- chmod u+x rebar3
6-
- ./rebar3 do upgrade, compile, dialyzer, xref, eunit
7-
notifications:
8-
slack:
9-
secure: SE0EMU9HenZlLBuNg7l6WLMxJPkfyAEGgodvAqMEuQmICtrh1nV019D/A8ykejYYPPsJafWVOfypOSDrSHCndzXvEZvU8l45nJ6XLdUdrDYEmvcSqN3EqmVSsuf9H3g99bvKygXaY27MkTS5ixLil7PzybG+YpwMnQGcQxYo5Eg=
8+
- ./rebar3 do upgrade, compile, xref, dialyzer, eunit

rebar.config

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{erl_opts, [debug_info, warn_untyped_record,
2-
{platform_define, "^[0-9]+", namespaced_types}]}.
2+
{platform_define, "^[0-9]+", namespaced_types},
3+
{platform_define, "^[2-9][1-9]\..*", dirty_file_nif}]}.
34
{port_specs, [{"priv/bitcask.so", ["c_src/*.c"]}]}.
45

56
{port_env,
@@ -30,7 +31,7 @@
3031
[
3132
{deps,
3233
[meck,
33-
{cuttlefish, {git, "https://github.com/basho/cuttlefish.git", {branch, "rebar3"}}}
34+
{cuttlefish, {git, "https://github.com/basho/cuttlefish.git", {branch, "develop-3.0"}}}
3435
]},
3536
{eunit_opts, [verbose]}
3637
]},
@@ -53,7 +54,7 @@
5354
]}
5455
]}.
5556

56-
{plugins, [pc, {rebar3_eqc, {git, "https://github.com/Vagabond/rebar3-eqc-plugin", {branch, "master"}}}]}.
57+
{plugins, [pc, {eqc_rebar, {git, "https://github.com/Quviq/eqc-rebar", {branch, "master"}}}]}.
5758

5859
{provider_hooks,
5960
[

rebar3

141 KB
Binary file not shown.

src/bitcask.erl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3073,6 +3073,11 @@ corrupt_file(Path, Offset, Data) ->
30733073

30743074
% Verify that if the cached efile port goes away, we can recover
30753075
% and not get stuck opening casks
3076+
3077+
-ifdef(dirty_file_nif).
3078+
efile_error_test() ->
3079+
ok.
3080+
-else.
30763081
efile_error_test() ->
30773082
Dir = setup_testfolder("bc.efile.error"),
30783083
B = bitcask:open(Dir, [read_write]),
@@ -3089,6 +3094,8 @@ efile_error_test() ->
30893094
B2 when is_reference(B2) ->
30903095
ok = bitcask:close(B2)
30913096
end.
3097+
-endif.
3098+
30923099

30933100
%% About leak_t0():
30943101
%%

src/bitcask_fileops.erl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,10 @@ ensure_dir(F) ->
837837
end
838838
end.
839839

840+
-ifdef(dirty_file_nif).
841+
list_dir(Dir) ->
842+
file:list_dir(Dir).
843+
-else.
840844
list_dir(Dir) ->
841845
list_dir(Dir, 1).
842846

@@ -881,3 +885,4 @@ prim_file_drv_open(Driver, Portopts) ->
881885
{error, Reason}
882886
end.
883887

888+
-endif.

0 commit comments

Comments
 (0)