LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Testing a Linux kernel module (https://www.linuxquestions.org/questions/linux-newbie-8/testing-a-linux-kernel-module-897751/)

bird234 08-16-2011 11:21 PM

Testing a Linux kernel module
 
I want to test a simple device driver module.

For testing purposes, I know that it is better to use a virtual machine, than loading it in to the original kernel.

My question is, is it 'strictly recommended' that one should try these modules in a virtual machine? Can testing a simple 'hello world' module be harmful? Can anyone give an example situation where it can harm the kernel? Or if anyone has had a bad experience, please share it.

Thanks.

trist007 08-18-2011 12:39 AM

If you're not running any live services on your box, then sure go ahead. If it's just a hello world kernel module then it's no biggie. Worst that can happen, you have to reboot the box, that's it.

I've never had bad experiences other than having to start a new virtual terminal connection. I can't think of a harmful example. You're just loading a kernel module, as opposed to setting it up to load everytime the OS boots, in which case is still solvable via single user mode.

No worries, have fun.

bird234 08-18-2011 06:32 AM

@trist007: Thanks a lot :hattip:


All times are GMT -5. The time now is 10:50 PM.