In the Linux kernel, SCSI storage drivers are maintained as three different levels. Since Low Level Drivers (LLDs) are hardware specific, they are predominantly developed by hardware vendors only. Thus, LLDs are highly error prone compared to other parts of the SCSI stack. While a few tools exist to test upper and middle levels, there is no tool available to assist developers in verifying the functionality of LLDs at the unit level.
We develop a framework for LLD developers for testing code at the function and unit level. The framework, LDTT is a kernel module with a helper application. LDTT allows LLD writers and designers to develop test cases that can interface between the kernel and device levels, which cannot be accessed by traditional testing frameworks. We demonstrate that LDTT can be used to write test cases for LLDs and that LLD-specific bugs can be detected by these test cases.