LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-22-2007, 10:30 PM   #1
dreams
Member
 
Registered: Oct 2005
Location: Beijing, China
Distribution: ubuntu 7.04, Mandriva 2007.0
Posts: 39

Rep: Reputation: 15
Are there some ways to discover the kernel problem?


hello, everyone,

I have developed a module and want to test it whether it is rubust or not, or want to see whether it works well with linux kernel or not. but I don't know how to test it.

I've run "crashme" which is a component of "ltp", but no useful messages showed up to me. so

Are there some good methods to test my modules and the kernel?
Thanks a lot indeed!

-dreams
 
Old 04-22-2007, 11:22 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
One simple test is load and unload it in a loop, to find race conditions and other errors:

Code:
while true
do
   /sbin/modprobe -r testmodule
   /sbin/modprobe testmodule
   /bin/sleep .$RANDOM
done
 
Old 04-23-2007, 12:35 AM   #3
dreams
Member
 
Registered: Oct 2005
Location: Beijing, China
Distribution: ubuntu 7.04, Mandriva 2007.0
Posts: 39

Original Poster
Rep: Reputation: 15
thank you very much, macemoneta.
your idea is great, and i've learn a lot from that

and do you have any ideas to have a stress test to kernel? except ltp of course.

i appreciated
 
Old 04-23-2007, 12:45 AM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The entire kernel? Even ltp, with almost 3000 test programs, only covers a small portion of the kernel instruction paths.

You need to define your testing requirements more stringently.
 
Old 04-23-2007, 04:00 AM   #5
dreams
Member
 
Registered: Oct 2005
Location: Beijing, China
Distribution: ubuntu 7.04, Mandriva 2007.0
Posts: 39

Original Poster
Rep: Reputation: 15
thank u for ur reply again, macemoneta
I'd like to test entire kernel, ltp only test it, but don't show more useful info, or messages to me. And the testcases of ltp are hardcoded, For example, it use vixie-cron, and to find "/etc/cron.d/cron.weekly" directory, but I use fcron, and there is not a "/etc/cron.d/cron.weekly" directory in my "/etc", so i should alter the source code, and so on.

Do you have any good suggestions for me ?
Thank you so much.
 
Old 04-23-2007, 04:22 AM   #6
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 187

Rep: Reputation: 74
What particular area of the kernel are you attempting to test?

If it has to do with networking, you could whip up a random payload script to spam the machine with different protocols/payloads/etc... and observe for stability issues.

If it's disk io, you could always whip up a script to intentionally attempt to break permissions and do large numbers of heavy reads/writes (i.e. move a DVD image from partition to partition).

Or perhaps memory management issues?

Or threading?

There are a billion different routes to test (as macemoneta has stated previously)...so what kind of module are you testing?

Last edited by rocket357; 04-23-2007 at 04:23 AM.
 
Old 04-24-2007, 05:31 AM   #7
dreams
Member
 
Registered: Oct 2005
Location: Beijing, China
Distribution: ubuntu 7.04, Mandriva 2007.0
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks rocket357,

As you said, I would like to test entire kernel, such as networking, disk io, threading, memory management and so on.

And I know LTP is a good tools to test all the aspests above, But, is there any aternative existed? In other words, LTP is not perfectly suit my system, or meet my needs.



- dreams
 
Old 04-24-2007, 08:08 AM   #8
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
If you are going to use LTP, you need to configure your system for testing. In this case, you build a machine to suit the application, not the other way around. In fact, it's physically impossible to test the entire kernel on a single platform; you would need several dozen machines for each architecture, just for the hardware diversity to exercise different instruction paths.

You could re-write the tests that would have a problem with your configuration. If you are considering that, why not join the Linux Test Project, and contribute your changes back into the base?
 
Old 04-24-2007, 10:12 AM   #9
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 187

Rep: Reputation: 74
Quote:
Originally Posted by dreams
And I know LTP is a good tools to test all the aspests above, But, is there any aternative existed? In other words, LTP is not perfectly suit my system, or meet my needs.



- dreams
I agree with macemoneta, you can probably find a test project out there somewhere that you can use as a starting point to test your system.

Are you a programmer? Just curious.

And again, as macemoneta stated, please contribute any improvements you make (even if you just modify a few test cases to suit your needs better)...it'll make the community stronger as a whole.

And, should you decide to create your own test framework, make it available so others can benefit from it as well. A common misconception about software is that it needs to be "polished" and "finished" when released...but in the open source world the exact opposite is typically the case (release early, release often). This allows others to examine your code and assist with ideas, design, patches, etc...and makes the project stronger that it would be otherwise.
 
Old 04-24-2007, 09:23 PM   #10
dreams
Member
 
Registered: Oct 2005
Location: Beijing, China
Distribution: ubuntu 7.04, Mandriva 2007.0
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks both you guys , and thanks your suggestions

It's a pity that I'm not a programmer, but I had contributed a patch to LTP, but they don't applied.

I absolutely agree with what both you guys said, and I promise if I write a new program or make some advance improvements, I'll contribute it to upstream
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't discover bluetooth pc. Guitarist88 Linux - Hardware 3 03-12-2007 01:44 PM
cannot dhcp discover after updating kernel, hangs on inetd precision Debian 0 06-04-2006 09:58 PM
Problem with DHCP discover mavinac Linux - Networking 1 04-28-2005 07:27 AM
Compiling discover-2.0.1 Crazed123 Linux - Software 0 12-06-2003 11:05 PM
how to discover essid penguinview Linux - Networking 4 07-14-2003 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration