Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: David Matlack <dmatlack@google.com>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	llvm@lists.linux.dev, "Andy Lutomirski" <luto@amacapital.net>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	"Mickaël Salaün" <mic@digikod.net>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
	"Shuah Khan" <shuah@kernel.org>, "Will Drewry" <wad@chromium.org>,
	"Kuniyuki Iwashima" <kuniyu@google.com>,
	"Aaron Lewis" <aaronlewis@google.com>,
	"Alex Williamson" <alex@shazbot.org>
Subject: Re: [PATCH v3] selftests: harness: Mark test fixture objects __maybe_unused
Date: Wed, 15 Jul 2026 09:03:10 -0700	[thread overview]
Message-ID: <202607150902.F17F8DE5@keescook> (raw)
In-Reply-To: <CALzav=f3KaNQd2NgCTxU=VSXWujV+qjyQuNJp_hy1-U36RMPpg@mail.gmail.com>

On Tue, Jul 14, 2026 at 09:24:36AM -0700, David Matlack wrote:
> On Mon, Jul 6, 2026 at 11:32 AM David Matlack <dmatlack@google.com> wrote:
> >
> > Mark _##fixture_name##_##test_name##_object __maybe_unused since it may
> > not ever be read. This pointer is only read in XFAIL_ADD(), which tests
> > are not required to use.
> >
> > clang made a change to -Wunused-but-set-variable (split out into its own
> > subwarning, -Wunused-but-set-global) that causes this warning to be
> > emitted for various selftests and can be upgraded to an error in
> > selftest that set -Werror.
> >
> > VFIO selftests have been broken since commit ff556bd98348 ("vfio:
> > selftests: Add -Wall and -Werror to the Makefile"), and the net
> > selftests builds have been noisy due to -Wall.
> >
> > Fixes: 24cf65a62266 ("selftests/harness: Share _metadata between forked processes")
> > Reported-by: Kuniyuki Iwashima <kuniyu@google.com>
> > Reported-by: Aaron Lewis <aaronlewis@google.com>
> > Reviewed-by: Alex Williamson <alex@shazbot.org>
> > Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
> > Signed-off-by: David Matlack <dmatlack@google.com>
> 
> Kees and Shuah, is it ok if Alex takes this through the VFIO tree? [1]
> This fixes a bug exposed by recent VFIO selftests commit ff556bd98348
> ("vfio: selftests: Add -Wall and -Werror to the Makefile").
> 
> [1] https://lore.kernel.org/linux-kselftest/20260630165244.0d013bbc@shazbot.org/

Yeah, please do. This has ample review. :)

-- 
Kees Cook

      reply	other threads:[~2026-07-15 16:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 18:31 [PATCH v3] selftests: harness: Mark test fixture objects __maybe_unused David Matlack
2026-07-06 21:36 ` Nathan Chancellor
2026-07-14 16:24 ` David Matlack
2026-07-15 16:03   ` Kees Cook [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=202607150902.F17F8DE5@keescook \
    --to=kees@kernel.org \
    --cc=aaronlewis@google.com \
    --cc=alex@shazbot.org \
    --cc=dmatlack@google.com \
    --cc=justinstitt@google.com \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luto@amacapital.net \
    --cc=mic@digikod.net \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=shuah@kernel.org \
    --cc=wad@chromium.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