Print Driver DevMode Corruptor Test
This automated test uses good and bad DEVMODE structures to make sure that the driver gracefully handles bad data. This test is not meant to have output evaluated.
Test details
Specifications |
|
Platforms |
|
Supported Releases |
|
Expected run time (in minutes) | 240 |
Category | Scenario |
Timeout (in minutes) | 14400 |
Requires reboot | false |
Requires special configuration | false |
Type | automatic |
Additional documentation
Tests in this feature area might have additional documentation, including prerequisites, setup, and troubleshooting information, that can be found in the following topic(s):
Running the test
Before you run the test, complete the test setup as described in the test requirements: Printer Testing Prerequisites.
Note
This test must be run from an AppVerifier environment that has NTSD debugging enabled. The test uses the following Windows HLK library test jobs to run this test with a null port and then automatically restore the printer port:
Add NullPortMonitor and switch port
Restore port and delete NullPortMonitor
Troubleshooting
For generic troubleshooting of HLK test failures, see Troubleshooting Windows HLK Test Failures.
For troubleshooting information, see Troubleshooting Device.Imaging Testing.
Failure of this test can be identified if the debugger breaks in, UI is displayed in the spooler process, the test halts for any reason or the log file indicates a failure.
The following are the log files for this test:
DevmodeCorrupt.xml
DevModeCorruptor_DeviceLogger.xml
More information
The primary way for applications and users to specify print job settings to the print subsystem is by using the DEVMODE structure. The print subsystem treats the DEVMODE structure as untrusted because the DEVMODE structure originates from outside the print subsystem. The printer drivers often access this data structure as well.
This test does not require a printer to be physically attached to the test computer. The test may be run with a null port.
The Print Driver Devmode Corruptor test tool exercises fault injection in the driver-related code paths in the print subsystem to make sure that the driver is robust enough to handle corrupted DEVMODE structures.
This test can generate large quantities of output. You can ignore and discard this output. You can also make sure that this test prints to a NULL port printer to avoid the physical output.
You can run this test manually by typing the following command at a command prompt:
DevModeCorruptW.exe /printer="<printername>" /stress /Logfile=DevmodeCorrupt.xml /timetorun=4
Parameters
Parameter name | Parameter description |
---|---|
LLU_NetAccessOnly | Logical Local User: Network Access only. |
TestExecutable Name | Test Executable name. |
WDKPrinterName | Printer name. |