mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Sasha Levin <sashal@kernel.org>, chleroy@kernel.org
Cc: Andreas Hindborg <a.hindborg@kernel.org>,
	 Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/configfs: fix the build on 32-bit architectures
Date: Tue, 3 Nov 2026 09:18:31 -0800	[thread overview]
Message-ID: <auoW3rXVeBkgM4qp@gmail.com> (raw)
In-Reply-To: <20261103141627.30838-1-sashal@kernel.org>

On Tue, Nov 03, 2026 at 09:16:27AM -0500, Sasha Levin wrote:
> The fixture setup checks the result of mkdtemp() with ASSERT_NE(), which
> hands the pointer to the harness. The harness casts both operands to
> intmax_t to print them, and on 32-bit architectures gcc warns about the
> cast from a pointer to an integer of a different size. The configfs
> test builds with -Werror, so it fails to build there:
> 
>   kselftest_harness.h:797:49: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> 
> Compare the result against NULL inside ASSERT_TRUE(), so that the
> harness only sees an int.
> 
> Fixes: a7fdcb2edd0f ("selftests/configfs: add tests for the userspace interface")
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Thanks for the fix.

Reviewed-by: Breno Leitao <leitao@debian.org>

> ---
> KernelCI's 32-bit arm kselftest builds fail on this. Built
> configfs_test.c with gcc 16 -m32, with and without _TIME_BITS=64 (fails
> before, builds after), clang 21 -m32, and both compilers for x86_64.
> 
> The harness cast warns for every pointer comparison on 32-bit, a few
> thousand warnings in one KernelCI arm build, and configfs only breaks
> because of its -Werror. Making the harness print pointers through
> uintptr_t would be a separate change.

Christophe posted a harness fix for this in January, but it was never
merged?

    https://lore.kernel.org/all/948937bfe461cf0fb6ade2623e51f673f845fa51.1768298756.git.chleroy@kernel.org/

It still applies to linux-next, and with it configfs_test.c compiles on
32-bit without this patch.

Either way, I will merge your patch tomorrow if no other review pops up.

Thanks,
--breno

      reply	other threads:[~2026-11-03 17:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 14:16 Sasha Levin
2026-11-03 17:18 ` Breno Leitao [this message]

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=auoW3rXVeBkgM4qp@gmail.com \
    --to=leitao@debian.org \
    --cc=a.hindborg@kernel.org \
    --cc=chleroy@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=shuah@kernel.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 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®