From: Philippe Gerum <rpm@xenomai.org>
To: "Bezdeka, Florian" <florian.bezdeka@siemens.com>
Cc: "richard@nod.at" <richard@nod.at>, xenomai@xenomai.org
Subject: Re: [PATCH 3/6] testsuite: Add a simple test driver for alchemytests
Date: Fri, 08 Apr 2022 12:34:09 +0200 [thread overview]
Message-ID: <87v8vjonxz.fsf@xenomai.org> (raw)
In-Reply-To: <7aa1e2f14db4438eeae8225d143c1836aee42879.camel@siemens.com>
"Bezdeka, Florian via Xenomai" <xenomai@xenomai.org> writes:
> Hi Richard,
>
> On Fri, 2022-04-08 at 10:03 +0200, Richard Weinberger via Xenomai
> wrote:
>> +static int __run_extprog(struct smokey_test *t, int argc, char *const argv[])
>> +{
>> + int ret;
>> + char *tst_path;
>> +
>> + ret = asprintf(&tst_path, "%s/%s --cpu-affinity=0", mydir, t->name);
>> + if (ret == -1)
>> + return -ENOMEM;
>
> Why is this "special" cpu-affinity necessary? What would happen if we
> remove that? Asking because I want to make sure that we do not miss any
> concurrency problems by adding this constraint.
>
The reason to pin the threads on the same CPU is to guarantee an ideal
execution sequence for some tests provided the scheduling policy and/or
the synchronization mechanisms do behave as intended. Concurrency on
multiple CPU would break the assumptions about that ideal sequence.
For instance, you could not resort to any inter-thread synchronization
to prevent unwanted SMP concurrency when checking that a scheduling
policy is properly undergone, that would make the test irrelevant by
papering over local preemption issues if any. So we pin all the threads
on the same CPU to exclude SMP, and only that.
--
Philippe.
next prev parent reply other threads:[~2022-04-08 10:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 8:03 [PATCH 0/6] Revive alchemy tests Richard Weinberger
2022-04-08 8:03 ` [PATCH 1/6] testsuite: Move alchemy tests into testsuite/ Richard Weinberger
2022-04-08 8:03 ` [PATCH 2/6] testsuite: Hook up alchemytests Richard Weinberger
2022-04-14 11:12 ` Jan Kiszka
2022-04-14 11:17 ` Richard Weinberger
2022-04-14 11:27 ` Jan Kiszka
2022-04-14 11:32 ` Richard Weinberger
2022-04-08 8:03 ` [PATCH 3/6] testsuite: Add a simple test driver for alchemytests Richard Weinberger
2022-04-08 9:11 ` Bezdeka, Florian
2022-04-08 9:19 ` Richard Weinberger
2022-04-08 10:34 ` Philippe Gerum [this message]
2022-04-08 10:49 ` Richard Weinberger
2022-04-08 12:01 ` Philippe Gerum
2022-04-08 12:11 ` Richard Weinberger
2022-04-08 8:03 ` [PATCH 4/6] Remove old alchemy tests Makefile Richard Weinberger
2022-04-08 8:04 ` [PATCH 5/6] alchemytests: Fix gcc warning in buffer-1 Richard Weinberger
2022-04-08 8:04 ` [PATCH 6/6] alchemytests: Fix gcc warning in task-9 Richard Weinberger
2022-04-13 12:56 ` [PATCH 0/6] Revive alchemy tests Jan Kiszka
2022-04-13 14:14 ` Richard Weinberger
2022-04-13 18:58 ` Jan Kiszka
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=87v8vjonxz.fsf@xenomai.org \
--to=rpm@xenomai.org \
--cc=florian.bezdeka@siemens.com \
--cc=richard@nod.at \
--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.