Article View: linux.kernel.netdev
Article #26468Re: [PATCH net-next v6 14/14] selftests: dpll: add reference leak tests
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 15:36
Date: Thu, 03 Dec 2026 15:36
153 lines
13414 bytes
13414 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] dpll_stress.sh now exits with KSFT_SKIP (4) on every kernel
where the DPLL reference tracker is missing or unconfirmed, even when…
- [Low] dpll_ref_tracker_probe() in dpll_lib.sh deletes its probe device
and then clears only DPLLSIM_PROBE_DEVICE.
--
selftests: dpll: add reference leak tests
This adds library helpers to the dpll selftests. They snapshot the
ref_tracker debugfs entries for DPLL devices and pins, and they report
entries created after the snapshot that still hold references once the
test devices are removed. A throwaway probe device checks whether the
tracker works. The probe runs first in dpll_stress.sh, which also gains a
final leak check, and it also runs in the new dpll_reftrack.sh script.
> diff --git a/tools/testing/selftests/drivers/dpll/dpll_lib.sh b/tools/testing/selftests/drivers/dpll/dpll_lib.sh
> index 13b57e31593cd..0ca33dc75b125 100644
> --- a/tools/testing/selftests/drivers/dpll/dpll_lib.sh
> +++ b/tools/testing/selftests/drivers/dpll/dpll_lib.sh
[ ... ]
> @@ -824,3 +842,390 @@ dpllsim_setup_standard_device()
> return 1
> fi
> }
[ ... ]
> +dpll_ref_tracker_probe()
> +{
> + local file=$1
> + local name attempt ret=2
> +
> + dpll_ref_tracker_snapshot "$file"
[ ... ]
> + for attempt in 1 2 3; do
> + dpllsim_alloc_clock_id
> + name="probe$DPLLSIM_CLOCK_ID"
> + dpllsim_create_device "$name" "$DPLLSIM_CLOCK_ID" && break
[ ... ]
> + done
> + DPLLSIM_PROBE_DEVICE=$name
> +
> + if dpllsim_add_pin "$name" ext0 ext 10000000 input &&
> + dpllsim_deploy "$name"; then
> + ret=1
> + [ -n "$(__dpll_ref_tracker_new_entries "$file")" ] && ret=0
> + fi
> +
> + if dpllsim_delete_device "$name"; then
> + DPLLSIM_PROBE_DEVICE=""
[Severity: Low]
Should DPLLSIM_CREATED_NAME be cleared here too? dpllsim_create_device()
set it to probe<id>. After a successful delete, only DPLLSIM_PROBE_DEVICE
is reset.
In dpll_reftrack.sh with REF_TRACKER set to 0, test_basic_reftrack()
returns before it creates a device, so nothing overwrites the name. At
exit, cleanup() then runs this against the probe<id> path that the run
already removed:
if [ -n "$DPLLSIM_CREATED_NAME" ]; then
dpllsim_delete_device "$DPLLSIM_CREATED_NAME" ||
log_info "cannot delete device $DPLLSIM_CREATED_NAME"
fi
dpllsim_delete_device() returns 0 for a missing directory, so this is
usually a no-op.
However, dpllsim_create_device() refuses an existing directory so that a
directory created by something else is never recorded as a device of this
run. Suppose something outside the lock creates a probe<id> directory
after the probe deletes its device and before the script exits. Could
the exit handler then undeploy and remove that directory?
destroy_device() in test_basic_reftrack() appears to leave the same stale
record for the device created by dpllsim_setup_standard_device(). A fix
that clears DPLLSIM_CREATED_NAME after a successful delete might need to
cover both paths. cleanup() in dpll_stress.sh reads DPLLSIM_CREATED_NAME
the same way.
> + else
> + log_info "cannot delete device $name"
> + return 4
> + fi
[ ... ]
> diff --git a/tools/testing/selftests/drivers/dpll/dpll_stress.sh b/tools/testing/selftests/drivers/dpll/dpll_stress.sh
> index 1474e1b98540d..dd11c0818d3cf 100755
> --- a/tools/testing/selftests/drivers/dpll/dpll_stress.sh
> +++ b/tools/testing/selftests/drivers/dpll/dpll_stress.sh
> @@ -12,11 +12,13 @@ source "$SCRIPTDIR/../../net/lib.sh"
> source "$SCRIPTDIR/dpll_lib.sh"
>
> ALL_TESTS="
> + dpll_test_ref_tracker_probe
> test_rapid_create_delete
> test_concurrent_workers
> test_pin_state_flooding
> test_many_devices
> test_deploy_cycle
> + test_ref_leaks
> "
[Severity: Medium]
Will dpll_stress.sh now report SKIP as its overall result on kernels
without CONFIG_DPLL_REFCNT_TRACKER, even when all five stress tests pass?
On those kernels, dpll_test_ref_tracker_probe() ends in log_test_skip()
for one of two reasons. Either debugfs or the ref_tracker directory is
missing ("ref_tracker debugfs not available"), or CONFIG_REF_TRACKER is
enabled by another option ("no DPLL reference tracked"). Either way,
REF_TRACKER stays 0, and test_ref_leaks() logs a second skip ("reference
tracker not confirmed by the probe").
log_test() merges each result into EXIT_STATUS:
tools/testing/selftests/net/lib.sh:ksft_exit_status_merge() {
...
__ksft_status_merge "$a" "$b" \
$ksft_xfail $ksft_pass $ksft_skip $ksft_fail
}
Skip ranks above pass, so one skip raises EXIT_STATUS from 0 to
ksft_skip, and the script ends with exit $EXIT_STATUS.
Before this patch, dpll_stress.sh had no skip path, so on these kernels
it exited 0. Could the ref_tracker probe and final check be kept out of
the stress script's merged exit status when the tracker is just not
built in, or be left to dpll_reftrack.sh alone?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202153223.2725780-1-poros%40redhat.com
Technical Details
Message-ID:
<179631217187.3146.6072670993050508350@kernel.org>Path:
mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376720-linux-kernel-netdev=dewy.ruReferences:
<20261202153223.2725780-15-poros@redhat.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376720-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v6 14/14] selftests: dpll: add reference leak tests Date: Thu, 03 Dec 2026 15:36:11 +0000 Organization: Usenet Network Message-ID: <179631217187.3146.6072670993050508350@kernel.org> References: <20261202153223.2725780-15-poros@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2529729"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:kXuRsAwgJze8zpkb2t31YM9W8Ow= sha256:5E+/fzW2rOsXtOdSqH0/bqJg7k80wYacI7SKGg86bTQ= sha1:7qtKYAAaXnKqHIlfGJmN4xVX6Do= sha256:aTtWaZqNaV4RMJntQK4pNXsA0YhzIghG7gt2itIFzGI= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id D35DB1179B1; Thu, 3 Dec 2026 18:36:37 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZR0A8fYUyXC0; Thu, 3 Dec 2026 18:36:34 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376720-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 3397C1179AB; Thu, 3 Dec 2026 18:36:26 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 916112A35B; Thu, 3 Dec 2026 15:36:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796312174; b=zcGN3n5lmrGyV2pUbkVxfXsHfElsuL5P5Cgmh4ZGZniBoRx4Q2qp4NRSrhbAbEOum9dA DEJ+vcMRhMpWRCfGzLY7Pg6rPm3n4+IraK9+xdyDQ/6s7uAojLqZ2lmcpcF0+92yGvt2N pfqWVg1jafQqkDlsqx4sJKvxhIoqkxBUFrgs9QGJ0xNdLdOrL6fAGnaItOULCoK3vaXmq vkvcSqtUEhMQ0gkCjb0hgG9k+nF+rjszYkKHIPOcr1N3zenzYDNBQ+BmIaNS3QKTCdshz JWu6Gb3f++utkW9/9unRthpcBHDKnTCUdv9X6SJxlWoL/MafH1Fm8C47Rmgmv6YxHlw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312174; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=aycFFZcRZyu8D7RDy1C+OgkkNgKwIDg5vgAkBkt6p6c=; b=d0JNKlXQF96fWG9nUYpkZMVBfPDpSW1VeG04PJx4zYhFREuWIPUhnwoC0vUM2PPyo5EE gaYQJK4Bo9jTknVd+bPhXEBMJrVzuStPDB52LWqZliZl1RagBevUIMMhCxj0HoTTekh1A u1RNde32mIAysYFH0jtDK192mIeYfX01VjyxALlYXyJTXb6sliXh1mX1CRaw2nZ2bgkNa GVPImf1zVKwJVVAYKU0BoAGUWzOTtOwbhSWgJhrwnUvJdcyQvRT03W5hV7rOV5m5Mebeg Hi6G44UAZ5PU0MrfCsF1WL+bTjLnT5CsrjTrcWV1dV2/FmPxwSlzHrRpf199/HG4VIQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Auy7+NE7; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68EC2606A322; Thu, 3 Dec 2026 15:36:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Auy7+NE7 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796312173; b=PHET1AdWqkOiy5bUV4q37iSVw2obMMh6/OfZddX2mnhaSOyvXRXLqFwZ/S88hSWYdIl5 4MwR6bgrkOiWqAg58jiBhwaeaIauelmQe3qiLwn6qjHGGIlNQCRlhoVxg/KZOxXExuUnF umJj6nR9mH2dRqHvh7OiYkynxmG+tsW1Fv5rFOSZGrUE3Px6yBtggO0PHCQN0TJq9wx3R imdANKPiupDzxBoow+pRvfFn3TaMc/TTrP4ekIuopbB1J56GQFd+dlQUctNNSNBAH+/bp IpeOL8Rd8BcFn3rCwmHIzFB5PDLhS1CIG6MHs7wrtMTP4m69ibItYWdftRd8JYe9+nA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312173; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=aycFFZcRZyu8D7RDy1C+OgkkNgKwIDg5vgAkBkt6p6c=; b=WZg1eXMI734O3b2MUFcaDEMr5htCDpHzqQyCJ7+GMuQZ9ObyhbhSrpkrd8MWzxh88YuJ rv0bS42D8WKBGUakXiEHIpzbTRP8eX74T2mvCsESrlB1HG2fVja7FdtZcCYpiILLkUHyc gEkxFBENjGIg7zDTfNT9HI9Inwgo2LEvzHtcRXW8kHyW0WgIfqEcujyty5aGuJgG8ww5O 4P8dOKmmQZDqAZFJ7lJeAQ4GJKndqqsuvGL5Ww0tVIKTZdFDpC6vVOe50HPCl2JgUEuvS FHXAk/v1CQ4lAIerCEdKFCkq3tMJiGMvJnX5kazkfp5iKZt7OtZluoZqfVrmHa0uPuA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Auy7+NE7; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B3F3606A333; Thu, 3 Dec 2026 15:36:13 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46C971F0089A; Thu, 3 Dec 2026 15:36:12 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796312173; bh=aycFFZcRZyu8D7RDy1C+OgkkNgKwIDg5vgAkBkt6p6c=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Auy7+NE76SnvFPpvvkicoNjmWVkHSSQlf44p9rZXj3HvFdTi1DG7G+6VSnekAC96J GiyvU1AcnelQCgZT2elF3/Ae/ZxFikQ6/9wo14x7s1ASfnWJS7pZOAR16K0BhRJ6c6 m5xycJn01iY/I4EGy0Hek3veuOyJlIv0faVAQSE4PzNAK9SBvdbUiPB9AqEiEwtR9Z SF37Z9ajyhlesLs6k5z5YwfmZbWw9FmO+zkNiqjmCoBlwo2izsic4dzDcljVjooSzz 6IMW4MMvPhdNh72kw8FQeqlMiEOm4OkzjFYGcu/9grujMPgDUFqav6FVMpuK3ELGX5 LRK2hP1YbL2lg== X-Cc: netdev@vger.kernel.org, corbet@lwn.net, skhan@linuxfoundation.org, shuah@kernel.org, rdunlap@infradead.org, jani.nikula@intel.com, vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com, jiri@resnulli.us, ivecera@redhat.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org X-In-Reply-To: <20261202153223.2725780-15-poros@redhat.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list