Revision 5b5715a2ff77729570757768063836369cff220e authored by DilumAluthgeBot on 21 April 2022, 22:45:07 UTC, committed by GitHub on 21 April 2022, 22:45:07 UTC
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
1 parent 4dfef57
stress_fd_exec.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license
using Test
let ps = Pipe[]
ulimit_n = tryparse(Int, readchomp(`sh -c 'ulimit -n'`))
try
for i = 1:100*something(ulimit_n, 1000)
p = Pipe()
Base.link_pipe!(p)
push!(ps, p)
end
if ulimit_n === nothing
@warn "`ulimit -n` is set to unlimited, fd exhaustion cannot be tested"
@test_broken false
else
@test false
end
catch ex
isa(ex, Base.IOError) || rethrow()
@test ex.code in (Base.UV_EMFILE, Base.UV_ENFILE)
finally
foreach(close, ps)
end
end
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...