A system and method are disclosed for testing a device driver on a data processing
system. An operating system allocates a memory address range for executing a device
driver. The device driver is executed as an application on top of the operating
system to test the device driver. The system and method monitor to detect whether
a target address for a request made by the device driver is within the memory address
range. In response to detecting the target address for the request being made outside
of the memory address range, the target address is trapped, and a data exception
handler is executed to emulate a target device.