All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Bolli SPES <luca.bolli@spesonline.com>
To: xenomai@xenomai.org
Subject: [Xenomai] help for cyclictest
Date: Fri, 19 Jul 2013 14:09:24 +0200	[thread overview]
Message-ID: <51E92C74.4000207@spesonline.com> (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



-- 

*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

luca.bolli@spesonline.com <mailto:luca.bolli@spesonline.com>
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>

             reply	other threads:[~2013-07-19 12:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19 12:09 Luca Bolli SPES [this message]
2013-07-19 17:10 ` [Xenomai] help for cyclictest Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51E92C74.4000207@spesonline.com \
    --to=luca.bolli@spesonline.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.