Skip to content

Commit fc577d0

Browse files
authored
Execute backtrace once before testing formatting (#38886)
On some platforms (PowerPC) the call to the `jlplt` is not a tail-call and so it will be part of the backtrace. This means we are off-by-one and won't skip the Julia function `backtrace` messing up tests that check precise formatting.
1 parent b5dd8a1 commit fc577d0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

stdlib/Logging/test/runtests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ end
193193
└ SUFFIX
194194
"""
195195

196+
# Execute backtrace once before checking formatting, see #3885
197+
backtrace()
198+
196199
# Attaching backtraces
197200
bt = func1()
198201
@test startswith(genmsg("msg", exception=(DivideError(),bt)),

test/errorshow.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,8 @@ catch ex
634634
end
635635
pop!(Base.Experimental._hint_handlers[DomainError]) # order is undefined, don't copy this
636636

637+
# Execute backtrace once before checking formatting, see #38858
638+
backtrace()
637639

638640
# issue #28442
639641
@testset "Long stacktrace printing" begin

0 commit comments

Comments
 (0)