mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 10:46:58 +00:00
[KMTESTS:EX] Use stricter checks for the UUID returned from ExUuidCreate.
* Check the entire version field * Check the variant field * Accept RPC_NT_UUID_LOCAL_ONLY, which is sometimes returned by Windows * Repeat the test to show that these things happen every time Based on a patch by Serge Gautherie.
This commit is contained in:
parent
8983adf967
commit
1481df94ab
1 changed files with 9 additions and 3 deletions
|
@ -14,8 +14,14 @@ START_TEST(ExUuid)
|
|||
{
|
||||
UUID Uuid;
|
||||
NTSTATUS Status;
|
||||
ULONG i;
|
||||
|
||||
Status = ExUuidCreate(&Uuid);
|
||||
ok(Status == STATUS_SUCCESS, "ExUuidCreate returned unexpected status: %lx\n", Status);
|
||||
ok((Uuid.Data3 & 0x1000) == 0x1000, "Invalid UUID version: %x\n", (Uuid.Data3 & 0xF000));
|
||||
for (i = 0; i < 1000; i++)
|
||||
{
|
||||
Status = ExUuidCreate(&Uuid);
|
||||
ok(Status == STATUS_SUCCESS || Status == RPC_NT_UUID_LOCAL_ONLY,
|
||||
"ExUuidCreate returned unexpected status: 0x%lx\n", Status);
|
||||
ok((Uuid.Data3 & 0xF000) == 0x1000, "Invalid UUID version: 0x%x\n", (Uuid.Data3 & 0xF000));
|
||||
ok((Uuid.Data4[0] & 0xC0) == 0x80, "Invalid UUID variant: 0x%x\n", (Uuid.Data4[0] & 0xF0));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue