Skip to content

Commit

Permalink
Add a test for jl_get_num_stack_mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Sep 20, 2023
1 parent 3a88b66 commit ab68148
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/threads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,10 @@ end
@testset "rand_ptls underflow" begin
@test Base.Partr.cong(UInt32(0)) == 0
end

@testset "num_stack_mappings metric" begin
@test @ccall(jl_get_num_stack_mappings()::Cint) >= 1
# There must be at least two: one for the root test task and one for the async task:
@test fetch(@async(@ccall(jl_get_num_stack_mappings()::Cint))) >= 2
end

0 comments on commit ab68148

Please sign in to comment.