Skip to content

Tests: no PETSc traceback from the callbacks that fail on purpose - #299

Merged
filoferra merged 1 commit into
JuliaParallel:mainfrom
filoferra:quiet-test-errors
Sep 28, 2026
Merged

filoferra merged 1 commit into
JuliaParallel:mainfrom
filoferra:quiet-test-errors

Conversation

@filoferra

Copy link
Copy Markdown
Collaborator

Four tests make a callback throw, or return a nonzero code, on purpose. They check that ksp \ b and solve! rethrow the exception, and that a raw LibPETSc call fails with a PetscError. PETSc printed a full traceback for each one, and CI does that once per scalar type, so a passing run showed 16 PETSC ERROR blocks that looked like failures.

without_petsc_traceback(f, petsclib) in test/testutils.jl pushes PetscReturnErrorHandler around those calls, then pops it. The calls fail exactly as before; only the printout goes. runtests.jl now includes testutils.jl once at the top, and the two test files include it themselves when run on their own.

It's just a bit more tidy

without_petsc_traceback pushes PETSc's return-only error handler around the four solves in pc.jl and snes.jl that check how a failing callback surfaces. The CI log printed a traceback for each of them, once per scalar type.
@filoferra
filoferra merged commit 5dd6c6a into JuliaParallel:main Sep 28, 2026
5 checks passed
@filoferra
filoferra deleted the quiet-test-errors branch September 28, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant