From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 384233290B7 for ; Tue, 30 Jun 2026 22:52:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782859972; cv=none; b=JPALeWD7b/VvRiATj+z/c3afaldrc03yKUf6sKoeALkaW3LjYMnCuwgObeSR339P6M2wQRYbzARQDX4voVEoiki/dWxzLgCwGRf9ViAeBKIjKxTWcijovj8C1d4Eg6Yi0HFjdvwOWoM3kxPbd2yjJRd0vuArIWO44swk8eljVfo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782859972; c=relaxed/simple; bh=3n96j/ql0kU7RzUR4uo+dtZykDqVeAAHFSsWdv4fyTI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RA4Y7z9OT1Z5t35dBFDZvROKqoqWw4LX8qLT0Qi6fhJMRN5k1k1gKPMpiV6hhBdu4L45P3US0N3CGgbANusnz65UtvPoi0Bfk+Q4zL4rGzRV+YRJ7jDhpe2RjqQMmWhlSuOrvMUSdu5eP4qAS96REawq4g0w3O95DafhQezOTQ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shazbot.org; spf=pass smtp.mailfrom=shazbot.org; dkim=pass (2048-bit key) header.d=shazbot.org header.i=@shazbot.org header.b=bgAiN8xq; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=RuRxHXls; arc=none smtp.client-ip=202.12.124.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shazbot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shazbot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shazbot.org header.i=@shazbot.org header.b="bgAiN8xq"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="RuRxHXls" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id D241E7A0053; Tue, 30 Jun 2026 18:52:47 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Tue, 30 Jun 2026 18:52:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shazbot.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1782859967; x=1782946367; bh=KPcO4N+kR/OKUIdNoFJrabqDR+OoGT65HonnXinR6XE=; b= bgAiN8xqF0TYxEZcKlf3LFaXHzlrA/d9Iygsod/O3lGsrq4+tJzAuOtlVtHaPie7 zFOO+FPu6xFon18+V826JAIC6L+nSBsmqDaad9gLqwRDr9ULJdddkSfZrQcYcYls zM6geJLgXYYK8f8jLjeHhqe+g8fJsBFvNlVseUO1eC92lT44L14s9cTk4go3fsf5 YfawycSizqo4k/L+k/CWf6LTQO0FOfa75rSc1XcUAwoQO9YY+VOYdQFsmuVel64I uuuqJUjlyvRp12Oks4Uy07vkCWgwztv2DukyStyfLTgU8DCfzf0nu7EP9n5y3fQT Y29CDPBcvXskLAz4gueICQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1782859967; x= 1782946367; bh=KPcO4N+k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Jk0wf2AmOMJPnIj3YH+97aHduQbHKvHHEp4bVjoO06X/or9Q X-ME-Proxy: Feedback-ID: i03f14258:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jun 2026 18:52:46 -0400 (EDT) Date: Tue, 30 Jun 2026 16:52:44 -0600 From: Alex Williamson To: David Matlack , Kees Cook , Shuah Khan Cc: alex@shazbot.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, Andy Lutomirski , Bill Wendling , Justin Stitt , Nathan Chancellor , Nick Desaulniers , Raghavendra Rao Ananta , Vipin Sharma , Will Drewry , Aaron Lewis Subject: Re: [PATCH] selftests: harness: Mark test fixture objects __maybe_unused Message-ID: <20260630165244.0d013bbc@shazbot.org> In-Reply-To: <20260630213341.1664345-1-dmatlack@google.com> References: <20260630213341.1664345-1-dmatlack@google.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 30 Jun 2026 21:33:41 +0000 David Matlack wrote: > Mark test fixture objects __maybe_unused since they will not be used > when there are fixture variants (the variants will be used instead). > > This fixes the VFIO selftest build with clang and -Werror: > > vfio_dma_mapping_mmio_test.c:106:1: error: variable '_vfio_dma_mapping_mmio_test_map_full_bar_object' set but not used [-Werror,-Wunused-but-set-global] > 106 | TEST_F(vfio_dma_mapping_mmio_test, map_full_bar) > | ^ > ./../kselftest_harness.h:398:2: note: expanded from macro 'TEST_F' > 398 | __TEST_F_IMPL(fixture_name, test_name, -1, TEST_TIMEOUT_DEFAULT) > | ^ > ./../kselftest_harness.h:470:33: note: expanded from macro '__TEST_F_IMPL' > 470 | static struct __test_metadata *_##fixture_name##_##test_name##_object; \ > | > > Fixes: ff556bd98348 ("vfio: selftests: Add -Wall and -Werror to the Makefile") > Reported-by: Aaron Lewis > Signed-off-by: David Matlack > --- > tools/testing/selftests/kselftest_harness.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h > index 261e4df94d9d..29a19bc87084 100644 > --- a/tools/testing/selftests/kselftest_harness.h > +++ b/tools/testing/selftests/kselftest_harness.h > @@ -467,7 +467,7 @@ static inline void __kselftest_memset_safe(void *s, int c, size_t n) > !__atomic_test_and_set(_metadata->no_teardown, __ATOMIC_RELAXED)) \ > fixture_name##_teardown(_metadata, self, variant); \ > } \ > - static struct __test_metadata *_##fixture_name##_##test_name##_object; \ > + static struct __test_metadata *_##fixture_name##_##test_name##_object __maybe_unused; \ > static void __attribute__((constructor(KSELFTEST_PRIO_TEST))) \ > _register_##fixture_name##_##test_name(void) \ > { \ > > base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482 Reviewed-by: Alex Williamson Kees/Shuah, I can take this through the vfio tree if you prefer, it fixes a commit that entered through vfio selftests. Thanks, Alex