Skip to content

Commit

Permalink
Merge pull request #19377 from JuliaLang/sf/not_quite_so_resilient
Browse files Browse the repository at this point in the history
Integrate test segfaults with the Testset scaffolding
  • Loading branch information
kshyatt authored Nov 24, 2016
2 parents 55000fd + fe2f271 commit 03c2464
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ cd(dirname(@__FILE__)) do
and Brokens from the worker and the full information about all errors and
failures encountered running the tests. This information will be displayed
as a summary at the end of the test run.
If a test failed, returning an `Exception` that is not a `RemoteException`,
it is likely the julia process running the test has encountered some kind
of internal error, such as a segfault. The entire testset is marked as
Errored, and execution continues until the summary at the end of the test
run, where the test file is printed out as the "failed expression".
=#
o_ts = Base.Test.DefaultTestSet("Overall")
Base.Test.push_testset(o_ts)
Expand Down Expand Up @@ -141,6 +147,16 @@ cd(dirname(@__FILE__)) do
Base.Test.record(o_ts, fake)
Base.Test.pop_testset()
end
elseif isa(res[2][1], Exception)
# If this test raised an exception that is not a RemoteException, that means
# the test runner itself had some problem, so we may have hit a segfault
# or something similar. Record this testset as Errored.
o_ts.anynonpass = true
fake = Base.Test.DefaultTestSet(res[1])
Base.Test.record(fake, Base.Test.Error(:test_error, res[1], res[2][1], []))
Base.Test.push_testset(fake)
Base.Test.record(o_ts, fake)
Base.Test.pop_testset()
end
end
println()
Expand Down
1 change: 1 addition & 0 deletions test/util/segfault.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unsafe_load(convert(Ptr{UInt8},C_NULL))
1 change: 1 addition & 0 deletions test/util/throw_error_exception.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
error("This purposefully dies")

4 comments on commit 03c2464

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - no performance regressions were detected. A full report can be found here. cc @jrevels

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

Please sign in to comment.