Skip to content

Implement comprehensive BLAS, ARPACK, and LAPACK test coverage#34

Merged
luhenry merged 1 commit intomasterfrom
moar-testing
Feb 27, 2026
Merged

Implement comprehensive BLAS, ARPACK, and LAPACK test coverage#34
luhenry merged 1 commit intomasterfrom
moar-testing

Conversation

@luhenry
Copy link
Copy Markdown
Owner

@luhenry luhenry commented Feb 14, 2026

No description provided.

@luhenry luhenry force-pushed the moar-testing branch 5 times, most recently from df74492 to 162d64c Compare February 26, 2026 21:59
@luhenry luhenry marked this pull request as ready for review February 26, 2026 22:00
@luhenry luhenry force-pushed the moar-testing branch 5 times, most recently from fc2822b to 86f145c Compare February 27, 2026 09:09
Replace 728 stub tests (assumeTrue(false)) with functional tests across
all three modules, bringing overall test coverage from ~8% to 94%
(797 of 848 test files). BLAS had 67 existing tests (unchanged);
ARPACK gains 58 and LAPACK gains 670 functional tests.

Fix three critical JNI bugs discovered during testing:

1. Missing Fortran hidden string length arguments: Fortran's calling
   convention requires appending implicit `int len_xxx` args for every
   CHARACTER parameter. All three JNI files were omitting these, causing
   lsamen (Fortran string comparison) to receive garbage lengths and
   always return false. This meant any native LAPACK routine that
   branches on character params (UPLO, TRANS, JOBU, etc.) silently
   took wrong code paths. Added 481 length parameters across BLAS (42),
   LAPACK (406), and ARPACK (33).

2. RTLD_GLOBAL -> RTLD_LOCAL: Changed dlopen flags to prevent symbol
   conflicts between different BLAS/LAPACK providers (e.g., OpenBLAS
   vs reference LAPACK).

3. Explicit library handle for dlsym: Changed LOAD_SYMBOL macro from
   dlsym(RTLD_DEFAULT, ...) to dlsym(libhandle, ...) to resolve symbols
   from the specific loaded library rather than the global symbol table,
   which is necessary with RTLD_LOCAL.

Extract shared test utilities into a new test-utils module (not
published to Maven Central) containing TestHelpers with:
- Relative/absolute array comparison with epsilon scaling
- Column-major matrix multiply and transpose
- Generators for symmetric, positive-definite, banded, packed,
  triangular, Hessenberg, and Hilbert matrices in both float/double

Other changes:
- CI: Add --no-transfer-progress to mvn commands, include test-utils
  in test job, improve job naming conventions
- Devcontainer: Add gh CLI and Claude CLI installation
- Add .claude/test-plan.md documenting coverage status and known issues
- 51 LAPACK stubs remain due to version differences (f2j uses LAPACK
  3.1, native uses 3.12), callback NPEs, or sign/pivot ambiguity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@luhenry luhenry merged commit 1c884ae into master Feb 27, 2026
20 checks passed
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