I attached to this mail a little utility which will force a timeout in
any application. The usage is very simple, you just run:
$ ./t0 15 <command> <args>
$ <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. I think this could be a great
addition to the framework of the testsuite, to add a call to t0 (with
for example 10 minutes of timeout) and to be able to catch when a test
was killed before completion, and report HANG status.
The code of t0.c is POSIX, so it should work on any compliant platform
(tested with Linux and AIX).
$ ./t0 N <commandline>
is executed, the system behaves as if only <commandline> had been called
(ex: the 'ps' utility).
Please give me your feedback about this utility, and let me know if it's
worth I try to integrate it inside the test framework.
NPTL Test & Trace Project
Get latest updates about Open Source Projects, Conferences and News.