-
Notifications
You must be signed in to change notification settings - Fork 5k
Refactor SLH-DSA tests #114981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor SLH-DSA tests #114981
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the SLH-DSA tests to simplify the inheritance hierarchy and reduce duplicate test execution. Key changes include reorganizing tests into separate classes (e.g. SlhDsaContractTests, SlhDsaFactoryTests, SlhDsaOpenSslTests), removing redundant or legacy test base classes, and updating test code style with modern collection initialization syntax.
Reviewed Changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/libraries/System.Security.Cryptography/tests/SlhDsaOpenSslTests.cs | Introduces tests for OpenSSL-specific SLH-DSA functionality using modern collection initialization. |
src/libraries/System.Security.Cryptography/tests/SlhDsaOpenSslConstructionTests.Unix.cs | Refactors the construction tests into a static class with static test methods. |
src/libraries/System.Security.Cryptography/tests/SlhDsaOpenSslConstructionTests.NotSupported.cs | Refactors the unsupported platform tests and removes unused inheritance. |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/*.cs | Removes legacy test base classes and reorganizes tests into dedicated files (e.g., SlhDsaContractTests, SlhDsaFactoryTests), while integrating updated API validations and buffer checks. |
Files not reviewed (2)
- src/libraries/Microsoft.Bcl.Cryptography/tests/Microsoft.Bcl.Cryptography.Tests.csproj: Language not supported
- src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj: Language not supported
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
...n/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaAlgorithmTests.cs
Outdated
Show resolved
Hide resolved
...on/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaContractTests.cs
Show resolved
Hide resolved
...on/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaContractTests.cs
Show resolved
Hide resolved
...mon/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs
Outdated
Show resolved
Hide resolved
...mon/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs
Outdated
Show resolved
Hide resolved
...mon/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs
Outdated
Show resolved
Hide resolved
...mon/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs
Outdated
Show resolved
Hide resolved
...on/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaContractTests.cs
Outdated
Show resolved
Hide resolved
.../Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTestData.cs
Outdated
Show resolved
Hide resolved
...mmon/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTestHelpers.cs
Outdated
Show resolved
Hide resolved
...ies/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTests.cs
Outdated
Show resolved
Hide resolved
...ies/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTests.cs
Outdated
Show resolved
Hide resolved
...ies/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Bcl.Cryptography/tests/Microsoft.Bcl.Cryptography.Tests.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found added equivalents of everything that was removed; so just need to get the comments resolved one way or another then good to go.
Old inheritance hierarchy was too complicated and test were running multiple times for no reason. This PR refactors the test to have: