Skip to contentSkip to conversation

help for cyclictest

Xenomai Luca Bolli SPES 2 participants 2 messages Jul 19, 2013

lore
Share & tools
lore
#0 lore raw

Good morning at all, I'm new in this mailing list so in first time I will apologize for any mistake that I'll do. Recently I realized a toolchain for an ARM9 AT91 based (kernel 3.0.36, gcc 4.6.3, libc 2.13) and I successfully ported the latest version of Xenomai (2.6.2.1).
The cross-compiled kernel (and patched with adeos-ipipe-3.0.36-arm-1.18-11.patch) starts without errors. After this, I'll try to run some tests with cyclictest that I compiled, with the same toolchain and with this options (passed to configure tool):
configure CFLAGS="-march=armv4t" LDFLAGS="-march=armv4t" --build=i686-pc-linux-gnu --host=arm-<vendor>-linux-gnueabi-

When I started to carry out my tests, I noticed a strange behavior of cyclictest software and I used this option for launch the tests: cyclictest -t 2 - p 80 -n -i 10000 -l 10000 -v

The problem is that with more 1 thread the cyclictest never end, and remain in running state even if the test is completed.

This is the code of main in cyclictest (xenomai-2.6.2.1/src/testsuite/cyclic):

    while (!test_shutdown) {
        char lavg[256];
        int fd, len, allstopped;

        if (!verbose && !quiet) {
            fd = open("/proc/loadavg", O_RDONLY, 0666);
            len = read(fd, &lavg, 255);
            close(fd);
            lavg[len-1] = 0x0;
            printf("%s          \n\n", lavg);
        }

        allstopped = max_cycles ? 1 : 0;

        for (i = 0; i < num_threads; i++) {
            print_stat(&par[i], i, verbose);
            if (stat[i].cycles < max_cycles)
                allstopped = 0;
        }
        usleep(10000);
        if (test_shutdown || allstopped == num_threads)
            break;
        if (!verbose && !quiet)
            printf("\033[%dA", num_threads + 2);
    }

I think that the "break condition" for exit by the while(!test_shutdown) is wrong, in fact while the test_shutdown is used to catch the sighand interaction (ctrl +c for stop the process), the variable allstopped is always 0 or 1, and for more 1 thread will have no value greater than 1 and the conditions allstopped == num_threads will never be satisfied.

I don't know if there are any explanations for this apparent error... so I decide to write to this ML. (Maybe there aren't any reasons to use cyclictest with more 1 thread... )

I hope that the problem is clear, otherwise please don't hesitate to ask me for more. explanations.

Thak you all for any help,

Kind reagards

Luca Bolli

Signature · 20 lines
*Luca Bolli*
Embedded Software Designer

*SPES. S.c.p.a*
Via Lamberto Corsi, 43 60044 Fabriano (AN)
tel +39 0732 2529 440
fax +39 0732 2529 441

[email protected] <mailto:[email protected]>
http://www.spesonline.com

logo Spes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: luca_bolli.vcf
Type: text/x-vcard
Size: 296 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130719/9aa4c5f3/attachment.vcf>
#1 lore raw
Quoted 15 lines · Luca Bolli SPES

Good morning at all, I'm new in this mailing list so in first time I will apologize for any mistake that
I'll do. Recently I realized a toolchain for an ARM9 AT91 based (kernel 3.0.36, gcc 4.6.3, libc 2.13)
and I successfully ported the latest version of Xenomai (2.6.2.1). The cross-compiled kernel (and patched with adeos-ipipe-3.0.36-arm-1.18-11.patch) starts without
errors. After this, I'll try to run some tests with cyclictest that I compiled, with the same toolchain
and with this options (passed to configure tool):
configure CFLAGS="-march=armv4t" LDFLAGS="-march=armv4t" --build=i686-pc-linux-gnu
--host=arm-<vendor>-linux-gnueabi-

Quoted 4 lines

When I started to carry out my tests, I noticed a strange behavior of cyclictest software and
I used this option for launch the tests: cyclictest -t 2 - p 80 -n -i 10000 -l 10000 -v

Hi,

cyclictest is not a xenomai specific tool, and hence not maintained by the Xenomai project. If a more recent version has important fixes you need, we will simply update cyclictest. If you are interesting in measuring the jitter of your system, you may use the "latency" test instead.

Regards.

Signature · 1 line
                                                                Gilles.