Using Device Fundamentals Tests to Reproduce Device Manager Problem Codes

The Device Fundamentals (DevFund) tests use Microsoft-supplied I/O plug-ins to exercise devices by sending device class-specific I/O to the device while disabling and enabling the device, cycling the system through power states and reboots, deallocating and reallocating resources, and other tasks.

Step 1: Determine which tests can potentially reproduce the device error code

The following table matches device problem codes to tests known to exercise a device in such a way as to induce the corresponding problem code. This chart can be used by device and driver testers in an attempt to reproduce device problems seen in the wild, or problems which may be hard to reproduce during regular testing.

Device Error Code Device Error Message Device Fundamentals Test
10 CM_PROB_FAILED_START DF - PNP Rebalance Fail Restart Device Test (Reliability)
DF - PNP Surprise Remove Device Test (Development and Integration)
DF - PNP Surprise Remove Device Test (Reliability)
DF - PNP DIF Remove Device Test (Reliability)
DF - Reboot restart with IO before and after (Reliability)
DF - PNP Cancel Remove Device Test (Reliability)
DF - PNP Disable And Enable Device Test (Reliability)
DF - PNP Rebalance Request New Resources Device Test (Development and Integration)
DF - PNP Rebalance Request New Resources Device Test (Reliability)
DF - PNP Remove Device Test (Reliability)
DF - PNP Stop (Rebalance) Device Test (Development and Integration)
DF - PNP Stop (Rebalance) Device Test (Reliability)
DF - Sleep with IO During (Reliability)
DF - PCI Root Port Surprise Remove Test (PCI devices only) (Reliability)
14 CM_PROB_NEED_RESTART DF - PNP Remove Device Test (Reliability)
DF - PNP DIF Remove Device Test (Reliability)
28 CM_PROB_FAILED_INSTALL DF - PNP DIF Remove Device Test (Reliability)
31 CM_PROB_FAILED_ADD DF - PNP DIF Remove Device Test (Reliability)
DF - PNP Disable And Enable Device Test (Reliability)
DF - PNP Rebalance Fail Restart Device Test (Reliability)
DF - PNP Remove Device Test (Reliability)
38 CM_PROB_DRIVER_FAILED_PRIOR_UNLOAD DF - PNP DIF Remove Device Test (Reliability)
39 CM_PROB_DRIVER_FAILED_LOAD DF - PNP DIF Remove Device Test (Reliability)
43 CM_PROB_FAILED_POST_START DF - PNP Cancel Stop Device Test (Reliability)
DF - PNP Cancel Remove Device Test (Reliability)
DF - PNP Rebalance Fail Restart Device Test (Reliability)
DF - PNP Rebalance Request New Resources Device Test (Reliability)
DF - PNP Remove Device Test (Reliability)
DF - Sleep with IO During (Reliability)
52 CM_PROB_UNSIGNED_DRIVER DF - PNP Disable And Enable Device Test (Reliability)

See Device Manager Error Messages for the list of device error codes.

See Device.DevFund tests for the complete list of Device Fundamentals tests.

Step 2: Determine how to configure the test and test machine

After determining which test to run, decide how to configure the test and the test machine to reproduce the error. To see which parameters are supported by each test, click the link for a specific test in the table above. This will describe the test and the options available for that test. For example, some device PnP errors are sporadic. The /testcycles switch can be used with all tests to specify how many times the test should run:

/p:testcycles=10

Running the test with more iterations may increase the likelihood of inducing the device error.

Some tests will cause SetupAPI logs to be generated (e.g. DF - Reinstall with IO Before and After (Reliability).  The test machine can be configured to generate verbose SetupAPI logs.

Step 3: Run the test

These tests can easily be run on the command line or the HLK after setting up an HLK Controller.

Running tests on the command line via te.exe allows for more test options than running the tests via the HLK. For example, the /breakonerror command line parameter causes TAEF to break into the debugger when an error occurs in the test. There are many more command line options which can be supplied to te.exe when running tests on the command line.

Step 4: Debug the issue

There is a lot of help available for investigating device and driver problems. See the troubleshooting documentation for information on reviewing test logs and using the kernel debugger to investigate device and driver problems.