iphlpapi/tests: Fix test failure for ScopeID with bad DAD

André Hentschel nerv at dawncrow.de
Fri Feb 24 13:11:24 CST 2017


Am 23.02.2017 um 02:06 schrieb Bruno Jesus:
> On Wed, Feb 22, 2017 at 5:01 PM, André Hentschel <nerv at dawncrow.de> wrote:
>> diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c
>> index e0701a3..2f818ff 100644
>> --- a/dlls/iphlpapi/tests/iphlpapi.c
>> +++ b/dlls/iphlpapi/tests/iphlpapi.c
>> @@ -2067,6 +2067,9 @@ static void test_GetUnicastIpAddressEntry(void)
>>                  if (row.Address.si_family == AF_INET6)
>>                      ok(row.ScopeId.Value == row.Address.Ipv6.sin6_scope_id, "Expected %d, got %d\n",
>>                          row.Address.Ipv6.sin6_scope_id, row.ScopeId.Value);
>> +                else if (row.DadState == IpDadStateTentative)
>> +                    ok(row.ScopeId.Value == aa->IfIndex, "Expected %d, got %d\n",
>> +                        aa->IfIndex, row.ScopeId.Value);
>>                  else
>>                      ok(row.ScopeId.Value == 0, "Expected 0, got %d\n", row.ScopeId.Value);
>>                  ok(row.CreationTimeStamp.QuadPart, "CreationTimeStamp is 0\n");
> 
> It may be bikeshedding but 2 things call my attention. The first is
> that ScopeID is a IPv6 only field, it is very weird that Windows is
> using it for something. The second is that it may be by chance that
> ScopeID matches the interface index, tentative means that the DAD
> mechanism is still working into checking the IP in the network, so
> ScopeID in such case would be meaningless until it turns into
> IpDadStatePreferred or maybe one of the other error states.
> 

Hi,

You are right, it is weird, but what do you suggest? Rather adding a trace?



More information about the wine-devel mailing list