From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.mindbit.ro (xs1.mindbit.ro [80.86.107.70]) (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 B6A949463 for ; Sun, 23 Aug 2026 20:46:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.86.107.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787517991; cv=none; b=kgRAlmdmhg+lutPjx7Mrty8veTmdAszs23F5nY5xRDVq0UqRDY9IJwjlny4ei2XOr8VntEhlid0UMFWIKkdCbESLsYi7WG6nHutV0C+ql48M6FNFvdcXArRCk6DTqUOT+YTeKTqRObZlZhZQbDIHmagxTu67VXv6Yr7ZXgoV8Yo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787517991; c=relaxed/simple; bh=YJLKr5yqtPNSafMLwgpPrGZx+S3EdKwrGAWivy2GohE=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=BoSNL3c4G9hr+aGuHFDWlSs0WbaGGbnyf+2MuhuwKQn5uA9ea1x0EReFA7sY4S1+2sGIC5H4xC3QBDgkJbCblWvcv/E8Khb2ZzVdM3k221XK8yVldpucgZpJksRb/Ys6v5NLre2lq1gbueekRY5QkoWYAOA42DNeVe64YvAZDTM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rendec.net; spf=pass smtp.mailfrom=rendec.net; dkim=pass (2048-bit key) header.d=rendec.net header.i=@rendec.net header.b=kMWR4izB; arc=none smtp.client-ip=80.86.107.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rendec.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rendec.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rendec.net header.i=@rendec.net header.b="kMWR4izB" Received: from dog.kanata.rendec.net (pool-174-112-193-187.cpe.net.cable.rogers.com [174.112.193.187]) by mail.mindbit.ro (Postfix) with ESMTPSA id 6D9ADCC396; Sun, 23 Aug 2026 23:46:25 +0300 (EEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.mindbit.ro 6D9ADCC396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rendec.net; s=default; t=1787517986; bh=nNQx6Fzns/PikcfV2mYcVk/sJbg3KPOAl0xQj2c7Gx4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=kMWR4izB3QGnsfheRGJmGgxdcJ+ktn21ChIyByLiBx4scwoO6guvA8uQEj8v18+se x500BLWTosGauuHvEcfzEnCBRNJYZbfmUhuWiFbryUl6ijLfTdWP2JYLuNotamg8Ia 3bkhfSUA/GSz0Q5J7B3bZ6SfaINEi7mj5dLuUpFQ2JLADdZkEpTWuaQlmAnrSMSlDS OhkvMNB1Q1MfhOkCCRBTUNA2UBhy8xBbqo0cDJBdxYOhn7ITjIhMpl8K6eR75jObHT 8GDAWuasMUqgqOTvT02LqgSRJGRXoEjT7+iN0wCAQYib5WV4vgRuZvLcY7JwxKJNpz RUKHUL2w3vBWQ== Message-ID: <014ccedef7256efc027b8759134b9d1712d3afb6.camel@rendec.net> Subject: Re: [PATCH] irq: Make refcount_interrupt kunit test selectable From: Radu Rendec To: Kuan-Wei Chiu , tglx@kernel.org, boqun@kernel.org, peterz@infradead.org, lyude@redhat.com Cc: jserv@ccns.ncku.edu.tw, marscheng@google.com, eleanor15x@gmail.com, linux-kernel@vger.kernel.org Date: Sun, 23 Aug 2026 16:46:23 -0400 In-Reply-To: <20260823171721.3059733-1-visitorckw@gmail.com> References: <20260823171721.3059733-1-visitorckw@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Sun, 2026-08-23 at 17:17 +0000, Kuan-Wei Chiu wrote: > Currently, refcount_interrupt_test is built unconditionally when > CONFIG_KUNIT is enabled, causing it to run unexpectedly during boot. >=20 > Fix this by introducing CONFIG_REFCOUNT_INTERRUPT_KUNIT_TEST so the > test can be configured independently, following standard kunit > practices. >=20 > Fixes: 07a88e2bcd5b ("irq: Add KUnit test for refcounted interrupt enable= /disable") > Signed-off-by: Kuan-Wei Chiu > --- > =C2=A0kernel/irq/Kconfig=C2=A0 | 12 ++++++++++++ > =C2=A0kernel/irq/Makefile |=C2=A0 2 +- > =C2=A02 files changed, 13 insertions(+), 1 deletion(-) Can someone please explain me why this needs to be a separate unit test in the first place and can't be integrated into the (previously) existing unit test gated by IRQ_KUNIT_TEST? Ironically, both the issue that this patch is trying to fix and my question were raised by sashiko here: https://lore.kernel.org/all/20260605055315.3E96E1F00893@smtp.kernel.org/ > diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig > index 05cba4e16dad..6923f37eaab4 100644 > --- a/kernel/irq/Kconfig > +++ b/kernel/irq/Kconfig > @@ -150,6 +150,18 @@ config IRQ_KUNIT_TEST > =C2=A0 > =C2=A0 =C2=A0 If unsure, say N. > =C2=A0 > +config REFCOUNT_INTERRUPT_KUNIT_TEST > + tristate "Test refcounted interrupt enable/disable" if !KUNIT_ALL_TESTS > + depends on KUNIT > + default KUNIT_ALL_TESTS > + help > + =C2=A0 This builds the kunit tests for the refcounted interrupt > + =C2=A0 infrastructure. It verifies the correctness of single, nested, > + =C2=A0 and multiple interrupt enable/disable state changes and ensures > + =C2=A0 that the underlying reference counting mechanisms work as expect= ed. > + > + =C2=A0 If unsure, say N. > + > =C2=A0endmenu > =C2=A0 > =C2=A0config GENERIC_IRQ_MULTI_HANDLER > diff --git a/kernel/irq/Makefile b/kernel/irq/Makefile > index 44c4d6fc502a..0e5df962a149 100644 > --- a/kernel/irq/Makefile > +++ b/kernel/irq/Makefile > @@ -16,4 +16,4 @@ obj-$(CONFIG_SMP) +=3D affinity.o > =C2=A0obj-$(CONFIG_GENERIC_IRQ_DEBUGFS) +=3D debugfs.o > =C2=A0obj-$(CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR) +=3D matrix.o > =C2=A0obj-$(CONFIG_IRQ_KUNIT_TEST) +=3D irq_test.o > -obj-$(CONFIG_KUNIT) +=3D refcount_interrupt_test.o > +obj-$(CONFIG_REFCOUNT_INTERRUPT_KUNIT_TEST) +=3D refcount_interrupt_test= .o