From: Heikki Lindholm <holindho@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [rfc] unit testing context switches.
Date: Thu, 08 Jun 2006 22:27:27 +0300 [thread overview]
Message-ID: <44887A1F.20003@domain.hid> (raw)
In-Reply-To: <17544.28567.517655.60691@domain.hid>
Gilles Chanteperdrix kirjoitti:
> Heikki Lindholm wrote:
> > Gilles Chanteperdrix kirjoitti:
> > > Jan Kiszka wrote:
> > > > Gilles Chanteperdrix wrote:
> > > > > --- /dev/null 2006-05-03 22:25:59.000000000 +0200
> > > > > +++ include/rtdm/rttesting.h 2006-06-07 18:50:14.000000000 +0200
> > > > > @@ -0,0 +1,188 @@
> > > > ...
> > > > > + *
> > > > > + * @{
> > > > > + */
> > > > > +
> > > > > +#ifndef _RTBENCHMARK_H
> > > > > +#define _RTBENCHMARK_H
> > > >
> > > > Hmm, there might be further renamings required. Could you double-check
> > > > (e.g. grep -ri benchmark)?
> > >
> > > This particular define should be fixed in the version that I commited.
> > >
> > > I also put dummy asm/fptest.h for all other architectures than x86, I
> > > would now need volunteers with other hardware than x86 to implement
> > > asm/fptest.h for their platform and run the test.
> > >
> > > A little explanation of what work should be done: two functions
> > > fp_regs_set and fp_regs_check should be implemented. fp_regs_set should
> > > set all fp registers to the integer value passed as
> > > argument. fp_regs_check should check that all fp registers are set to
> > > the integer value passed as argument, print the incorrect registers if
> > > any and return 1 if some register value is incorrect.
> >
> > IMO setting every reg to a different value would be better, or like I
> > did, calculate some value using every reg and only check the final
> > result. That would also make pointer (to the fpu save area)
> > corruptions/miscalculations and interruptions to the fpu save/restore
> > routines better visible.
>
> Every register is set to a different value by every task, so if
> something goes wrong, it will not get unnoticed. Checking only a final
> result will not tell you which context was badly switched, whereas the
Yes, and checking final result is more cumbersome, because the result
might not be the same on all cpu implementations/modes - one would have
to precalculate the correct answer once.
> current approach will, and will also tell you where the erroneous
> register come from.
Good point.
One more thing though: Having always the same values doesn't tell if the
task's state is overwritten with some "older generation" of its state or
something odd like that. The state-saving will only need to work once
and if it sucks rest of the time nobody knows. Or was that accounted for
in the code? (Didn't read it all that carefully, lazy me)
-- hl
next prev parent reply other threads:[~2006-06-08 19:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-02 20:20 [Xenomai-core] [rfc] unit testing context switches Gilles Chanteperdrix
2006-06-02 23:50 ` Jim Cromie
2006-06-03 7:13 ` Heikki Lindholm
2006-06-03 16:46 ` Gilles Chanteperdrix
2006-06-03 17:26 ` Gilles Chanteperdrix
2006-06-03 20:16 ` Heikki Lindholm
2006-06-04 12:58 ` Gilles Chanteperdrix
2006-06-04 13:47 ` Heikki Lindholm
2006-06-04 17:48 ` Gilles Chanteperdrix
2006-06-04 18:19 ` Heikki Lindholm
2006-06-03 8:04 ` Jan Kiszka
2006-06-07 18:00 ` Gilles Chanteperdrix
2006-06-07 18:25 ` Jan Kiszka
2006-06-07 18:30 ` Philippe Gerum
2006-06-07 18:42 ` Jan Kiszka
2006-06-08 12:28 ` Gilles Chanteperdrix
2006-06-08 17:35 ` Heikki Lindholm
2006-06-08 18:42 ` Gilles Chanteperdrix
2006-06-08 19:27 ` Heikki Lindholm [this message]
2006-06-08 20:44 ` 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=44887A1F.20003@domain.hid \
--to=holindho@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--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.