mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[KMTEST] Skip tests that bugcheck on Vista (#8406)
- [kmtest_drv] Increase timeout period from 10 seconds to 30 seconds. This was needed on my machine because of log spam in the kmtest:IoDeviceInterface test. I also reduced the log spam in that test, making this not necessary. However, I left it in as I figured if I ran into this issue, others may too in the future with other tests. - [kmtest:ExFastMutex] Skip concurrent fast mutex tests on Vista+. It appears that this was also causing hangs on WS03 x64 so I moved the skip logic there and combined it with the vista+ skip. - [kmtest:IoDeviceInterface] Change some traces to DPRINTs since it was creating excessive log spam that slowed down the test enough to trigger the previous timeout. - [kmtest:KeEvent] Skip concurrent event tests on Vista+. - [kmtest:KeGuardedMutex] Skip on Vista+. - [kmtest:ObType] Disable making custom object types as this is invalid on Vista+. - [kmtest:PoIrp] Skip on Vista+ (already skipped on WS03 x64). - [kmtest:SeInheritance] Skip on Vista+.
This commit is contained in:
@@ -58,7 +58,7 @@ static PDEVICE_OBJECT MainDeviceObject;
|
||||
PDRIVER_OBJECT KmtDriverObject = NULL;
|
||||
static KMT_USER_WORK_LIST WorkList;
|
||||
static ULONG RequestId = 0;
|
||||
static const LONGLONG TimeoutDuration = -10LL * (1000 * 1000 * 10); // 10 seconds
|
||||
static const LONGLONG TimeoutDuration = -30LL * (1000 * 1000 * 10); // 30 seconds
|
||||
|
||||
/* Entry */
|
||||
/**
|
||||
|
||||
@@ -255,6 +255,13 @@ TestFastMutexConcurrent(
|
||||
LARGE_INTEGER Timeout;
|
||||
Timeout.QuadPart = -50 * MILLISECOND;
|
||||
|
||||
#ifdef _M_AMD64
|
||||
if (skip(FALSE, "ROSTESTS-367: Skipping TestFastMutexConcurrent() because it hangs on Windows Server 2003 x64-Testbot.\n"))
|
||||
#else
|
||||
if (skip(GetNTVersion() < _WIN32_WINNT_VISTA, "TestFastMutexConcurrent() doesn't work on Vista+.\n"))
|
||||
#endif
|
||||
return;
|
||||
|
||||
InitThreadData(&ThreadData, Mutex, ExAcquireFastMutex, NULL, ExReleaseFastMutex);
|
||||
InitThreadData(&ThreadData2, Mutex, ExAcquireFastMutex, NULL, ExReleaseFastMutex);
|
||||
InitThreadData(&ThreadDataUnsafe, Mutex, ExAcquireFastMutexUnsafe, NULL, ExReleaseFastMutexUnsafe);
|
||||
@@ -310,14 +317,6 @@ TestFastMutexConcurrent(
|
||||
|
||||
START_TEST(ExFastMutex)
|
||||
{
|
||||
#if defined(_M_AMD64)
|
||||
if (TRUE)
|
||||
{
|
||||
skip(FALSE, "ROSTESTS-367: Skipping kmtest:ExFastMutex because it hangs on Windows Server 2003 x64-Testbot.\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
FAST_MUTEX Mutex;
|
||||
KIRQL Irql;
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ Test_IoOpenDeviceInterfaceRegistryKey(
|
||||
if (skip(NT_SUCCESS(Status), "IoOpenDeviceInterfaceRegistryKey() failed: 0x%lx\n", Status))
|
||||
return;
|
||||
|
||||
trace("IoOpenDeviceInterfaceRegistryKey() success: 0x%p\n", DeviceInterfaceKey);
|
||||
DPRINT("IoOpenDeviceInterfaceRegistryKey() success: 0x%p\n", DeviceInterfaceKey);
|
||||
|
||||
for (n = 0; n < RTL_NUMBER_OF(Types); ++n)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ Test_IoOpenDeviceInterfaceRegistryKey(
|
||||
if (skip(NT_SUCCESS(Status), "ZwCreateKey() failed to create a subkey: %d 0x%lx\n", n, Status))
|
||||
continue;
|
||||
|
||||
trace("ZwCreateKey(): successfully created subkey: %d 0x%p\n", n, DeviceInterfaceSubKey);
|
||||
DPRINT("ZwCreateKey(): successfully created subkey: %d 0x%p\n", n, DeviceInterfaceSubKey);
|
||||
|
||||
ZwDeleteKey(DeviceInterfaceSubKey);
|
||||
ZwClose(DeviceInterfaceSubKey);
|
||||
@@ -123,7 +123,7 @@ Test_IoGetDeviceInterfaceAlias(
|
||||
if (skip(NT_SUCCESS(Status), "IoGetDeviceInterfaceAlias(): fail: %d 0x%x\n", n, Status))
|
||||
continue;
|
||||
|
||||
trace("IoGetDeviceInterfaceAlias(): success: %d %wZ\n", n, &AliasSymbolicLinkName);
|
||||
DPRINT("IoGetDeviceInterfaceAlias(): success: %d %wZ\n", n, &AliasSymbolicLinkName);
|
||||
|
||||
/* Test IoOpenDeviceInterfaceRegistryKey with alias symbolic link too */
|
||||
Test_IoOpenDeviceInterfaceRegistryKey(AliasSymbolicLinkName.Buffer);
|
||||
@@ -149,7 +149,7 @@ Test_IoSetDeviceInterfaceState(
|
||||
if (skip(NT_SUCCESS(Status), "IoSetDeviceInterfaceState(): failed to enable interface: %d 0x%x\n", n, Status))
|
||||
continue;
|
||||
|
||||
trace("IoSetDeviceInterfaceState(): successfully enabled interface: %d %wZ\n", n, &SymbolicLinkName);
|
||||
DPRINT("IoSetDeviceInterfaceState(): successfully enabled interface: %d %wZ\n", n, &SymbolicLinkName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,14 +172,14 @@ Test_IoGetDeviceInterfaces(
|
||||
return;
|
||||
}
|
||||
|
||||
trace("IoGetDeviceInterfaces '%wZ' results:\n", &GuidString);
|
||||
DPRINT("IoGetDeviceInterfaces '%wZ' results:\n", &GuidString);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
|
||||
for (SymbolicLink = SymbolicLinkList;
|
||||
SymbolicLink[0] != UNICODE_NULL;
|
||||
SymbolicLink += wcslen(SymbolicLink) + 1)
|
||||
{
|
||||
trace("Symbolic Link: %S\n", SymbolicLink);
|
||||
DPRINT("Symbolic Link: %S\n", SymbolicLink);
|
||||
Test_IoGetDeviceInterfaceAlias(SymbolicLink);
|
||||
Test_IoOpenDeviceInterfaceRegistryKey(SymbolicLink);
|
||||
Test_IoSetDeviceInterfaceState(SymbolicLink);
|
||||
@@ -209,7 +209,7 @@ NotificationCallback(
|
||||
ok_eq_uint(Notification->Size, sizeof(*Notification));
|
||||
|
||||
/* symbolic link must exist */
|
||||
trace("Interface change: %wZ\n", Notification->SymbolicLinkName);
|
||||
DPRINT("Interface change: %wZ\n", Notification->SymbolicLinkName);
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
Notification->SymbolicLinkName,
|
||||
OBJ_KERNEL_HANDLE,
|
||||
|
||||
@@ -56,6 +56,9 @@ TestSynchronizeExecution(VOID)
|
||||
KSPIN_LOCK ActualLock;
|
||||
BOOLEAN Ret;
|
||||
|
||||
if (skip(GetNTVersion() < _WIN32_WINNT_VISTA, "We can't create fake interrupts on Vista+.\n"))
|
||||
return;
|
||||
|
||||
RtlFillMemory(&Interrupt, sizeof Interrupt, 0x55);
|
||||
Interrupt.ActualLock = &ActualLock;
|
||||
KeInitializeSpinLock(Interrupt.ActualLock);
|
||||
|
||||
@@ -160,6 +160,9 @@ TestEventConcurrent(
|
||||
LongTimeout.QuadPart = -100 * MILLISECOND;
|
||||
ShortTimeout.QuadPart = -1 * MILLISECOND;
|
||||
|
||||
if (skip(GetNTVersion() < _WIN32_WINNT_VISTA, "TestEventConcurrent() is broken on Vista+.\n"))
|
||||
return;
|
||||
|
||||
KeInitializeEvent(Event, Type, FALSE);
|
||||
|
||||
for (i = 0; i < ThreadCount; ++i)
|
||||
|
||||
@@ -440,6 +440,9 @@ START_TEST(KeGuardedMutex)
|
||||
return;
|
||||
}
|
||||
|
||||
if (skip(GetNTVersion() < _WIN32_WINNT_VISTA, "kmtest:KeGuardedMutex is broken on Vista+.\n"))
|
||||
return;
|
||||
|
||||
for (i = 0; i < sizeof TestIterations / sizeof TestIterations[0]; ++i)
|
||||
{
|
||||
trace("Run %d\n", i);
|
||||
|
||||
@@ -169,7 +169,7 @@ QueryNameProc(
|
||||
}
|
||||
|
||||
static
|
||||
VOID
|
||||
NTSTATUS
|
||||
ObtCreateObjectTypes(VOID)
|
||||
{
|
||||
INT i;
|
||||
@@ -183,6 +183,9 @@ ObtCreateObjectTypes(VOID)
|
||||
HANDLE ObjectTypeHandle;
|
||||
UNICODE_STRING ObjectPath;
|
||||
|
||||
if (skip(GetNTVersion() < _WIN32_WINNT_VISTA, "Custom object types are not supported on Vista+.\n"))
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
|
||||
RtlCopyMemory(&Name.DirectoryName, L"\\ObjectTypes\\", sizeof Name.DirectoryName);
|
||||
|
||||
for (i = 0; i < NUM_OBTYPES; ++i)
|
||||
@@ -244,6 +247,8 @@ ObtCreateObjectTypes(VOID)
|
||||
ok_eq_hex(Status, STATUS_SUCCESS);
|
||||
ok(ObTypes[i] != NULL, "ObType = NULL\n");
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static
|
||||
@@ -415,10 +420,12 @@ VOID
|
||||
TestObjectType(
|
||||
IN BOOLEAN Clean)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
RtlZeroMemory(&Counts, sizeof Counts);
|
||||
|
||||
ObtCreateObjectTypes();
|
||||
DPRINT("ObtCreateObjectTypes() done\n");
|
||||
Status = ObtCreateObjectTypes();
|
||||
DPRINT("ObtCreateObjectTypes() %s\n", NT_SUCCESS(Status) ? "succeeded" : "failed");
|
||||
|
||||
ObtCreateDirectory();
|
||||
DPRINT("ObtCreateDirectory() done\n");
|
||||
|
||||
@@ -12,13 +12,12 @@ START_TEST(PoIrp)
|
||||
{
|
||||
DWORD Error;
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
if (TRUE)
|
||||
{
|
||||
skip(FALSE, "ROSTESTS-368: Skipping kmtest:PoIrp because it crashes on Windows Server 2003 x64-Testbot.\n");
|
||||
return;
|
||||
}
|
||||
#ifdef _M_AMD64
|
||||
if (skip(FALSE, "ROSTESTS-368: Skipping kmtest:PoIrp because it crashes on Windows Server 2003 x64-Testbot.\n"))
|
||||
#else
|
||||
if (skip(GetNTVersion() < _WIN32_WINNT_VISTA, "kmtest:PoIrp is broken on Vista+.\n"))
|
||||
#endif
|
||||
return;
|
||||
|
||||
Error = KmtLoadAndOpenDriver(L"PoIrp", TRUE);
|
||||
ok_eq_int(Error, ERROR_SUCCESS);
|
||||
|
||||
@@ -949,6 +949,9 @@ START_TEST(SeInheritance)
|
||||
{
|
||||
PKTHREAD Thread;
|
||||
|
||||
if (skip(GetNTVersion() < _WIN32_WINNT_VISTA, "kmtest:SeInheritance is broken on Vista+.\n"))
|
||||
return;
|
||||
|
||||
TestObRootSecurity();
|
||||
Thread = KmtStartThread(SystemThread, NULL);
|
||||
KmtFinishThread(Thread, NULL);
|
||||
|
||||
Reference in New Issue
Block a user