Skip to content
Merged
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
16 changes: 13 additions & 3 deletions test/threads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ close(proc.in)
# Not using threads_exec.jl for better isolation, reproducibility, and a
# tighter timeout.
script = "profile_spawnmany_exec.jl"
cmd = `$(Base.julia_cmd()) --depwarn=error --rr-detach --startup-file=no $script`
cmd_base = `$(Base.julia_cmd()) --depwarn=error --rr-detach --startup-file=no $script`
@testset for n in [20000, 200000, 2000000]
proc = run(ignorestatus(setenv(cmd, "NTASKS" => n; dir = @__DIR__)); wait = false)
cmd = ignorestatus(setenv(cmd_base, "NTASKS" => n; dir = @__DIR__))
cmd = pipeline(cmd; stdout = stderr, stderr)
proc = run(cmd; wait = false)
done = Threads.Atomic{Bool}(false)
timeout = false
timer = Timer(100) do _
Expand All @@ -200,7 +202,15 @@ close(proc.in)
done[] = true
close(timer)
end
@test success(proc)
if ( !success(proc) ) || ( timeout )
@error "A \"spawn and wait lots of tasks\" test failed" n proc.exitcode proc.termsignal success(proc) timeout
end
if Sys.iswindows()
# Known failure: https://github.com/JuliaLang/julia/issues/43124
@test_skip success(proc)
else
@test success(proc)
end
@test !timeout
end
end