From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 E3F81420877 for ; Tue, 7 Jul 2026 18:52:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783450362; cv=none; b=p2MmqdWi60dG7OTbTjikxCnKmkD0Ym5PrlhDHVmbl14ilToxWW4GLPmPpxN28ksgy2/aeSrn8elUnc3P41+xjLAeZpBOxrynmxIXk7GDLhdz0DMuCPNFe7zk9Ikm4UfzyKEy6Co3auGnC6GH6m5xpEQjjSvDOVdnuH2JXUjNMGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783450362; c=relaxed/simple; bh=oF/oCtuWFprYYMMeiv2Z5pQSTWeSOPAfpy/2ViZKZ48=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=U060BlFUSqSuAFFLCmxuO6aIc5OWbOO//RjBjE91C1umshYuwAHlPk//8jZYiveQP+lke8VJY1XvQiGZVy3+/+Pr0y9hwBDXnzi3gMJdqTbayT70o+7ykqRS+KZiOqzMuRW8E4txlZMXK0pVeEGifGL1OqRBwT+SAkWvZ3s8xuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=V4IMalWx; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="V4IMalWx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783450359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=YZufn6Jx1EaFFk4SMNqpE68TtNuDsBa9sft5c2r8ta0=; b=V4IMalWxLptI4B6HCaeEzqUaVrKA8FrKMtV3TxhQcQesZNGBoSXnUtHMARvtn7D7eBcE23 TTIFVHxzh1i5FuOQAiwkF0QTDBhNL3tZDuyM3AWLOnCUeeMdZrk9cKGvwuJ8Ipy68yXaDN FKlvuxNKjtBpQH/kV0kFWF4hhDYKRiI= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-155-5aPXJUFwNTOJCWK7ebwtNQ-1; Tue, 07 Jul 2026 14:52:38 -0400 X-MC-Unique: 5aPXJUFwNTOJCWK7ebwtNQ-1 X-Mimecast-MFC-AGG-ID: 5aPXJUFwNTOJCWK7ebwtNQ_1783450357 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 825861953998; Tue, 7 Jul 2026 18:52:36 +0000 (UTC) Received: from p1.redhat.com (unknown [10.22.76.3]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4A03D3691C; Tue, 7 Jul 2026 18:52:29 +0000 (UTC) From: Nico Pache To: kunit-dev@googlegroups.com, acarmina@redhat.com, kees@kernel.org, aesteve@redhat.com, error27@gmail.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, david@davidgow.net, linux@roeck-us.net, akpm@linux-foundation.org, Nico Pache Subject: [PATCH] kunit/bug.c: fix backtrace-supression-test failure as a module Date: Tue, 7 Jul 2026 12:54:05 -0600 Message-ID: <20260707185405.571277-1-npache@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 When running the backtrace-supression-test as a module most cases produce failures. Upon further investigating the issue presents itself due to the ifdef that wraps the kunit_is_supressed_warning, which is not compiled in if using CONFIG_KUNIT_MODULE. Fix this by switching to IS_ENABLED(CONFIG_KUNIT) which properly checks for either CONFIG_KUNIT_MODULE or CONFIG_KUNIT. Fixes: bbc960d009a6 ("kunit: Add backtrace suppression self-tests") Signed-off-by: Nico Pache --- lib/bug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bug.c b/lib/bug.c index 292420f45811..b9820a0226f5 100644 --- a/lib/bug.c +++ b/lib/bug.c @@ -219,7 +219,7 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga no_cut = bug->flags & BUGFLAG_NO_CUT_HERE; has_args = bug->flags & BUGFLAG_ARGS; -#ifdef CONFIG_KUNIT +#if IS_ENABLED(CONFIG_KUNIT) /* * Before the once logic so suppressed warnings do not consume * the single-fire budget of WARN_ON_ONCE(). -- 2.54.0