From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46C971F0089A; Thu, 3 Dec 2026 15:36:12 +0000 (UTC) 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== Subject: Re: [PATCH net-next v6 14/14] selftests: dpll: add reference leak tests From: netdev-bot+sashiko@kernel.org To: poros@redhat.com 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 Date: Thu, 03 Dec 2026 15:36:11 +0000 Message-ID: <179631217187.3146.6072670993050508350@kernel.org> In-Reply-To: <20261202153223.2725780-15-poros@redhat.com> References: <20261202153223.2725780-15-poros@redhat.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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. 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 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 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