On Sun, Sep 01, 2013 at 03:55:44PM -0500, Charles Steinkuehler wrote:
> I'm hacking a bit on the latency-test script because the default 25 uS
> base thread causes the BeagleBone to hang (typical IRQ latency is 20-80
> uS, so a 25 uS thread is really pushing things).

Yuck.  Should the default base thread be made a configure-time
@SUBSTITUTION@ instead? (renaming latency-test to latency-test.in and
hard-coding a few cases, maybe i386/x86_64 vs everything else)

> Anyway, the documentation indicates usage is:
> 
> Usage: latency-test [base-period [servo-period]]
> 
> ...but if only one period is supplied it replaces the base period and
> not the servo period, ie:
> 
>   latency-test 500us
> 
> ...starts a test with a 500 uS base thread and a 1 mS servo thread.
> 
> So is it the code or the documentation that's wrong?

Confusingly,
    latency-test 2ms
runs a test which claims it is a 1.0ms base thread and a 2.0ms servo
thread.  At least one of these two argument parsing results doesn't match the
docs.

I am fine with the script being changed to act more sanely, possibly
using getopt to parse the arguments (e.g., latency-test -b 25ms -s 1s).
I don't think a lot of scripts are invoking latency-test with arguments,
so we can force them to learn something new if they do.  (stepconf and
pncconf seem to always invoke it without arguments(!))

I also encountered fragility in the argument parsing:

    $ latency-test  2mss
    (standard_in) 1: syntax error
    /usr/src/linuxcnc/scripts/latency-test: line 51: [: : integer expression 
expected
    /usr/src/linuxcnc/scripts/latency-test: line 52: [: : integer expression 
expected
    /usr/src/linuxcnc/scripts/latency-test: line 26: [: : integer expression 
expected
    /usr/src/linuxcnc/scripts/latency-test: line 27: [: : integer expression 
expected
    /usr/src/linuxcnc/scripts/latency-test: line 28: [: : integer expression 
expected
    /usr/src/linuxcnc/scripts/latency-test: line 29: [: : integer expression 
expected
    /usr/src/linuxcnc/scripts/latency-test: line 56: [: -eq: unary operator 
expected
    HAL: ERROR: thread 'fast' not found
    lat.hal:3: addf failed

Looks like some TLC is needed.

Jeff

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to