-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[DNSAPI_APITEST] Fix dnsapi:DnsQuery on Server 2003 x86, 8.1 x86, 8.1 x64, 10 x86, 10 x64 #8043
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
base: master
Are you sure you want to change the base?
Conversation
@@ -61,11 +61,14 @@ void TestHostName(void) | |||
dp = InvalidPointer; | |||
dns_status = DnsQuery_A(NULL, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0); | |||
ok(dns_status == ERROR_INVALID_PARAMETER, "DnsQuery_A failed with error %lu\n", dns_status); | |||
ok(dp == InvalidPointer, "dp = %p\n", dp); | |||
ok(dp == InvalidPointer || dp == 0, "dp = %p\n", dp); |
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.
Here and elsewhere/everywhere,
do we have to accept all/any different values, or could we match Windows versions?
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.
Why match a specific Windows version if both represent a valid implementation?
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.
You wrote, in PR description, that
Windows 8+ sets the query to a null pointer [...] while earlier Windows versions don't change the query pointer.
but your code implies that any Windows version can return any of the values.
That seems contradictory/wrong. (Instead of checking the Windows version.)
@@ -61,11 +61,14 @@ void TestHostName(void) | |||
dp = InvalidPointer; | |||
dns_status = DnsQuery_A(NULL, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0); | |||
ok(dns_status == ERROR_INVALID_PARAMETER, "DnsQuery_A failed with error %lu\n", dns_status); | |||
ok(dp == InvalidPointer, "dp = %p\n", dp); | |||
ok(dp == InvalidPointer || dp == 0, "dp = %p\n", dp); |
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.
ok(dp == InvalidPointer || dp == 0, "dp = %p\n", dp); | |
ok(dp == InvalidPointer || dp == NULL, "dp = %p\n", dp); |
Purpose
Fixes the dnsapi:DnsQuery test on Server 2003 x86, 8.1 x86, 8.1 x64, 10 x86, and 10 x64.
Windows Server 2003 x64 does not handle the hostname tests properly; however there is some discussion regarding abandoning our Server 2003 x64 testbot and using a Vista x64 testbot instead, so I felt it appropriate to PR this now.
Proposed changes
DNS_ERROR_RCODE_NAME_ERROR
in some tests where other versions of Windows may returnERROR_INVALID_NAME
,ERROR_TIMEOUT
, orDNS_ERROR_INVALID_NAME_CHAR
. Pass this behavior.Testbot runs (Filled in by Devs)