Skip to content

Commit

Permalink
Print more info when backtrace test fails (#53874)
Browse files Browse the repository at this point in the history
This test fails intermittently on win32. Let's try to print some more
info in that case to see if we can find out anything.
  • Loading branch information
Keno authored Mar 27, 2024
1 parent 7a62dff commit a3616a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/backtrace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,14 @@ let code = """
if ip isa Base.InterpreterIP && ip.code isa Core.MethodInstance]
num_fs = sum(meth_names .== :f29695)
num_gs = sum(meth_names .== :g29695)
print(num_fs, ' ', num_gs)
if num_fs != 1000 || num_gs != 1000
Base.show_backtrace(stderr, bt)
error("Expected 1000 frames each, got \$num_fs, \$num_fs")
end
exit()
"""

@test read(`$(Base.julia_cmd()) --startup-file=no --compile=min -e $code`, String) == "1000 1000"
@test success(pipeline(`$(Base.julia_cmd()) --startup-file=no --compile=min -e $code`; stderr))
end

# Test that modules make it into InterpreterIP for top-level code
Expand Down

0 comments on commit a3616a8

Please sign in to comment.