Start to implement fltmgr tests [WIP] (#52)

[FLTMGR]
- Partially implement registering contexts
- Add a misc file which contains stubs of the APIs needed in the test suite
- Export some APIs needed by the test suite

[KMTESTS]
- Create a File System Mini-filter wrapper to host drivers for the filter manager tests
- Add a test file which will be used for testing that mini-filters load correctly
- Add a test file which will be used to write tests for IRP_MJ_CREATE requests
This commit is contained in:
Ged Murphy 2017-10-12 15:32:30 +01:00 committed by GitHub
parent 5d0a122ff6
commit 9d15fb9279
16 changed files with 1139 additions and 8 deletions

View file

@ -117,6 +117,29 @@ NTSTATUS TestEntry(IN PDRIVER_OBJECT DriverObject, IN PCUNICODE_STRING RegistryP
VOID TestUnload(IN PDRIVER_OBJECT DriverObject);
#endif /* defined KMT_STANDALONE_DRIVER */
#ifdef KMT_FILTER_DRIVER
#ifndef KMT_KERNEL_MODE
#define KMT_KERNEL_MODE
#endif
NTSTATUS KmtFilterRegisterCallbacks(_In_ CONST FLT_OPERATION_REGISTRATION *OperationRegistration);
typedef enum
{
TESTENTRY_NO_REGISTER_FILTER = 1,
TESTENTRY_NO_CREATE_COMMS_PORT = 2,
TESTENTRY_NO_START_FILTERING = 4,
} KMT_MINIFILTER_FLAGS;
VOID TestFilterUnload(_In_ ULONG Flags);
NTSTATUS TestInstanceSetup(_In_ PCFLT_RELATED_OBJECTS FltObjects, _In_ FLT_INSTANCE_SETUP_FLAGS Flags, _In_ DEVICE_TYPE VolumeDeviceType, _In_ FLT_FILESYSTEM_TYPE VolumeFilesystemType, _In_ PUNICODE_STRING VolumeName, _In_ ULONG RealSectorSize, _In_ ULONG SectorSize);
VOID TestQueryTeardown(_In_ PCFLT_RELATED_OBJECTS FltObjects, _In_ FLT_INSTANCE_QUERY_TEARDOWN_FLAGS Flags);
NTSTATUS KmtFilterRegisterComms(_In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback, _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback, _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback, _In_ LONG MaxClientConnections);
#endif/* defined KMT_FILTER_DRIVER */
#ifdef KMT_KERNEL_MODE
/* Device Extension layout */
typedef struct