-
Notifications
You must be signed in to change notification settings - Fork 99
Design Strategy
The strategy of design for NVMe compliance is to create a framework to facilitate an easy interface to create test cases, but still allow the greatest flexibility to inject illegal conditions and states. Testing a hardware API might warrant kernel mode logic to allow the most insight into what is occurring at the hardware level. However, a strict kernel approach has a few inherent complications:
- Kernel mode programming is not very forgiving in that a mistake could cause the kernel to panic.
* Investigating these occurrences is usually not simple. - Not all developers understand the intricacies of kernel mode programming.
- Developing tests still requires a user space application to drive the logic, and to add a test would require that two modules need to be touched.
Therefore this design sought to keep the kernel level modifications to a minimum. And so the kernel component, dnvme, can be thought of as a conduit to pipe functionality to user space where the real orchestration will occur by tnvme. tnvme must then seek to wire functional components together, in effect directing the Device Under Test (DUT) to perform desired actions. The results of those actions are concluded to be either success or failure by tnvme according to the NVMe specifications. The wiring of components boils down to sending IOCTL’s into dnvme.
This user space approach however, will most likely not become the 100% solution, and fail to allow complete testing of NVMe compliance. However it is expected that any possible short coming will be in the minority and a hybrid approach could resolve it. In other words, some tests may have to be located within dnvme, the kernel. They will most likely take the form of canned test cases, be launched by tnvme, and yield a simple success or failure as determined by dnvme. The design of dnvme has tried to address this expectation by modularizing the logic into discrete components. The hope is that the same logical functions can be reused within the kernel to achieve any testing which must be located in dnvme.