Skip to content
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

LdapSessionOptions.ReferralChasing property setter doesn't work on all Linux platforms #112146

Open
steveharter opened this issue Feb 4, 2025 · 1 comment
Labels
area-System.DirectoryServices help wanted [up-for-grabs] Good issue for external contributors test-bug Problem in test source code (most likely)
Milestone

Comments

@steveharter
Copy link
Member

These tests were recently re-enabled for Linux (all tests were disabled) and a recent DI test run for #111877 had failures for:

[Centos.9.Amd64.Open]
[Debian.13.Amd64.Open]
[net10.0-linux-Debug-x64-Mono_Interpreter_Debug-Ubuntu.2204.Amd64.Open]

with test failure:

   at System.DirectoryServices.Protocols.Tests.LdapSessionOptionsTests.ReferralChasing_Set_GetReturnsExpected_On_Linux(ReferralChasingOptions value) in /_/src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs:line 43

Assert.Equal() Failure: Values differ
Expected: None
Actual:   All

Apparently, setting the value for None, which converts to 0 \ false for Linux when setting that bool property doesn't stick and the getter always returns All. Here's the current source for the Linux version of the setter for public ReferralChasingOptions ReferralChasing:

 SetBoolValueHelper(LdapOption.LDAP_OPT_REFERRALS, value == ReferralChasingOptions.All);

This tests past locally for me on Ubuntu.

Flagging as potential test bug, since these other platforms may not support a None options.

@steveharter steveharter added area-System.DirectoryServices help wanted [up-for-grabs] Good issue for external contributors test-bug Problem in test source code (most likely) labels Feb 4, 2025
@steveharter steveharter added this to the Future milestone Feb 4, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-directoryservices, @jay98014
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.DirectoryServices help wanted [up-for-grabs] Good issue for external contributors test-bug Problem in test source code (most likely)
Projects
None yet
Development

No branches or pull requests

1 participant