I'm pretty new to Windows driver development, so I'm not sure what should be expected of the WDK. I've installed a recent version of VS2022 and the WDK extension.
When deploying a driver on a test machine, the "Remove previous driver versions before deployment" step takes several minutes. The console is stuck at the following:
Test Authoring and Execution Framework v10.66k for x64
StartGroup: DriverTestTasks::_DriverRemoval
Driver Certificate File: package.cer
Driver Inf File: Something.inf
Driver Hardware ID: root\Something
Driver package GUID: x64
Import Driver To Store: 1
Uninstall Driver: 1
WDTF_DRIVER_PACKAGE : - SetPackageInfFileName(C:\Windows\inf\oem46.inf)
WDTF_TARGET : - GetInterface("DriverSetup")
WDTF_TARGET : Target: RUNNER
Meanwhile, the TE.ProcessHost.exe executable is busy, it seems to be querying something about every driver in the system, as shown by the stacktrace:
ntdll.dll!NtDeviceIoControlFile() Unknown
KernelBase.dll!DeviceIoControl() Unknown
kernel32.dll!00007ffbc0bf27f1() Unknown
drvstore.dll!CmGetObjectProperty() Unknown
drvstore.dll!DriverDatabaseGetObjectProperty() Unknown
drvstore.dll!EnumDriverPackageCallback(struct _DRIVERSTORE_CONTEXT *,enum _DRIVERSTORE_OBJECT_TYPE,unsigned short const *,__int64) Unknown
drvstore.dll!DriverDatabaseEnumObjects() Unknown
drvstore.dll!DriverStoreEnumW() Unknown
WDTFDevnodeInfData.dll!DriverStoreDll::_DriverStoreEnumW(struct HDRIVERSTORE__ *,unsigned long,int (*)(struct HDRIVERSTORE__ *,unsigned short const *,struct _DRIVERSTORE_DRIVERPACKAGE_INFOW *,__int64),__int64) Unknown
WDTFDevnodeInfData.dll!DriverStore::Refresh(void) Unknown
WDTFDevnodeInfData.dll!DriverStore::GetPackageCount(unsigned long) Unknown
WDTFDevnodeInfData.dll!CTsDriverStore::EnumReset(void) Unknown
WDTFDevnodeInfData.dll!CTsDriverStore::Open(void) Unknown
WDTFDevnodeInfData.dll!CDevnodeInfInfoDetail_RawData::Refresh(class CGDGNode *) Unknown
WDTFDevnodeInfData.dll!CGDGFieldBase::GetData(class CGDGNode *,class CGDGSetFieldData *) Unknown
WDTF.DLL!CSubSource::ResolveField(class IDataBlock &,unsigned long &) Unknown
WDTF.DLL!CCachedBlockField<unsigned long>::GetValue(void) Unknown
WDTF.DLL!CDataBlock::GetValue(unsigned short const *) Unknown
WDTF.DLL!CDataBlock::GetValue(unsigned short const *) Unknown
WDTF.DLL!CField::Eval(class IDataBlock &) Unknown
WDTF.DLL!CSubcontext::Eval(class IDataBlock &) Unknown
WDTF.DLL!CTargetsCore<class std::list<struct IWDTFTarget2 *,class std::allocator<struct IWDTFTarget2 *> >,class ATL::ICollectionOnSTLImpl<struct IWDTFTargets2,class std::list<struct IWDTFTarget2 *,class std::allocator<struct IWDTFTarget2 *> >,struct IWDTFTarget2 *,class _CopyInterfaceFromListItem<struct IWDTFTarget2>,class ATL::CComEnumOnSTL<struct IEnumVARIANT,&struct __s_GUID const _GUID_00020404_0000_0000_c000_000000000046,struct tagVARIANT,struct _CopyVariantFromListItem<struct IWDTFTarget2>,class std::list<struct IWDTFTarget2 *,class std::allocator<struct IWDTFTarget2 *> >,class ATL::CComMultiThreadModel> >,class CWDTFTarget2,struct IWDTFTarget2,class CWDTFTargets2,struct IWDTFTargets2,struct IWDTF2>::InternalQuery(unsigned short *,struct IWDTFTargets2 * *) Unknown
WDTF.DLL!CWDTFTargets2::InternalQuery(unsigned short *,struct IWDTFTargets2 * *) Unknown
WDTF.DLL!CWDTFTargets2::Query(unsigned short *,struct IWDTFTargets2 * *) Unknown
WDTF.DLL!CWDTFDeviceDepot2::Query(unsigned short *,struct IWDTFTargets2 * *) Unknown
DriverTestTasks.dll!00007ffba942d501() Unknown
DriverTestTasks.dll!00007ffba942cecd() Unknown
DriverTestTasks.dll!00007ffba9419f93() Unknown
DriverTestTasks.dll!00007ffba9419f4f() Unknown
DriverTestTasks.dll!00007ffba94196af() Unknown
DriverTestTasks.dll!00007ffba94128ef() Unknown
TE.Loaders.dll!00007ffb8d5669a9() Unknown
TE.Host.dll!`WEX::TestExecution::CommonTestHost::BeginInvokeImpl'::`2'::<lambda_1>::operator()() Unknown
TE.Common.dll!TAEF::Common::ExceptionBoundary<`WEX::TestExecution::CommandThread::ExecuteCommandThread'::`7'::<lambda_1>>() Unknown
TE.Common.dll!WEX::TestExecution::CommandThread::ExecuteCommandThread(class std::optional<class WEX::Logging::LogSession>) Unknown
TE.Common.dll!TAEF::Common::Details::ThreadData<class std::_Mem_fn<long ( WEX::TestExecution::CommandThread::*)(class std::optional<class WEX::Logging::LogSession>) noexcept>,class WEX::TestExecution::CommandThread *,class std::optional<class WEX::Logging::LogSession> >::RunThread(class TAEF::Common::Details::ThreadData<class std::_Mem_fn<long ( WEX::TestExecution::CommandThread::*)(class std::optional<class WEX::Logging::LogSession>) noexcept>,class WEX::TestExecution::CommandThread *,class std::optional<class WEX::Logging::LogSession> > *) Unknown
TE.Common.dll!`TAEF::Common::Thread::Thread<class std::_Mem_fn<long ( WEX::TestExecution::CommandThread::*)(class std::optional<class WEX::Logging::LogSession>) noexcept>,class WEX::TestExecution::CommandThread *,class std::optional<class WEX::Logging::LogSession> >(struct TAEF::Common::ThreadSettings &&,class std::_Mem_fn<long ( WEX::TestExecution::CommandThread::*)(class std::optional<class WEX::Logging::LogSession>) noexcept> &&,class WEX::TestExecution::CommandThread * &&,class std::optional<class WEX::Logging::LogSession> &&)'::`2'::<lambda_1>::operator()(void *) Unknown
kernel32.dll!00007ffbc0c0257d() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
So far I've been coping by manually running a script which removes leftovers (in seconds, not minutes!), but it's a bit tedious and error-prone. Is this normal? Is there a better way?