From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Bastian Krause <bst@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH 2/4] test: bthread: change comparison condition for switches vs. yields
Date: Tue, 1 Apr 2025 11:34:11 +0200 [thread overview]
Message-ID: <e70e38c5-92f4-45d1-97db-4c0fca4dc4f2@pengutronix.de> (raw)
In-Reply-To: <46a84f2b-1b33-4da8-ae60-a02551d18da0@pengutronix.de>
Hello Bastian,
On 4/1/25 10:53, Bastian Krause wrote:
> Hi Ahmad,
>
> On 3/27/25 3:47 PM, Ahmad Fatoum wrote:
>> The code was written with the assumption that isolated yields from test
>> thread to main thread and back will always be at least as fast as
>> unrestricted scheduling.
>>
>> This assumption held so far, but breaks down in sandbox, because it's
>> highly influenced by the system's CPU pressure.
>>
>> Just check that we can schedule @1000Hz at least in both cases.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>> test/py/test_bthread.py | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/test/py/test_bthread.py b/test/py/test_bthread.py
>> index 6e7b4ba5007e..84fb9f830b0c 100644
>> --- a/test/py/test_bthread.py
>> +++ b/test/py/test_bthread.py
>> @@ -20,4 +20,5 @@ def test_bthread(barebox, barebox_config):
>> switches = int(barebox.run_check("bthread -c")[0].split()[0])
>> yields = int(barebox.run_check("bthread -t")[0].split()[0])
>> - assert yields < switches
>> + assert yields > 1000
>> + assert yields > 1000
>
> I guess one of these asserts should involve "switches", right?
You guessed exactly right. I Cc'd you on the fixup.
Thanks,
Ahmad
>
> Regards,
> Bastian
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2025-04-01 10:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-27 14:47 [PATCH 0/4] ci: fix sandbox allyesconfig build Ahmad Fatoum
2025-03-27 14:47 ` [PATCH 1/4] sandbox: env: switch from CONFIG_DEFAULT_ENVIRONMENT_PATH to bbenv-y Ahmad Fatoum
2025-03-27 14:47 ` [PATCH 2/4] test: bthread: change comparison condition for switches vs. yields Ahmad Fatoum
2025-04-01 8:53 ` Bastian Krause
2025-04-01 9:34 ` Ahmad Fatoum [this message]
2025-04-01 9:42 ` Bastian Krause
2025-03-27 14:47 ` [PATCH 3/4] ci: pytest: rename build directories Ahmad Fatoum
2025-03-27 14:47 ` [PATCH 4/4] ci: pytest: enable console and libc allocator for allyesconfig Ahmad Fatoum
2025-03-31 7:08 ` [PATCH 0/4] ci: fix sandbox allyesconfig build Sascha Hauer
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=e70e38c5-92f4-45d1-97db-4c0fca4dc4f2@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=bst@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox