Delen via


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

Associated requirements

Device.Imaging.Printer.Base.applicationVerifier

See the device hardware requirements.

Platforms

Windows 7 (x64) Windows 7 (x86) Windows 8 (x64) Windows 8 (x86) Windows Server 2012 (x64) Windows Server 2008 R2 (x64) Windows 8.1 x64 Windows 8.1 x86 Windows Server 2012 R2

Expected run time

~240 minutes

Categories

Certification Reliability

Type

Automated

 

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 HCK 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 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

 

 

Send comments about this topic to Microsoft