Bewerken

Delen via


How to select and configure the Device Fundamentals tests

The WDK for Windows 8 provides a driver testing framework that includes a set of tests called the Device Fundamentals tests. The Device Fundamentals tests are a collection of tests that are used both internally at Microsoft for testing the drivers and driver samples that ship with Windows and the WDK, and externally as part of the Windows Certification Program for Hardware. You can run the tests from your development environment. When you run the tests, you can use the same parameters that are used for Windows Certification testing, or you can configure and customize the run-time parameters according to your testing and debugging needs.

Getting the most from the Device Fundamentals tests

To get the most benefit from the Device Fundamentals tests, your device must be supported by the default I/O plug-ins. To see whether your device type is supported and to determine whether there are specific requirements for testing, refer to Provided WDTF Simple I/O plug-ins. The Device Fundamentals test also include a utility you can use to test your device to see whether it is supported. If your device is not supported, you can create a WDTF Simple I/O plug-in. in Visual Studio. For more information, see How to customize I/O for your device using the WDTF Simple I/O Action Plug-in.

About the Device Fundamentals Tests

The WDK provides the Device Fundamentals tests in two configurations, Basic and Certification. In both configurations, you can edit the test parameters to vary the length of the test, the number of test cycles to perform, and other test parameters, depending upon how you want to test the targeted devices or drivers. The Basic configuration is intended for general driver and device testing and debugging. Use the Basic configuration early on and throughout the development cycle. The tests in the Basic configuration have the same settings that are used in the Windows Certification testing, with the exception of having a shorter run time. In the Certification configuration, the tests have the same settings that are used in the Windows Certification testing. Use the Certification configuration to verify readiness for testing your device or driver for the Windows Certification Program for Hardware.

The Device Fundamentals Tests include tests in the following categories.

Setting the run-time test parameters

You can edit the run-time parameters for many of the Device Fundamentals tests. In the Driver Test Group window, an arrow (») next to a test name indicates that the test has parameters that you can change. Select the arrow (») to display the run-time parameters.

One of the most useful parameters is DQ, which specifies the target device to test. The default value (IsDevice) tests all of the devices on the target computer. The DQ parameter takes a WDTF SDEL query that identifies the target devices. You can specify a particular device for testing, for example:

DeviceID=’USB\ROOT_HUB\4&1CD5D022&0’ selects only the device for testing with the specified DeviceID.

For more information about DQ and the other run-time parameters, see Device Fundamentals test parameters.

Device Fundamentals Test Parameters

Parameter Description

DQ

Identifies the device or devices that should be used for testing. The DQ parameter takes a WDTFSDEL query that identifies the target devices. This query can be very flexible and it can be used to express any number of devices, from a single device to all devices in the system.

Common examples:

To test all devices that were installed with a specific INF File:

INF::FileName=INF_File_Name

For example, INF::OriginalInfFileName='KMDFTest.inf'

Inf::OriginalInFileName can be used with any INF.

To test a device with a specific Device Id:

DeviceId=’DeviceId

For example, DeviceID=’USB\ROOT_HUB\4&1CD5D022&0’

To test a device with a specific interface:

Interfaces::InterfaceGUID

To test a device with a specific driver letter:

Volume::DriverLetter=’DriveLetter

For example, Volume::DriverLetter=’c:\’

To test a device with a specific driver:

DriverBinaryNames=mydriver.sys

Where KMDFTest.inf is the inf used to install the driver. You can also use the folloiwng target the devices(s) that use KMDFTest.sys driver.

(DriverBinaryNames='KMDFTest.sys') works.

After setting the SDEL correctly you should see the following output on the console when you run a test.

WDTF_TARGETS : INFO : - Query("IsDevice AND ((Inf::OriginalInfFileName='KMDFTest.inf'))") WDTF_TARGETS : INFO : Target: KMDFTest Device ROOT\SAMPLE\0000 ​ WDTF_TEST : INFO : WARNING: The test is not enforcing that Driver Verifier is enabled.​ WDTF_TEST : INFO : DV is enabled with Flag:=0x209bb​ WDTF_TEST : INFO : DV is successfully enabled for all drivers of this devnode(UniqueTargetName):=KMDFTest Device ROOT\SAMPLE\0000 ​ WDTF_TARGET : INFO : - GetInterface("Support")​ WDTF_TARGET : INFO : Target: DESKTOP-2OVFH3G​ WDTF_TARGETS : INFO : - Query("IsDevice")​ WDTF_TARGETS : INFO : Target: KMDFTest Device ROOT\SAMPLE\0000 ​ WDTF_TARGETS : INFO : - GetRelations("below-or-self/","IsDevice")​ WDTF_TARGETS : INFO : Target: KMDFTest Device ROOT\SAMPLE\0000 ​ WDTF_TARGETS : INFO : - GetInterfacesIfExist("SimpleIOStressProc")​ WDTF_SIMPLE_IO : INFO : - For Target:KMDFTest Device ROOT\SAMPLE\0000 no Simple IO Interface was found.​ WDTF_SIMPLE_IO : INFO : - For Target:KMDFTest Device ROOT\SAMPLE\0000 WDTF will use the ANY Simple IO Interface.​

See attached files config and log files for more details. WDTF_TARGETS : INFO : Target: KMDFTest Device ROOT\SAMPLE\0000 ​ WDTF_TEST : INFO : Perform 1 cycle(s) of I/O termination test​ WDTF_TEST : INFO : I/O termination cycle #1​ WDTF_SIMPLEIO_STRESS_PROC : INFO : - StartAsync(KMDFTest Device ROOT\SAMPLE\0000 )​ WDTF_SIMPLEIO_STRESS_PROC : INFO : - WaitAsyncCompletion(KMDFTest Device ROOT\SAMPLE\0000 )​ WDTF_SIMPLE_IO : INFO : - For Target:KMDFTest Device ROOT\SAMPLE\0000 no Simple IO Interface was found.​ WDTF_SIMPLE_IO : INFO : - For Target:KMDFTest Device ROOT\SAMPLE\0000 WDTF will use the ANY Simple IO Interface.​ WDTF_SIMPLE_IO : INFO : - Open(KMDFTest Device ROOT\SAMPLE\0000 ) Try count 1​ WDTF_SUPPORT : INFO : - WaitForMinutes : 1​ WDTF_SIMPLE_IO : INFO : - PerformIO(KMDFTest Device ROOT\SAMPLE\0000 ) Count 1​ WDTF_SIMPLEIO_STRESS_PROC : INFO : - Terminate(KMDFTest Device ROOT\SAMPLE\0000 ) process

To test all device of a specific device Class:

For example, Class=CDROM would test all device of class CDROM.

For example, ClassGUID= {36fc9e60-c465-11cf-8056-444553540000} would test all the devices whose class GUID matches the specified GUID. In this case, the GUID is for the USB class.

DoPoolCheck

True or False. Monitors the driver's use of the paged and nonpaged system memory pools by using pool tags and lookaside lists. This option also monitors changes in the number of exceptions handled which might indicate errors in exception handling.

ChangeBufferProtectionFlags

True or False. Changes the memory protection flags of buffers passed to the tested device. The memory protection flags alternates between no access, read-only, and read-only with page guard.

DoSimpleIO

True or False. Runs SimpleI/O (if found) on test devices before and after performing PNP operations.

DoConcurrentIO

True or False. Uses WDTF concurrent I/O interface to send I/O requests to target device stacks while performing PnP operations.

FillZeroPageWithNull

True or False. Maps the zero page and fills it with NULL values. This test identifies drivers that do not verify a pointer reference before dereferencing the pointer.

FuzzTestPeriod

Fuzz test period in minutes.

HPU

Specifies the high processor utilization percentage.

Impersonate

True or False. Runs the test as a user without administrator privileges.

IOPeriod

Specifies the I/O period in minutes.

IOType

Specifies the type of I/O stress test: SimpleIOStressEx or SimpleIOStressProc (I/O in a separate process).

LPU

Specifies the low processor utilization percentage

MaxInBuffer

Specifies the maximum size, in bytes, of the input buffers that the test passes to the driver in FSCTLs (or IOCTLs for IOCTL tests).

MinInBuffer

Specifies the minimum size, in bytes, of the input buffers that the test passes to the driver in FSCTLs (or IOCTLs for IOCTL tests).

MaxOutBuffer

Specifies the maximum size, in bytes, of the output buffers that the test passes to the driver in FSCTLs (or IOCTLs for IOCTL tests).

MinOutBuffer

Specifies the minimum size, in bytes, of the output buffers that the test passes to the driver in FSCTLs (or IOCTLs for IOCTL tests).

MaxRandomCalls

Specifies the maximum number of calls that the test issues.

MaxTailoredCalls

Specifies the maximum number of calls that the test issues during the tailored random test.

MaxDeviceType

Specifies the maximum value of the DeviceType field in the FSCTLs (or IOCTLs for IOCTL tests). The maximum possible value is 65535.

MinDeviceType

Specifies the minimum value of the DeviceType field in the FSCTLs (or IOCTLs for IOCTL tests). The minimum possible value is 0.

MaxFunctionCode

Specifies the maximum value of the FunctionCode field in the FSCTLs (or IOCTLs for IOCTL tests). The maximum possible value is 4095.

MinFunctionCode

Specifies the minimum value of the FunctionCode field in the FSCTLs (or IOCTLs for IOCTL tests). The minimum possible value is 0.

PU

Specifies the processor utilization percentage

PingPongPeriod

Specifies the ping pong period in minutes; the time the processor alternates between high (HPU) and low (LPU) processor utilization levels.

ResumeDelay

The delay time (in seconds) after the machine resumes from sleep mode and before the next I/O cycle starts. The delay time is necessary to allow devices to restore their working state (renew IP address for network card and so on).

TestCycles

Specifies the number of test cycles (iterations) to perform.

WDTFREMOTESYSTEM

This parameter is required only if the device under test, or one of its child devices, is a wired network adapter that does not have an IPv6 gateway address. If this parameter is required on your network, you must provide an IPv6 address that the test network adapter can ping to test network.

Example: fe80::78b6:810:9c12:46cd

Wpa2PskAesSsid

This parameter is required only if the device under test or one of its child devices is a WiFi adapter. Provide the SSID of a WPA2 AES WiFi network that the test can use to test the WiFi adapter.

Default value: kitstestssid

Wpa2PskPassword

This parameter is required only if the device under test or one of its child devices is a WiFi adapter. Provide password of the WPA2 AES WiFi network that is specified by using the Wpa2PskAesSsid parameter.

Default value: password

Utility tests

Test Description

Display devices that have WDTF Simple I/O plug-ins

Parameters: None

Display devices that have Driver Verifier enabled

Parameters: None

Display devices

Parameters: None

Driver Verifier

Test Description

Disable Driver Verifier

Disables Driver Verifier on the test computer.

Parameters: None

Enable Driver Verifier

You can use this test to enable Driver Verifier for all drivers of a device (or devices) on the test computer.

Parameters: - See Driver Verifier Options.