Skip to content

Commit

Permalink
fix fd_in_limits test on Windows (#52779)
Browse files Browse the repository at this point in the history
Closes #52506
Note that this test dates back to #26341
  • Loading branch information
stevengj committed Jan 30, 2024
1 parent 2f845bb commit 8cb5854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/FileWatching/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ for i in 1:n
uv_error("pipe", ccall(:uv_pipe, Cint, (Ptr{NTuple{2, Base.OS_HANDLE}}, Cint, Cint), Ref(pipe_fds, i), 0, 0))
end
Ctype = Sys.iswindows() ? Ptr{Cvoid} : Cint
FDmax = Sys.iswindows() ? 0x7fff : (n + 60 + (isdefined(Main, :Revise) * 30)) # expectations on reasonable values
FDmax = Sys.iswindows() ? typemax(Int32) : (n + 60 + (isdefined(Main, :Revise) * 30)) # expectations on reasonable values
fd_in_limits =
0 <= Int(Base.cconvert(Ctype, pipe_fds[i][1])) <= FDmax &&
0 <= Int(Base.cconvert(Ctype, pipe_fds[i][2])) <= FDmax
Expand Down

0 comments on commit 8cb5854

Please sign in to comment.