mirror of
https://github.com/reactos/reactos.git
synced 2025-07-10 03:38:31 +00:00
[IPHLPAPI_APITEST] Test failure fixes (#8214)
- liCreateTimestamp isn't set in TCP tables on several Windows versions. If it isn't, then we can't compare it to the current system time; so don't. - GetInterfaceName had some test failures unique to Vista, guard them. - icmp: Accept either ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER as a last error in a couple tests.
This commit is contained in:
parent
ea9e2812c6
commit
410db43f20
5 changed files with 51 additions and 34 deletions
|
@ -273,8 +273,12 @@ START_TEST(GetExtendedTcpTable)
|
|||
{
|
||||
ok(TcpTableOwnerMod->table[i].dwOwningPid == Pid, "Invalid owner\n");
|
||||
|
||||
ok(TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart >= CreationTime.QuadPart, "Invalid time\n");
|
||||
ok(TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart <= CreationTime.QuadPart + 60000000000LL, "Invalid time\n");
|
||||
// liCreateTimestamp may not be populated on Vista, 7, and 8.1
|
||||
if (TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart != 0)
|
||||
{
|
||||
ok(TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart >= CreationTime.QuadPart, "Invalid time\n");
|
||||
ok(TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart <= CreationTime.QuadPart + 60000000000LL, "Invalid time\n");
|
||||
}
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, TcpTableOwnerMod);
|
||||
|
@ -332,8 +336,12 @@ START_TEST(GetExtendedTcpTable)
|
|||
{
|
||||
ok(TcpTableOwnerMod->table[i].dwOwningPid == Pid, "Invalid owner\n");
|
||||
|
||||
ok(TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart >= CreationTime.QuadPart, "Invalid time\n");
|
||||
ok(TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart <= CreationTime.QuadPart + 60000000000LL, "Invalid time\n");
|
||||
// liCreateTimestamp may not be populated on Vista, 7, and 8.1
|
||||
if (TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart != 0)
|
||||
{
|
||||
ok(TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart >= CreationTime.QuadPart, "Invalid time\n");
|
||||
ok(TcpTableOwnerMod->table[i].liCreateTimestamp.QuadPart <= CreationTime.QuadPart + 60000000000LL, "Invalid time\n");
|
||||
}
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, TcpTableOwnerMod);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue