Fix failing BerConverterTests.Decode_TestData test#99793
Merged
steveharter merged 3 commits intodotnet:mainfrom Mar 18, 2024
Merged
Fix failing BerConverterTests.Decode_TestData test#99793steveharter merged 3 commits intodotnet:mainfrom
steveharter merged 3 commits intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-directoryservices, @jay98014 |
Member
|
This will also need to re-enable the test. |
…haviour between Windows 7 and later versions. This is intended to fix the Decode_Bytes_ReturnsExpected test.
Results are inconsistent: Windows 7 maintained its previous behaviour, but Windows 8.1 and Nano Server behaved differently, failing with the same inputs. It seems like we're hitting undefined behaviour in Windows' underlying ber_scanf, when processing two consecutive zero-length octet strings with the "v" and "V" specifiers. This isn't the point of the test though - changed the test inputs to supply well-formed BER data so that we can move on to actually testing the format specifier.
Contributor
Author
|
Thanks. My changes predate the test disablement by a few minutes, so didn't have it. I've rebased my branch, and once my local test run and CI have both run and passed the tests, I'll pull the PR out of draft. |
Contributor
Author
|
The test passed on local test run and CI - the PR's build failure is due to a regex test crashing. I've opened the PR up for review/merge. cc @vcsjones |
steveharter
approved these changes
Mar 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #99725 and allows the Decode_TestData test to run under CI again. Also replaces #99773.
There's different behaviour between Windows 7 and later versions - the
Vandvformat specifiers inber_scanfreturn a two-element array for the test data in Windows 7, and a three-element array in later versions. I've adjusted the test to account for times when it runs on Windows 7.I'll leave the PR on draft so that the build can run and confirm the test's now working properly in both scenarios prior to merge.