如何修复静态驱动程序验证程序结果“错误”
我正在尝试在Visual Studio 2019中的“内核模式驱动程序,USB(KMDF)”模板项目上运行静态驱动程序验证仪。
我选择了X64平台的发行配置。我只选择了“驱动程序”规则。如果我在driverentry
中删除wdfdriverCreate
的调用,则我将获得“必须f缩影”,并带有一个可单击的链接,将我带到了报告页面。
如果我将代码保留为原样,则呼叫wdfdrervercreate
,则结果是“错误”,并且结果文本无法单击。
我可以看到UI中的构建和链接步骤是成功的,这也反映在文件smvbuild.log
中。
sdv-map.h
看起来像这样:
//Approved=false
//DriverEntry
#define fun_DriverEntry DriverEntry
//TestStaticVerifierEvtDevicePrepareHardware
#define fun_WDF_DEVICE_PREPARE_HARDWARE TestStaticVerifierEvtDevicePrepareHardware
//TestStaticVerifierEvtDeviceAdd
#define fun_WDF_DRIVER_DEVICE_ADD TestStaticVerifierEvtDeviceAdd
//TestStaticVerifierEvtIoDeviceControl
#define fun_WDF_IO_QUEUE_IO_DEVICE_CONTROL TestStaticVerifierEvtIoDeviceControl
//TestStaticVerifierEvtIoStop
#define fun_WDF_IO_QUEUE_IO_STOP TestStaticVerifierEvtIoStop
//TestStaticVerifierEvtDriverContextCleanup
#define fun_WDF_OBJECT_CONTEXT_CLEANUP TestStaticVerifierEvtDriverContextCleanup
sdv \ resuct \ drivercreate_sdv.xml
包含以下内容:
<?xml version="1.0"?>
<RuleResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<defect>false</defect>
<Name>drivercreate</Name>
<Result>SDV_TOOLERROR</Result>
<IsPreCondition>false</IsPreCondition>
<IsMustFix>true</IsMustFix>
<isWarning>false</isWarning>
</RuleResult>
sdv_toolerror
看起来可疑,但我不知道问题是什么。我如何找到有关问题出在这里的更多信息?
I am trying to run the Static Driver Verifier on the "Kernel Mode Driver, USB (KMDF)" template project in Visual Studio 2019.
I select the Release configuration for x64 platform. I have only selected the "DriverCreate" rule. If I remove the call to WdfDriverCreate
in DriverEntry
, then I get "MustFix Defect" as result, with a clickable link that takes me to the report page.
If I leave the code as it is, with the call to WdfDriverCreate
then the result is "error", and the result text is not clickable.
I can see that the build and link step is succesful in the UI, and this is also reflected in the file smvbuild.log
.
SDV-map.h
looks like this:
//Approved=false
//DriverEntry
#define fun_DriverEntry DriverEntry
//TestStaticVerifierEvtDevicePrepareHardware
#define fun_WDF_DEVICE_PREPARE_HARDWARE TestStaticVerifierEvtDevicePrepareHardware
//TestStaticVerifierEvtDeviceAdd
#define fun_WDF_DRIVER_DEVICE_ADD TestStaticVerifierEvtDeviceAdd
//TestStaticVerifierEvtIoDeviceControl
#define fun_WDF_IO_QUEUE_IO_DEVICE_CONTROL TestStaticVerifierEvtIoDeviceControl
//TestStaticVerifierEvtIoStop
#define fun_WDF_IO_QUEUE_IO_STOP TestStaticVerifierEvtIoStop
//TestStaticVerifierEvtDriverContextCleanup
#define fun_WDF_OBJECT_CONTEXT_CLEANUP TestStaticVerifierEvtDriverContextCleanup
sdv\results\drivercreate_SDV.xml
contains this:
<?xml version="1.0"?>
<RuleResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<defect>false</defect>
<Name>drivercreate</Name>
<Result>SDV_TOOLERROR</Result>
<IsPreCondition>false</IsPreCondition>
<IsMustFix>true</IsMustFix>
<isWarning>false</isWarning>
</RuleResult>
SDV_TOOLERROR
looks suspicious, but I don't know what the problem is. How can I find more information about what the problem is here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论