From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender-of-o58.zoho.eu (sender-of-o58.zoho.eu [136.143.169.58]) (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 824F72F691D for ; Tue, 17 Mar 2026 16:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.58 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773763783; cv=pass; b=scetKBvwjxGfMtghp1S28I6BUEqF39troWLDHLDsg//D00xgHTeRmrvDF9thOpXOpSaqabbufvjjKR4ad8+gLfcWnLla9Bx/6/i60IFAWu6b1LiHoeuhZ5Eso3zQW25oC0cEhBetqpR+F0K23ct8F/U8RGqPcU9/M77v8jk2g7Q= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773763783; c=relaxed/simple; bh=q7rBMqL/LhPcXdkSgWPOSBu/tQz1y8/5I7yJis4gt3o=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=onNDdWqaE1bgHttfAPPlA1xLjGe39xTOeZMYBLHL3A81hvkfTKpWJFOr1szbwU6kz9EdeCbvghuzqsZ2q9+C/aDBSbrX3VnLREM8cIwiqvA5ZzLhxO9SFkK1G8bXnZ6YbS3bQbvvXtOFzOUAwY9v8qg4A1NYuC00I3aE2W6s37E= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=FtxRHmp+; arc=pass smtp.client-ip=136.143.169.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="FtxRHmp+" ARC-Seal: i=1; a=rsa-sha256; t=1773763770; cv=none; d=zohomail.eu; s=zohoarc; b=Agb9as3BAlNNN0JEpauOY9q5d7+wrcDcgLlQVcfkjQYombQE/WgvQtFx150BDHCNZSNSspQiQjwkD5LRz4dTyolvH3GkBR5AgQr4gQQUZMzeI+sY3Yg0Hk7xXjz4ufi6t/9cs1r2aTT/cCAz0Y+M36c3pi/93q1ap1fRt06gez4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773763770; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=AkR7NSVyRW3PePAdCH5NgcVbVJGMBOhVOrwgac1oNzg=; b=TKflkqbtkNITXxSwCcjdEZBf75fwEZJi6VrvZTSEDv9tlL7vyNN1bsK8fboy/FwH3Ax6l5lhRIUTa3bSZe6fuYuhB0djIblboNO/L5ElXch5Iv1Qodl6Iy6pAKTzQVQG0z5KzNG+Fu+B80OYLLjww0nKAISfKFpXAS5I/YULD/8= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773763770; s=zmail; d=objecting.org; i=objecting@objecting.org; h=Date:Date:From:From:To:To:CC:Subject:Subject:In-Reply-To:References:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=AkR7NSVyRW3PePAdCH5NgcVbVJGMBOhVOrwgac1oNzg=; b=FtxRHmp+NPu63PwQg6/knqGKrhIj5+PTAxLETTxYyiL7zQDvVl9ohB8/ki16/9P8 yZY56G6gZMu0TRwGVUdYi7x1wfL8hvnswUM9EjwNLdxlem50mh4tkkjkthTR8m3pwbg IfO4Lt8dY+cSsQrXbFtELVfZLdP1Bx6BxSMHOpZQ= Received: by mx.zoho.eu with SMTPS id 1773763766796885.9637590176742; Tue, 17 Mar 2026 17:09:26 +0100 (CET) Date: Tue, 17 Mar 2026 16:09:26 +0000 From: Josh Law To: David Carlier , Andrew Morton , Mathieu Desnoyers , Mark Brown CC: linux-kernel@vger.kernel.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH=5D_lib=3A_skip_percpu=5Fcounter=5Ft?= =?US-ASCII?Q?ree_boundary_kunit_tests_on_single-CPU?= User-Agent: Thunderbird for Android In-Reply-To: <20260317150638.37438-1-devnexen@gmail.com> References: <20260317150638.37438-1-devnexen@gmail.com> Message-ID: <7CCA25BE-4464-461D-AB54-582DC53A230A@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External On 17 March 2026 15:06:38 GMT, David Carlier wrote: >On single-CPU topologies, accuracy_multiplier is zero, making both >approx_accuracy_range=2Eunder and =2Eover zero=2E The boundary tests in >hpcc_test_compare_value_boundaries and hpcc_test_compare_counter_boundari= es >then degenerate to comparing 0 vs 0, which correctly returns 0 (equal) >but the tests expect nonzero results=2E > >Skip these boundary tests with kunit_skip() when accuracy is zero, >since approximation boundaries are meaningless without multi-CPU carry >propagation=2E > >Fixes: ebc1ff504f55 ("lib: add kunit boundary tests for percpu_counter_tr= ee comparisons") >Signed-off-by: David Carlier >--- > lib/tests/percpu_counter_tree_kunit=2Ec | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/lib/tests/percpu_counter_tree_kunit=2Ec b/lib/tests/percpu_c= ounter_tree_kunit=2Ec >index 4d058bc78f7d=2E=2E609992bfaa21 100644 >--- a/lib/tests/percpu_counter_tree_kunit=2Ec >+++ b/lib/tests/percpu_counter_tree_kunit=2Ec >@@ -101,6 +101,9 @@ static void hpcc_test_compare_value_boundaries(struct= kunit *test) > percpu_counter_tree_set(&pct, 0); > percpu_counter_tree_approximate_accuracy_range(&pct, &under, &over); >=20 >+ if (!under && !over) >+ kunit_skip(test, "no approximation accuracy on single-CPU topology"); >+ > /* > * With approx_sum =3D precise_sum =3D 0, from the accuracy invariant: > * approx_sum - over <=3D precise_sum <=3D approx_sum + under >@@ -214,6 +217,9 @@ static void hpcc_test_compare_counter_boundaries(stru= ct kunit *test) > */ > combined =3D under + over; >=20 >+ if (!combined) >+ kunit_skip(test, "no approximation accuracy on single-CPU topology"); >+ > /* --- percpu_counter_tree_approximate_compare --- */ >=20 > /* At boundary: indeterminate */ Keep it up! Have a great day! Reviewed-by: Josh Law V/R Josh Law