[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[LTP] Fixing up command line options
I have been working on the command line options and help system for the
quick-hitter tests. The current state is pretty sick according to GNU
standards. The current options are multi-character options with a
single dash. The -Help option really bothers me too. So here is what
I've done, but not integrated.
- I decided to throw out the idea of mc_getopts() and use just getopt()
for single character options. This is portable and simple. We aren't
using that many options anyway.
- parse_opts uses a usage and a help system. Only four tests (including
everything in the internal SGI test system) modify the usage help.
I'm going to remove the usage part. If we want it, I'll probably hack
up a routine to make it dynamically. Many tests add their own -h help
option (-H show standard options). I'm going to change it so the
standard options use -h and add a function to register a user_help
function to add user define help strings. Since a small number of
tests add options other than another help screen, this should have
- I have translated the options this way:
-nofunc -f Turn off functional testing
-iterations -i Run n iterations
-duration -I Run for x seconds
-delay -P Pause n seconds between iterations
-timing -t Turn on syscall timing
-errno_logging -e Turn on errno logging
-pause_for_sigusr1 -p Pause for SIGUSR1
-copies -c Run x copies concurrently
-Help -h Help message
- I haven't touched the environment variable handling yet. I probably
This should give the tests a cleaner look and feel. While this doesn't
change the functionality of the tests, it makes the code easier to
maintain and reduces the baggage we're bringing along.
Comments are welcome.
Nate Straz email@example.com
sgi, inc http://www.sgi.com/
Linux Test Project http://oss.sgi.com/projects/ltp/