Книга: Writing Windows WDM Device Drivers
Test, Test, Test
Test, Test, Test
Developers usually want to start debugging only when they suspect something has gone wrong with their software. However, it is especially important to start work early with device drivers. Even if you think a driver is doing its job, check it thoroughly. Do not get a first cut working and ship it to customers immediately.
Here is an example of a situation where I did not test code properly. When developing the DebugPrint software, I needed to implement a formatted print function. I could not use sprintf, as this function might use facilities that are not available to kernel mode drivers.
To make things simple, I developed the routines in a Win32 program and got them working. I copied the source over to the DebugPrint driver. A quick test seemed to indicate that it worked OK. In fact, I had changed something and so my handling of ellipsis arguments went wrong (passing a variable number of arguments to a function). By a complete fluke, one of the simple tests I inserted did get the correct information from the stack. It took a while to realize the error of my ways.
- rc.test-iptables.txt
- Example rc.test-iptables script
- Testing the Project
- Testing Wdm2 Power Capabilities
- Test Driver Code
- Тестовые данные (Test Data)
- Testing Samba with the testparm Command
- Creating a File System for Testing
- Testing the Program
- Testing the Project
- I.6. Пример rc.test-iptables
- Testing a Firewall Configuration