Skip to content

Commit a3616a8

Browse files
authored
Print more info when backtrace test fails (#53874)
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.
1 parent 7a62dff commit a3616a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/backtrace.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,14 @@ let code = """
262262
if ip isa Base.InterpreterIP && ip.code isa Core.MethodInstance]
263263
num_fs = sum(meth_names .== :f29695)
264264
num_gs = sum(meth_names .== :g29695)
265-
print(num_fs, ' ', num_gs)
265+
if num_fs != 1000 || num_gs != 1000
266+
Base.show_backtrace(stderr, bt)
267+
error("Expected 1000 frames each, got \$num_fs, \$num_fs")
268+
end
269+
exit()
266270
"""
267271

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

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

0 commit comments

Comments
 (0)