[KMTESTS:NTOS_IO] Add a simple test for IoConnectInterrupt

CORE-17256
This commit is contained in:
Dmitry Borisov 2024-02-06 19:39:42 +06:00 committed by Stanislav Motylkov
parent f8cb6458e4
commit f4a38a05ec

View file

@ -91,7 +91,34 @@ TestSynchronizeExecution(VOID)
}
}
static
VOID
TestConnectInterrupt(VOID)
{
PKINTERRUPT InterruptObject;
NTSTATUS Status;
/* If the IoConnectInterrupt() fails, the interrupt object should be set to NULL */
InterruptObject = KmtInvalidPointer;
/* Test for invalid interrupt */
Status = IoConnectInterrupt(&InterruptObject,
(PKSERVICE_ROUTINE)TestConnectInterrupt,
NULL,
NULL,
0,
0,
0,
LevelSensitive,
TRUE,
(KAFFINITY)-1,
FALSE);
ok_eq_hex(Status, STATUS_INVALID_PARAMETER);
ok_eq_pointer(InterruptObject, NULL);
}
START_TEST(IoInterrupt)
{
TestSynchronizeExecution();
TestConnectInterrupt();
}