LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-17-2009, 03:10 PM   #1
nickolais
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 1
How to test driver resilience with down_interruptible( )?


Hello,
I have written a driver and have used down( ) for my mutexes instead of down_interruptible( ). After talking with a customer I learned that down_interruptible( ) is preferred and allows an application to recover from errors such as segmentation faults.

Now that I have refactored my program to use down_interruptible( ), how should I generate signals to exercise the failure paths of my code.

For instance in my code I have lines such as:

Code:
    if (down_interruptible(&dev->sem)) {
        ... do some cleanup  //want to test these lines
        return -ERESTARTSYS;      
    }
One thought I have had is to spin a seperate thread that sends signals to another thread that uses my driver and see if all is handled well. Does anyone else have any good ideas for testing driver resilience?

Thanks in advance.
 
  


Reply

Tags
mutex, signal, signal handler


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: New Test Release Of Intel X.Org 2.7 Driver LXer Syndicated Linux News 0 04-11-2009 10:50 AM
How to test Video Driver & Audio Driver ? Mel_3 Linux - Newbie 1 11-08-2007 01:49 PM
how to test a simple char driver in FC5? agpperera Linux - Newbie 2 10-17-2007 01:16 AM
USB Driver Test kennithwang Linux - Kernel 0 09-13-2007 08:08 PM
Fedora Core 2 test and ATI driver problems IgD Linux - Hardware 1 03-14-2004 04:00 AM


All times are GMT -5. The time now is 02:17 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration