Jim Cromie wrote:
> Jan Kiszka wrote:
>> Jim Cromie wrote:
>>  
>>> ...
>>> just responding to small part now..
>>>
>>> this patch adds switchtest, switchbench (and drops switch) and irqbench.
>>>
>>> each test-prog has a corresponding $XENOT_<progname>
>>> with which you can inject new test arguments individually.
>>> Most of these can be undef'd, except for XENOT_IRQBENCH,
>>> which needs to be set in order for test to run (since the test requires
>>> additional resources, as you noted above)
>>>     
>>
>> I doesn't necessarily require additional parameters (default is the
>> first serial port on PCs).
>>
>> Why not adding a switch to xeno_test instead? Something like "-a
>> <additional-tests>" (e.g. "-a irqbench,whateverbench"). However, please
>> don't forget to document this extension (man page?).
>>
>> Jan
>>
>>   
> several reasons for my preference:
> 
> - xeno-test is already cluttered with options, many of which propagate
> down to tests
> - as more tests are added, more option-clashing is inevitable.
>    this makes pass-downs more complicated.
> - prog-specific options isolate us from option clashes / churn
> - assuming -a <prog>,
>    need to handle multiples on line (I havent done that with shell getopts)
>    I have to wonder if all shells have uniform getopt behavior -
>       we want to work on bash, sh, ash, dash ...

Maybe there are even simpler solutions, but this one seems to be
busybox-safe (sed must be on):

list="a,b,c,d"
for option in `echo $list|sed -e's/,/\n/g'`; do
        case $option in
        a)
                do_this
                ;;
        b)
                do_that
                ;;
        ...
        esac
done

But that's just a suggestion. Your approach is simpler and, given good
documentation, is ok as well.

> - I get to duck the manpage update ;-)

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to