https://github.com/JuliaLang/julia
Raw File
Tip revision: cd0cc7509f1153bfe75cce1959b0b3af85857814 authored by Valentin Churavy on 07 May 2020, 17:28:30 UTC
[LLVM] replace getCalledValue with getCalledOperand
Tip revision: cd0cc75
stress_fd_exec.jl
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
back to top