i want to write a module which tests a device driver. I want my testing program to sit in the kernel space. For example i am writing test code for testing a flash which has read and write operations. I want my code to be such that,when i insert my module the testing should start automatically and i have to store the log in a file. Please provide some good ideas to do this.