lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240619-dt-kselftest-parent-disabled-v1-1-b8f7a8778906@collabora.com>
Date: Wed, 19 Jun 2024 17:33:58 -0400
From: Nícolas F. R. A. Prado <nfraprado@...labora.com>
To: Rob Herring <robh@...nel.org>, Saravana Kannan <saravanak@...gle.com>, 
 Shuah Khan <shuah@...nel.org>
Cc: kernel@...labora.com, Shuah Khan <skhan@...uxfoundation.org>, 
 devicetree@...r.kernel.org, linux-kselftest@...r.kernel.org, 
 linux-kernel@...r.kernel.org, 
 Nícolas F. R. A. Prado <nfraprado@...labora.com>
Subject: [PATCH] kselftest: dt: Ignore nodes that have ancestors disabled

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@...eniqup@...000/i2c@...000/proximity@28
/soc@...eniqup@...000/spi@...000/ec@0
/soc@...emoteproc@...00000/glink-edge/apr
/soc@...emoteproc@...00000/glink-edge/apr/service@3
/soc@...emoteproc@...00000/glink-edge/apr/service@4
/soc@...emoteproc@...00000/glink-edge/apr/service@...lock-controller
/soc@...emoteproc@...00000/glink-edge/apr/service@...ais
/soc@...emoteproc@...00000/glink-edge/apr/service@7
/soc@...emoteproc@...00000/glink-edge/apr/service@...ais
/soc@...emoteproc@...00000/glink-edge/apr/service@8
/soc@...emoteproc@...00000/glink-edge/apr/service@...outing
/soc@...emoteproc@...00000/glink-edge/fastrpc
/soc@...emoteproc@...00000/glink-edge/fastrpc/compute-cb@3
/soc@...emoteproc@...00000/glink-edge/fastrpc/compute-cb@4
/soc@...emoteproc@...00000/glink-edge/fastrpc/compute-cb@5
/soc@...pmi@...0000/pmic@...on@.../pwrkey

Fixes: 14571ab1ad21 ("kselftest: Add new test for detecting unprobed Devicetree devices")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.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: 6906a84c482f098d31486df8dc98cead21cce2d0
change-id: 20240619-dt-kselftest-parent-disabled-2282a7223d26

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ