stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Black <>
Subject Re: exec util testing commands [patch]
Date Tue, 01 Aug 2006 16:02:30 GMT
Greetings all.

Attached is a replacement patch for the one in the previous email, with 
a minor fix.  This replacement fixes a bug in the --sleep switch, and a 
similar bug in the --signal switch. (The switches were producing an 
'unknown option' message after completing their actions. This probably 
didn't matter for the --signal switch, as the flow usually wouldn't 
reach that point, but it did matter for the --sleep switch)

--Andrew Black

Andrew Black wrote:
> Greetings all
> One thing that is needed is a method of testing the exec utility.  This 
> patch provides a step towards this goal by adding several command line 
> switches.  The majority of these switches allow the utility to function 
> as a test target which will produce certain (controlled) behavior.  The 
> behavior needed includes exiting with a particular status or signal, 
> masking (ignoring) a particular signal, and sleeping a certain amount of 
> time.
> The -v switch increases the value of the verbosity counter variable
> The -q switch sets the value of the verbosity counter variable to 0
> The --exit switch causes the utility to exit with the value specified. 
> The --sleep switch causes the utility to sleep for the number of seconds 
> specified.
> The --signal switch causes the utility to send itself the signal 
> name/number specified.
> The --ignore switch causes the utility to ignore the signal name/number 
> specified.
> --Andrew Black
> Log:
> 2006-08-01 Andrew Black <>
>     * exec.h (get_signo): Define macro for signal name to number conversion
>     * exec.cpp (get_signo): Implementation
>     * exec.cpp (signal_names): moved lookup table out of get_signame to 
> file scope
>     * cmdopt.h (verbose): Define global
>     * cmdopt.cpp (verbose): Instantiate global
>     * cmdopt.cpp (get_short_val, get_long_val, bad_option): Add helper 
> functions for option parsing
>     * cmdopt.cpp (eval_options): Use new functions, add -v, -q, --exit, 
> --sleep, --signal, --ignore switches

View raw message