Repository navigation
Commit 669e608
authored
test(helpers): narrow EGL device probe catch to MissingFunctionException (#3020)
select_headless_egl_device_for_cuda caught `except Exception: return None`,
which violates the "Capability probes must not swallow real bugs" rule in
cuda_core/tests/AGENTS.md. A real failure (ctypes drift, a pyglet internal
rename, a transient EGL error) was swallowed and turned into None, which
makes the caller fall back to EGL device 0 -- the broken path on the
multi-GPU systems #2865 fixes -- so the test re-failed with the original
CUDA_ERROR_INVALID_DEVICE and no sign the fix ran.
The only genuine "extension not available" signal is
pyglet.gl.lib.MissingFunctionException: link_EGL returns a stub for an
unresolvable entry point, and the stub raises it when called. Narrow the
catch to that type and let everything else propagate. EGL_FALSE returns
are already handled as "no match", and the caller already skips when
libEGL is absent, so no ImportError handling is needed.
Follow-up to #2865. Refs #2864.1 parent 608a37d commit 669e608
1 file changed
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
42 | 55 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | | - | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
0 commit comments