diff --git a/.gitignore b/.gitignore index 7b65ea45..90d6251c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ _build/* /.eqc-info /current_counterexample.eqc .pulse +rebar.lock diff --git a/.travis.yml b/.travis.yml index dc4a5652..4b70972d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ language: erlang otp_release: - 20.3.8 + - 21.3 + - 22.3 script: - chmod u+x rebar3 - - ./rebar3 do upgrade, compile, dialyzer, xref, eunit -notifications: - slack: - secure: SE0EMU9HenZlLBuNg7l6WLMxJPkfyAEGgodvAqMEuQmICtrh1nV019D/A8ykejYYPPsJafWVOfypOSDrSHCndzXvEZvU8l45nJ6XLdUdrDYEmvcSqN3EqmVSsuf9H3g99bvKygXaY27MkTS5ixLil7PzybG+YpwMnQGcQxYo5Eg= + - ./rebar3 do upgrade, compile, xref, dialyzer, eunit diff --git a/rebar.config b/rebar.config index 045c554f..8212b622 100644 --- a/rebar.config +++ b/rebar.config @@ -1,5 +1,6 @@ {erl_opts, [debug_info, warn_untyped_record, - {platform_define, "^[0-9]+", namespaced_types}]}. + {platform_define, "^[0-9]+", namespaced_types}, + {platform_define, "^[2-9][1-9]\..*", dirty_file_nif}]}. {port_specs, [{"priv/bitcask.so", ["c_src/*.c"]}]}. {port_env, @@ -30,7 +31,7 @@ [ {deps, [meck, - {cuttlefish, {git, "https://github.com/basho/cuttlefish.git", {branch, "rebar3"}}} + {cuttlefish, {git, "https://github.com/basho/cuttlefish.git", {branch, "develop-3.0"}}} ]}, {eunit_opts, [verbose]} ]}, @@ -53,7 +54,7 @@ ]} ]}. -{plugins, [pc, {rebar3_eqc, {git, "https://github.com/Vagabond/rebar3-eqc-plugin", {branch, "master"}}}]}. +{plugins, [pc, {eqc_rebar, {git, "https://github.com/Quviq/eqc-rebar", {branch, "master"}}}]}. {provider_hooks, [ diff --git a/rebar3 b/rebar3 index f0b1ba78..e550663a 100755 Binary files a/rebar3 and b/rebar3 differ diff --git a/src/bitcask.erl b/src/bitcask.erl index 17e52ac5..507f24e1 100644 --- a/src/bitcask.erl +++ b/src/bitcask.erl @@ -3073,6 +3073,11 @@ corrupt_file(Path, Offset, Data) -> % Verify that if the cached efile port goes away, we can recover % and not get stuck opening casks + +-ifdef(dirty_file_nif). +efile_error_test() -> + ok. +-else. efile_error_test() -> Dir = setup_testfolder("bc.efile.error"), B = bitcask:open(Dir, [read_write]), @@ -3089,6 +3094,8 @@ efile_error_test() -> B2 when is_reference(B2) -> ok = bitcask:close(B2) end. +-endif. + %% About leak_t0(): %% diff --git a/src/bitcask_fileops.erl b/src/bitcask_fileops.erl index ce1bd682..659a5f3f 100644 --- a/src/bitcask_fileops.erl +++ b/src/bitcask_fileops.erl @@ -837,6 +837,10 @@ ensure_dir(F) -> end end. +-ifdef(dirty_file_nif). +list_dir(Dir) -> + file:list_dir(Dir). +-else. list_dir(Dir) -> list_dir(Dir, 1). @@ -881,3 +885,4 @@ prim_file_drv_open(Driver, Portopts) -> {error, Reason} end. +-endif.