devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kselftest: dt: Ignore nodes that have ancestors disabled
@ 2024-07-29 20:56 Nícolas F. R. A. Prado
  2024-08-21 15:18 ` Nícolas F. R. A. Prado
  2024-09-04 21:57 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-07-29 20:56 UTC (permalink / raw)
  To: Rob Herring, Saravana Kannan, Shuah Khan
  Cc: kernel, Shuah Khan, devicetree, linux-kselftest, linux-kernel,
	Nícolas F. R. A. Prado

Filter out nodes that have one of its ancestors disabled as they aren't
expected to probe.

This removes the following false-positive failures on the
sc7180-trogdor-lazor-limozeen-nots-r5 platform:

/soc@0/geniqup@8c0000/i2c@894000/proximity@28
/soc@0/geniqup@ac0000/spi@a90000/ec@0
/soc@0/remoteproc@62400000/glink-edge/apr
/soc@0/remoteproc@62400000/glink-edge/apr/service@3
/soc@0/remoteproc@62400000/glink-edge/apr/service@4
/soc@0/remoteproc@62400000/glink-edge/apr/service@4/clock-controller
/soc@0/remoteproc@62400000/glink-edge/apr/service@4/dais
/soc@0/remoteproc@62400000/glink-edge/apr/service@7
/soc@0/remoteproc@62400000/glink-edge/apr/service@7/dais
/soc@0/remoteproc@62400000/glink-edge/apr/service@8
/soc@0/remoteproc@62400000/glink-edge/apr/service@8/routing
/soc@0/remoteproc@62400000/glink-edge/fastrpc
/soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@3
/soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@4
/soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@5
/soc@0/spmi@c440000/pmic@0/pon@800/pwrkey

Fixes: 14571ab1ad21 ("kselftest: Add new test for detecting unprobed Devicetree devices")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Changes in v2:
- Rebased on v6.11-rc1
- Link to v1: https://lore.kernel.org/r/20240619-dt-kselftest-parent-disabled-v1-1-b8f7a8778906@collabora.com
---
 tools/testing/selftests/dt/test_unprobed_devices.sh | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/dt/test_unprobed_devices.sh b/tools/testing/selftests/dt/test_unprobed_devices.sh
index 2d7e70c5ad2d..5e3f42ef249e 100755
--- a/tools/testing/selftests/dt/test_unprobed_devices.sh
+++ b/tools/testing/selftests/dt/test_unprobed_devices.sh
@@ -34,8 +34,21 @@ nodes_compatible=$(
 		# Check if node is available
 		if [[ -e "${node}"/status ]]; then
 			status=$(tr -d '\000' < "${node}"/status)
-			[[ "${status}" != "okay" && "${status}" != "ok" ]] && continue
+			if [[ "${status}" != "okay" && "${status}" != "ok" ]]; then
+				if [ -n "${disabled_nodes_regex}" ]; then
+					disabled_nodes_regex="${disabled_nodes_regex}|${node}"
+				else
+					disabled_nodes_regex="${node}"
+				fi
+				continue
+			fi
 		fi
+
+		# Ignore this node if one of its ancestors was disabled
+		if [ -n "${disabled_nodes_regex}" ]; then
+			echo "${node}" | grep -q -E "${disabled_nodes_regex}" && continue
+		fi
+
 		echo "${node}" | sed -e 's|\/proc\/device-tree||'
 	done | sort
 	)

---
base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b
change-id: 20240619-dt-kselftest-parent-disabled-2282a7223d26

Best regards,
-- 
Nícolas F. R. A. Prado <nfraprado@collabora.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] kselftest: dt: Ignore nodes that have ancestors disabled
  2024-07-29 20:56 [PATCH v2] kselftest: dt: Ignore nodes that have ancestors disabled Nícolas F. R. A. Prado
@ 2024-08-21 15:18 ` Nícolas F. R. A. Prado
  2024-09-04 21:57 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-08-21 15:18 UTC (permalink / raw)
  To: Rob Herring, Saravana Kannan, Shuah Khan
  Cc: kernel, Shuah Khan, devicetree, linux-kselftest, linux-kernel

On Mon, Jul 29, 2024 at 04:56:02PM -0400, Nícolas F. R. A. Prado wrote:
> Filter out nodes that have one of its ancestors disabled as they aren't
> expected to probe.
> 
> This removes the following false-positive failures on the
> sc7180-trogdor-lazor-limozeen-nots-r5 platform:
> 
> /soc@0/geniqup@8c0000/i2c@894000/proximity@28
> /soc@0/geniqup@ac0000/spi@a90000/ec@0
> /soc@0/remoteproc@62400000/glink-edge/apr
> /soc@0/remoteproc@62400000/glink-edge/apr/service@3
> /soc@0/remoteproc@62400000/glink-edge/apr/service@4
> /soc@0/remoteproc@62400000/glink-edge/apr/service@4/clock-controller
> /soc@0/remoteproc@62400000/glink-edge/apr/service@4/dais
> /soc@0/remoteproc@62400000/glink-edge/apr/service@7
> /soc@0/remoteproc@62400000/glink-edge/apr/service@7/dais
> /soc@0/remoteproc@62400000/glink-edge/apr/service@8
> /soc@0/remoteproc@62400000/glink-edge/apr/service@8/routing
> /soc@0/remoteproc@62400000/glink-edge/fastrpc
> /soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@3
> /soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@4
> /soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@5
> /soc@0/spmi@c440000/pmic@0/pon@800/pwrkey
> 
> Fixes: 14571ab1ad21 ("kselftest: Add new test for detecting unprobed Devicetree devices")
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---
> Changes in v2:
> - Rebased on v6.11-rc1
> - Link to v1: https://lore.kernel.org/r/20240619-dt-kselftest-parent-disabled-v1-1-b8f7a8778906@collabora.com

Hi Rob,

gentle ping on this patch. It's a fix and has been around for a while.

Thanks,
Nícolas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] kselftest: dt: Ignore nodes that have ancestors disabled
  2024-07-29 20:56 [PATCH v2] kselftest: dt: Ignore nodes that have ancestors disabled Nícolas F. R. A. Prado
  2024-08-21 15:18 ` Nícolas F. R. A. Prado
@ 2024-09-04 21:57 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2024-09-04 21:57 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Saravana Kannan, Shuah Khan, kernel, Shuah Khan, devicetree,
	linux-kselftest, linux-kernel

On Mon, Jul 29, 2024 at 04:56:02PM -0400, Nícolas F. R. A. Prado wrote:
> Filter out nodes that have one of its ancestors disabled as they aren't
> expected to probe.
> 
> This removes the following false-positive failures on the
> sc7180-trogdor-lazor-limozeen-nots-r5 platform:
> 
> /soc@0/geniqup@8c0000/i2c@894000/proximity@28
> /soc@0/geniqup@ac0000/spi@a90000/ec@0
> /soc@0/remoteproc@62400000/glink-edge/apr
> /soc@0/remoteproc@62400000/glink-edge/apr/service@3
> /soc@0/remoteproc@62400000/glink-edge/apr/service@4
> /soc@0/remoteproc@62400000/glink-edge/apr/service@4/clock-controller
> /soc@0/remoteproc@62400000/glink-edge/apr/service@4/dais
> /soc@0/remoteproc@62400000/glink-edge/apr/service@7
> /soc@0/remoteproc@62400000/glink-edge/apr/service@7/dais
> /soc@0/remoteproc@62400000/glink-edge/apr/service@8
> /soc@0/remoteproc@62400000/glink-edge/apr/service@8/routing
> /soc@0/remoteproc@62400000/glink-edge/fastrpc
> /soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@3
> /soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@4
> /soc@0/remoteproc@62400000/glink-edge/fastrpc/compute-cb@5
> /soc@0/spmi@c440000/pmic@0/pon@800/pwrkey
> 
> Fixes: 14571ab1ad21 ("kselftest: Add new test for detecting unprobed Devicetree devices")
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---
> Changes in v2:
> - Rebased on v6.11-rc1
> - Link to v1: https://lore.kernel.org/r/20240619-dt-kselftest-parent-disabled-v1-1-b8f7a8778906@collabora.com
> ---
>  tools/testing/selftests/dt/test_unprobed_devices.sh | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)

Applied. Sorry for missing this.

Rob

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-04 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 20:56 [PATCH v2] kselftest: dt: Ignore nodes that have ancestors disabled Nícolas F. R. A. Prado
2024-08-21 15:18 ` Nícolas F. R. A. Prado
2024-09-04 21:57 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).