tHeDoc Project Maintener

Joined: 21 Apr 2004 Posts: 237 Location: Echirolles, France
|
Posted: Thu Jul 29, 2004 2:59 pm Post subject: timeout script |
|
|
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).
| 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: |
1579 Time(s) |
_________________ Sebastien Decugis.
Last edited by tHeDoc on Thu Aug 05, 2004 2:18 pm; edited 1 time in total |
|
tHeDoc Project Maintener

Joined: 21 Apr 2004 Posts: 237 Location: Echirolles, France
|
Posted: Tue Aug 03, 2004 3:39 pm Post subject: Application to Open POSIX Test Suite |
|
|
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
| 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. |
|