Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print more info when backtrace test fails #53874

Merged
merged 1 commit into from
Mar 27, 2024
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
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