-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix failing BerConverterTests.Decode_TestData test #99793
Conversation
Tagging subscribers to this area: @dotnet/area-system-directoryservices, @jay98014 |
This will also need to re-enable the test. runtime/src/libraries/System.DirectoryServices.Protocols/tests/BerConverterTests.cs Line 194 in 516f5c4
|
…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.
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. |
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 |
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
V
andv
format specifiers inber_scanf
return 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.