Customer and Partner Connections Assess and Certify Design and Develop Design Customer and Partner Connections Assess and Certify Implement Test Design Customer and Partner Connections Assess and Certify Implement Test Rules Rules Verification Harness Rules Rules.
Download ReportTranscript Customer and Partner Connections Assess and Certify Design and Develop Design Customer and Partner Connections Assess and Certify Implement Test Design Customer and Partner Connections Assess and Certify Implement Test Rules Rules Verification Harness Rules Rules.
Customer and Partner Connections Assess and Certify Design and Develop Design Customer and Partner Connections Assess and Certify Implement Test Design Customer and Partner Connections Assess and Certify Implement Test Rules Rules Verification Harness Rules Rules Design Static tools Customer and Partner Connections Assess and Certify Test • Verifies complete driver including libraries together • Determines if a driver obeys OS interaction rules • WDM, KMDF, NDIS & storage driver support • C++ support added for Windows 8 Code Analysis Static Driver Verifier What General Technology for applications and drivers. Driver extensions. Specifically for drivers Driver Models Any WDM KMDF NDIS StorPort (new for Windows 8) C and C++ (new for Windows 8) Issues found Local defects Easy to fix High volume Global defects Harder to fix Low volume Scope Function level Local violations Inter-procedural Finds deep bugs Annotations Annotations of code needed - Development Cycle Apply early: “When the driver compiles” Runs in minutes Apply later: “When the basic structure of the driver is in place” Longer runtime, run periodically overnight Design Runtime tools Customer and Partner Connections Assess and Certify Implement Test Test F5 Test Test • • • • Use Static Driver Verifier to find driver defect Deploy the test driver to test system using WDK test harness Run Device Fundamentals test to expose and crash driver Demonstration of debugger integration It’s simple to select and verify OS rules applicable to your driver type. Results of running SDV against the Toastmon driver. We found a bug in the driver. There is a code path where PsGetVersion() is called at an IRQL > PASSIVE_LEVEL. That’s not good. Deploying a driver to a remote test machine is easy. You access these options via the project’s properties Here’s how you enable and configure Driver Verifier on the test machine, without leaving your chair, or Visual Studio. F5 Press F5… … and switch to the test machine to watch your driver get installed! F5 Now we press F5 By pressing F5 you : Build, Package/Sign, Deploy, Install and Debug your driver! Create a new test group and add one of the many Device Fundamentals tests provided to you by Microsoft. We select the Surprise Remove test from the PNP group. F5 Now we press F5 Specify the device you’d like to target, the test parameters, and click the Run button… The test was successfully run on the remote machine. Access the logs using the Test Group Explorer pane on the left Let’s change one of the test parameters and try again. This time we’ll send IO to the device before surprise remove. The test crashed the remote machine! The debugger automatically breaks in… You’re Kernel debugging, over the network, from Visual Studio. !Analyze tells you exactly what the driver did wrong. It’s the same bug SDV caught earlier! Rules Rules ToastMon_DispatchRead ( Irp ) Pnp/Io Manager IoMarkIrpPending (Irp) InsertTailList(,&Irp->…) Return STATUS_PENDING ToastMon_DispatchPnp ( Irp ) ToasterDrvCancelQueuedReadIrps KeAcquireSpinlock PsGetVersion KeAcquireSpinlock: After this call the IRQL is raised from PASSIVE to Dispatch. Test • • Create a functional test using driver test template Build and run test using Window Driver Kit The WDK supplies Driver Test templates for various categories of tests. Step 1 With just 3 simple changes to the template, we create a functional IOCTL test for the OSRUsbFx2 device. Step 2 Step 3 As soon as you Press F5 and build your new test, it shows up in the test library, ready to run! Step 3 Specify the number you’d like to display on the Seven-Segment Display on the OSRUsbFx2 device… Run your custom test and observe the OSRUsbFx2 device connected to the remote machine Review Code Analysis Design Static Driver Verifier Customer and Partner Connections Implement Easily Run Tests Device Fundamentals Tests Assess and Certify Driver Verifier Test Write Device Specific Tests RELATED SESSIONS • • • HW-328T – Using the Windows Driver Framework to build better drivers HW-118T – Advanced app and driver debugging TOOL-100T - Improving software quality using Visual Studio 11 C++ Code Analysis DOCUMENTATION & ARTICLES •Tools for Verifying Drivers •Tools for Testing Drivers •Windows Hardware Dev Center •Windows Dev Center CHALK TALK HW-907C Inside the Windows 8 driver developer workflow EXPO BOOTH Windows Hardware Engineering Tools HANDS ON LAB 721 Experiencing Windows Driver Kit integration with Visual Studio CONTACT [email protected] http://forums.dev.windows.com http://bldw.in/SessionFeedback