Fix flaky tests: add iteration guards, yield in busy-waits, cap thread count

libeigen/eigen!2208

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
Rasmus Munk Larsen
2026-02-24 18:29:07 -08:00
parent 28d090a49c
commit 34092d2788
10 changed files with 92 additions and 61 deletions

View File

@@ -177,8 +177,8 @@ void svd_min_norm(const MatrixType& m) {
int guard = 0;
do {
m2.setRandom();
} while (SVD_FOR_MIN_NORM(MatrixType2)(m2).setThreshold(test_precision<Scalar>()).rank() != rank && (++guard) < 10);
VERIFY(guard < 10);
} while (SVD_FOR_MIN_NORM(MatrixType2)(m2).setThreshold(test_precision<Scalar>()).rank() != rank && (++guard) < 100);
VERIFY(guard < 100);
RhsType2 rhs2 = RhsType2::Random(rank);
// use QR to find a reference minimal norm solution