Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29493: Failing tests when using system glpk
At the moment there are two failing doctests, when using the glpk from the system, e.g. on ubuntu eoan [https://github.com/mkoeppe/sage/runs/542655821] {{{ sage -t src/sage/numerical/backends/glpk_backend.pyx ********************************************************************** File "src/sage/numerical/backends/glpk_backend.pyx", line 2287, in sage.numerical.backends.glpk_backend.GLPKBackend.print_ranges Failed example: p.print_ranges() Expected: glp_print_ranges: optimal basic solution required 1 Got: 1 }}} This doctest was mentioned before in #29317 with a suggestion for a fix. {{{ sage -t src/sage/libs/glpk/error.pyx ********************************************************************** File "src/sage/libs/glpk/error.pyx", line 100, in sage.libs.glpk.error.setup_glpk_error_handler Failed example: res = p.solve() Expected: 0: obj = ... Got: <BLANKLINE> }}} The problem is that we have doctests that rely on error-recovery behavior added by a custom patch [https://trac.sagemath.org/ticket/20710#comment:18], which wasn't accepted by upstream. (The doctest for the patch was added in #20832.) The present ticket fixes the failures by * adding explicit input validation in several functions in the Cython wrappers so that the GLPK error handler is not reached; * changing the default optimization mode from `glp_intopt` to `glp_simplex_then_intopt`, which is more robust; * disabling the test for the error-recovery behavior, which provokes a crash with unpatched GLPK. URL: https://trac.sagemath.org/29493 Reported by: gh-kliem Ticket author(s): Michael Orlitzky, Matthias Koeppe Reviewer(s): Matthias Koeppe, Michael Orlitzky
- Loading branch information