nptl.BullOpenSource.Org Forum Index nptl.BullOpenSource.Org
NPTL Tests & Trace project. Homepage.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

timeout script

 
Post new topic   Reply to topic    nptl.BullOpenSource.Org Forum Index -> Tests - General
View previous topic :: View next topic  
Author Message
tHeDoc
Project Maintener


Joined: 21 Apr 2004
Posts: 237
Location: Echirolles, France

PostPosted: Thu Jul 29, 2004 2:59 pm    Post subject: timeout script Reply with quote

I just wrote a little utility which will force a timeout in
any application. The usage is very simple, you just run:
$ ./t0 15 <command> <args>

instead of
$ <command> <args>

The first line is equivalent to the second, with the addition of a call
to alarm(15) being added in the beginning of the <command> entry point.

This utility can be very usefull to avoid hangs in any tests, without
having to modify every source files.

The code of t0.c is POSIX, so it should work on any compliant platform
(tested with Linux and AIX).

When
$ ./t0 N <commandline>
is executed, the system behaves as if only <commandline> had been called
(ex: the 'ps' utility).



t0.tar.gz
 Description:
This source code is released under the GPL licence. Feel free to use it.

Download
 Filename:  t0.tar.gz
 Filesize:  7.64 KB
 Downloaded:  1578 Time(s)


_________________
Sebastien Decugis.


Last edited by tHeDoc on Thu Aug 05, 2004 2:18 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tHeDoc
Project Maintener


Joined: 21 Apr 2004
Posts: 237
Location: Echirolles, France

PostPosted: Tue Aug 03, 2004 3:39 pm    Post subject: Application to Open POSIX Test Suite Reply with quote

Here is a patch to the Open POSIX Test Suite, which will make use of the timeout utility into the Makefile.

The result will look like this:
conformance/interfaces/pthread_mutex_lock/3-1: execution: PASS
conformance/interfaces/pthread_mutex_lock/4-1: execution: HANG
conformance/interfaces/pthread_mutex_lock/2-1: execution: PASS
conformance/interfaces/pthread_mutex_lock/1-1: execution: PASS
conformance/interfaces/pthread_mutex_lock/5-1: execution: PASS



pts_timeout.patch.gz
 Description:
Patch to apply to the posixtestsuite root. This patch will:
-> add the t0.c source file
-> mod the Makefile to compile and make use of the t0 utility.

Download
 Filename:  pts_timeout.patch.gz
 Filesize:  2.31 KB
 Downloaded:  1474 Time(s)


_________________
Sebastien Decugis.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nptl.BullOpenSource.Org Forum Index -> Tests - General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group