From: Robert Williamson <robbiew@us...> - 2002-02-19 19:18:09
I just updated the pan.c file with enhancements for controlling how long
tests should be ran. There are two mechanisms to halt the execution of the
run after a certain period of time. These methods are complimentary:
External: The PAN_STOP_FILE file can be used to stop all tests. This
file is only checked for if pan is set to run for an indefinite amount of
time (-s 0) or if (-t #) is set. This should be a useful trigger for
stopping on error. I.e Perform a 'touch' on
/tmp/runalltests-1234/PAN_STOP_FILE, and ALL testing relevant to the pan
process 1234 will stop after the next loop.
Internal: Addition of -t #s|m|h|d option, where # can be 90s or
100m or 3d or even 2h (seconds, minutes, days, hours, etc). This -t flag
will also set the # of starts (the -s flag) to be 0 (forever). Since
running for an amount of time assumes you want to do as many passes as
possible during that time. The alarm(#) function is used to trigger a
SIGALRM, which the generic signal handler catches, and then will get passed
to the child processes. This SIGALRM is translated into a SIGTERM in
propogate_signal() and thus will causes the test to shutdown.
I also updated the manpage on pan (pan.1) to document these enhancements.
Great thanks to our colleague, Jay Huie, for adding these enhancements to
Robert V. Williamson
Linux Test Project
IBM Linux Technology Center
Phone: (512) 838-9295 T/L: 638-9295