mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: "Mark Brown" <broonie@kernel.org>,
	"'Thomas Weißschuh'" <linux@weissschuh.net>,
	"Willy Tarreau" <w@1wt.eu>
Cc: linux-kernel@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	kernel-dev@igalia.com,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH] tools/nolibc: Add stdbool.h to nolibc includes
Date: Thu, 25 Sep 2025 11:37:39 -0300	[thread overview]
Message-ID: <440c9205-187e-45c1-8cc9-8083b64dadfc@igalia.com> (raw)
In-Reply-To: <64c56cf3-90ad-428a-9a14-64928771f9fc@sirena.org.uk>

Hi Mark,

Em 25/09/2025 11:24, Mark Brown escreveu:
> On Thu, Sep 25, 2025 at 11:14:23AM -0300, André Almeida wrote:
>> Add stdbool.h to the list of nolibc.h includes, otherwise tests compiled
>> with -nostdlib will fail with "error: unknown type name 'bool'", even if
>> a nolibc stdbool implementation is available at tools/include/nolibc/.
>>
>> Reported-by: Mark Brown <broonie@kernel.org>
>> Closes: https://lore.kernel.org/lkml/833f5ae5-190e-47ec-9ad9-127ad166c80c@sirena.org.uk/
>> Signed-off-by: André Almeida <andrealmeid@igalia.com>
> 
> Fixes: f2662ec26b26 ("selftests: kselftest: Create ksft_print_dbg_msg()")
> 
>> ---
>>   tools/include/nolibc/nolibc.h | 1 +
>>   1 file changed, 1 insertion(+)
> 
>> --- a/tools/include/nolibc/nolibc.h
>> +++ b/tools/include/nolibc/nolibc.h
>> @@ -116,6 +116,7 @@
>>   #include "sched.h"
>>   #include "signal.h"
>>   #include "unistd.h"
>> +#include "stdbool.h"
>>   #include "stdio.h"
>>   #include "stdlib.h"
>>   #include "string.h"
> 
> It's not 100% clear to me that we should add this to the nolibc
> includes given that nolibc itself does not rely on or offer stdbool -
> I was going to send something out adjusting kselftest.h to unguard the
> include there.

If we don't include stdbool.h here, it looks like 
tools/include/nolibc/stdbool.h cannot be used by any test, and 
unguarding <stdbool.h> would defeat the purpose of using -nolibc?

I'm also not 100% sure as well, lets see if Thomas or Willy can shine a 
light here.

  reply	other threads:[~2025-09-25 14:37 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 21:21 [PATCH v3 00/15] selftests/futex: Refactor tests to use kselftest_harness.h André Almeida
2025-09-17 21:21 ` [PATCH v3 01/15] selftests: kselftest: Create ksft_print_dbg_msg() André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-25 11:47     ` Mark Brown
2025-09-25 14:14       ` [PATCH] tools/nolibc: Add stdbool.h to nolibc includes André Almeida
2025-09-25 14:24         ` Mark Brown
2025-09-25 14:37           ` André Almeida [this message]
2025-09-25 14:45             ` Mark Brown
2025-09-25 14:48               ` Thomas Weißschuh
2025-09-25 14:46             ` Thomas Weißschuh
2025-09-25 16:15         ` Thomas Weißschuh
2025-09-25 16:24           ` Mark Brown
2025-09-25 16:49             ` Thomas Weißschuh
2025-09-17 21:21 ` [PATCH v3 02/15] selftests/futex: Refactor futex_requeue_pi with kselftest_harness.h André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 03/15] selftests/futex: Refactor futex_requeue_pi_mismatched_ops " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 04/15] selftests/futex: Refactor futex_requeue_pi_signal_restart " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 05/15] selftests/futex: Refactor futex_wait_timeout " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 06/15] selftests/futex: Refactor futex_wait_wouldblock " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 07/15] selftests/futex: Refactor futex_wait_unitialized_heap " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 08/15] selftests/futex: Refactor futex_wait_private_mapped_file " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 09/15] selftests/futex: Refactor futex_wait " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 10/15] selftests/futex: Refactor futex_requeue " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 11/15] selftests/futex: Refactor futex_waitv " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 12/15] selftests/futex: Refactor futex_priv_hash " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 13/15] selftests/futex: Refactor futex_numa_mpol " André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 14/15] selftests/futex: Drop logging.h include from futex_numa André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida
2025-09-17 21:21 ` [PATCH v3 15/15] selftests/futex: Remove logging.h file André Almeida
2025-09-20 16:27   ` [tip: locking/futex] " tip-bot2 for André Almeida

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=440c9205-187e-45c1-8cc9-8083b64dadfc@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=bigeasy@linutronix.de \
    --cc=broonie@kernel.org \
    --cc=kernel-dev@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=mingo@redhat.com \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=w@1wt.eu \
    /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

all inboxes | Powered by JetHome®