Skip to content

test libuv with posix delete on windows #53394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,9 @@ Stacktrace:
```
"""
function rm(path::AbstractString; force::Bool=false, recursive::Bool=false)
@info "rm $path"
if islink(path) || !isdir(path)
try
@static if Sys.iswindows()
# is writable on windows actually means "is deletable"
st = lstat(path)
if ispath(st) && (filemode(st) & 0o222) == 0
chmod(path, 0o777)
end
end
unlink(path)
catch err
if force && isa(err, IOError) && err.code==Base.UV_ENOENT
Expand All @@ -289,13 +283,16 @@ function rm(path::AbstractString; force::Bool=false, recursive::Bool=false)
end
else
if recursive
try
for p in readdir(path)
rm(joinpath(path, p), force=force, recursive=true)
end
catch err
if !(isa(err, IOError) && err.code==Base.UV_EACCES)
rethrow(err)
for p in readdir(path)
fp = joinpath(path, p)
try
rm(fp, force=force, recursive=true)
catch err
if !(isa(err, IOError) && err.code==Base.UV_EACCES)
rethrow()
else
@warn "Cannot delete due to UV_EACCES: $fp" stat(fp)
end
end
end
end
Expand Down Expand Up @@ -1028,6 +1025,7 @@ function walkdir(root; topdown=true, follow_symlinks=false, onerror=throw)
end

function unlink(p::AbstractString)
@info "unlink $p"
err = ccall(:jl_fs_unlink, Int32, (Cstring,), p)
err < 0 && uv_error("unlink($(repr(p)))", err)
nothing
Expand Down
36 changes: 2 additions & 34 deletions deps/checksums/libuv
Original file line number Diff line number Diff line change
@@ -1,34 +1,2 @@
LibUV.v2.0.1+15.aarch64-apple-darwin.tar.gz/md5/f12ee08b8d5721bd88b651ac573c59ed
LibUV.v2.0.1+15.aarch64-apple-darwin.tar.gz/sha512/b3c53e04624d9c60e664db2eaaf3add696f95c52e55db0c577547f7bf7e045ce30cffa0e38c3451f483dcdb7ddcac1b7f43b694dfadb37282773ce416af1030a
LibUV.v2.0.1+15.aarch64-linux-gnu.tar.gz/md5/8cb9f4d6c6a4013fa9ed9ae120058275
LibUV.v2.0.1+15.aarch64-linux-gnu.tar.gz/sha512/d4213ee47ebdcab4cc4719478608ffa461a5543a16656c2881587364c8ed1b39a2f418d5c3c6a04d7e6dd3df349f0afa72cd1df0e06db6146512356b37637024
LibUV.v2.0.1+15.aarch64-linux-musl.tar.gz/md5/e23a0d7162fc3f09f0ea92d24cba3f4d
LibUV.v2.0.1+15.aarch64-linux-musl.tar.gz/sha512/f4a13eee72575092ab673777a53d43ce999a7a8bf847daa0a86b39bbfd3f6c1575f105a0bb629766268921ff94f10d354a0e53d32623f6ad35fca44e7bac25f8
LibUV.v2.0.1+15.armv6l-linux-gnueabihf.tar.gz/md5/70ed0616cd3737a357b7571ab648d239
LibUV.v2.0.1+15.armv6l-linux-gnueabihf.tar.gz/sha512/25a4b8a90b7bb62e31c1c2bb1d7e137050de26f311daa9f77be932ab3d9a2b92c82ce82ed37cc74a2b1cd5a60bd0dc412e92d31013d36ad35af2d4f376fbc0b0
LibUV.v2.0.1+15.armv6l-linux-musleabihf.tar.gz/md5/e4320c51c8904a59c105f7b63d086c79
LibUV.v2.0.1+15.armv6l-linux-musleabihf.tar.gz/sha512/bbc39d800277a66298c56849c1131a6f1958a2c8b2465b59527965a1bd3f36a4c87c1d7ad4be59ec0f4ca8f94ec1804a619eb963d956b77e645e0e00effc6613
LibUV.v2.0.1+15.armv7l-linux-gnueabihf.tar.gz/md5/d5436552dc177fc3fd0cf4f575cc03b4
LibUV.v2.0.1+15.armv7l-linux-gnueabihf.tar.gz/sha512/8d3722290151ecf65f4e3fe3440828492a7b115810b87c8711c5592f4dea69727e516228a5a1bdac430c74b288f12de390daf0a9408274aa27cdd69efc81cfee
LibUV.v2.0.1+15.armv7l-linux-musleabihf.tar.gz/md5/67e1ba03ddf2d2bdd79fef25a5976350
LibUV.v2.0.1+15.armv7l-linux-musleabihf.tar.gz/sha512/535565657b5714da0db5c622b65b261a77f21f407b1166eee99f35ba3bb9c6fab4c7d1f3db70528767cef7c66c856c5101b01423be05efb9219ec4c76df0be6a
LibUV.v2.0.1+15.i686-linux-gnu.tar.gz/md5/ba1432ecd75e6a43ff197d51ba76446c
LibUV.v2.0.1+15.i686-linux-gnu.tar.gz/sha512/dc8940284d4ba05098037fcf4b3bada199878794ef34ad09d8992ef58e4c829b00a3fcca29c4f65b49edcab4274092232ff5d7619b3535333125043f89503cfc
LibUV.v2.0.1+15.i686-linux-musl.tar.gz/md5/237080cf5d1286a3d2f35d134a285d28
LibUV.v2.0.1+15.i686-linux-musl.tar.gz/sha512/834f16a16cf6b765dfd094037c8a45ccdedc2eb9e45f527c6721eb0f60f4e56dc4f9b90a2a35e3ed10da4a937d8555e97034e0a29d733cac5352061ebe286799
LibUV.v2.0.1+15.i686-w64-mingw32.tar.gz/md5/8a5261a6ce4200d272b5eda4fe9ecb31
LibUV.v2.0.1+15.i686-w64-mingw32.tar.gz/sha512/b372b9368a9ac92775a8d6ee39b492905dc5f58f16d7edf792e0c2ffbd4507ede79139a24fe852dfa26068d0f076a4abf3c3b868a8a057b23fdbad80999d315f
LibUV.v2.0.1+15.powerpc64le-linux-gnu.tar.gz/md5/53db7b763af204477ce8f0bfae0ce15c
LibUV.v2.0.1+15.powerpc64le-linux-gnu.tar.gz/sha512/bbfe2518d4dc84fe73b7d3f3bcaf5aeef0db0d284c0e205e3e3670b8ce6f3ea593a0e52d125fd9a79cd098dba0d35f151cb46469fa25dfeef62ebcc966f94d4f
LibUV.v2.0.1+15.x86_64-apple-darwin.tar.gz/md5/b4699192c098564edc5589e90c47324e
LibUV.v2.0.1+15.x86_64-apple-darwin.tar.gz/sha512/2505e4060712143d3213747d4276c0b99dec78579d2ab0b71c5d7edf15ae80e0178138a11470c976d97de14e44b153dcb00c08c864523d7ee0ead8e48cf15d14
LibUV.v2.0.1+15.x86_64-linux-gnu.tar.gz/md5/f5515c50106a0748b9a1986c912a00f3
LibUV.v2.0.1+15.x86_64-linux-gnu.tar.gz/sha512/5822396039e14a5d919f2612559a8d62a925c4319e66eb05ed20faed754318762f5653851684701cd4ddb1edf10bfe25d252c3d9cd84228e498e825ba61146b1
LibUV.v2.0.1+15.x86_64-linux-musl.tar.gz/md5/1962e6f21080e874d2ca0275c5b569b2
LibUV.v2.0.1+15.x86_64-linux-musl.tar.gz/sha512/4702e13633d77a6c0aeb1e7cd252471a779177e20c68485130f420cc4878c8f7de7f0f51730008ba9dc0f275875a5947629d39aff200691e26f31d42e388d53d
LibUV.v2.0.1+15.x86_64-unknown-freebsd.tar.gz/md5/928a789c3cd3b4cefcc1cf13f5f179ac
LibUV.v2.0.1+15.x86_64-unknown-freebsd.tar.gz/sha512/ee58667b19fdf7ec0218b4645b3f5bed2e9fc01cc29eab8473ee02aaa044f94a48eb220c6427200aaf56eacf52d0f72156712d17017cfecbc25d3c1b71a4bd2f
LibUV.v2.0.1+15.x86_64-w64-mingw32.tar.gz/md5/d3b84729ee9d5a6e6a1e29357e25cced
LibUV.v2.0.1+15.x86_64-w64-mingw32.tar.gz/sha512/43ca5999d8e8ff820722b1a548bd4e277e95c739c3363ed6159d080dd06842316f5370e8e4f4a886bf76010f4aed2bbf01f6091845b0e84b75f709277c561649
libuv-afa1c67fa496eb49ade1e520f76fd018a1409eaa.tar.gz/md5/3863ccd5a51f85cf76679070c99be6cd
libuv-afa1c67fa496eb49ade1e520f76fd018a1409eaa.tar.gz/sha512/bf4c705e05e730139b62de799331653eea2767898d654b8890ca2623db3adb9a1efcfcfab38af22e8ac44c67a9c5c018f1f7847a3703bee5f05657169a67d817
libuv-afced9f5206b6de0002201cee9012028ea468d2f.tar.gz/md5/0ea602aaca3a5a88b3991a52bbea8521
libuv-afced9f5206b6de0002201cee9012028ea468d2f.tar.gz/sha512/5147597b8cee7066c098f74010a36dc57757e60aa742134cf2313042f020ac9e3395c2d799d4ccc3623728d1685402a774b1c1a25041ad4580c01c32a0f49a21
1 change: 1 addition & 0 deletions deps/libuv.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## LIBUV ##
override USE_BINARYBUILDER_LIBUV=0
ifneq ($(USE_BINARYBUILDER_LIBUV),1)
LIBUV_GIT_URL:=https://github.com/JuliaLang/libuv.git
LIBUV_TAR_URL=https://api.github.com/repos/JuliaLang/libuv/tarball/$1
Expand Down
4 changes: 2 additions & 2 deletions deps/libuv.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ LIBUV_JLL_NAME := LibUV

## source build
LIBUV_VER := 2
LIBUV_BRANCH=julia-uv2-1.48.0
LIBUV_SHA1=afa1c67fa496eb49ade1e520f76fd018a1409eaa
LIBUV_BRANCH=ib/posix_rm_test
LIBUV_SHA1=afced9f5206b6de0002201cee9012028ea468d2f
2 changes: 1 addition & 1 deletion test/compiler/contextual.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ finally
try
rm(depot_path, force=true, recursive=true)
catch err
@show err
@warn "contextual tests failed to tidy up" err
end
end

Expand Down
4 changes: 2 additions & 2 deletions test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ for depot in depots
try
rm(depot, force=true, recursive=true)
catch err
@show err
@warn "Error while cleaning up after tests" err
end
end

Expand Down Expand Up @@ -1147,7 +1147,7 @@ end
try
rm(depot_path, force=true, recursive=true)
catch err
@show err
@warn "Extensions testset failed to tidy up" err
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions test/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ function precompile_test_harness(@nospecialize(f), separate::Bool)
try
rm(load_path, force=true, recursive=true)
catch err
@show err
@warn "precompile_test_harness failed to tidy up" err
end
if separate
try
rm(load_cache_path, force=true, recursive=true)
catch err
@show err
@warn "precompile_test_harness failed to tidy up" err
end
end
filter!((≠)(load_path), LOAD_PATH)
Expand Down Expand Up @@ -1415,7 +1415,7 @@ end
try
rm(temp_path, recursive=true)
catch err
@show err
@warn "precompile test failed to tidy up" err
end
pop!(test_workers) # remove myid
rmprocs(test_workers)
Expand Down