Skip to content

Commit 3b98d23

Browse files
rfourquetfredrikekre
authored andcommitted
fix a seed for rand in a Lapack test (fix #24155) (#24211)
The seed was originally globally fixed in this file, but then locally scoped as a result of #16940. But it was needed in the "sysv" testset.
1 parent ac736bb commit 3b98d23

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/linalg/lapack.jl

+9-7
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,15 @@ end
425425

426426
@testset "sysv" begin
427427
@testset for elty in (Float32, Float64, Complex64, Complex128)
428-
A = rand(elty,10,10)
429-
A = A + A.' #symmetric!
430-
b = rand(elty,10)
431-
c = A \ b
432-
b,A = LAPACK.sysv!('U',A,b)
433-
@test b c
434-
@test_throws DimensionMismatch LAPACK.sysv!('U',A,rand(elty,11))
428+
guardsrand(123) do
429+
A = rand(elty,10,10)
430+
A = A + A.' #symmetric!
431+
b = rand(elty,10)
432+
c = A \ b
433+
b,A = LAPACK.sysv!('U',A,b)
434+
@test b c
435+
@test_throws DimensionMismatch LAPACK.sysv!('U',A,rand(elty,11))
436+
end
435437
end
436438
end
437439

0 commit comments

Comments
 (0)