Skip to content

Commit 05144ab

Browse files
nfrapradorobherring
authored andcommitted
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@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: 14571ab ("kselftest: Add new test for detecting unprobed Devicetree devices") Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Link: https://lore.kernel.org/r/20240729-dt-kselftest-parent-disabled-v2-1-d7a001c4930d@collabora.com Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent c65d679 commit 05144ab

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tools/testing/selftests/dt/test_unprobed_devices.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,21 @@ nodes_compatible=$(
3434
# Check if node is available
3535
if [[ -e "${node}"/status ]]; then
3636
status=$(tr -d '\000' < "${node}"/status)
37-
[[ "${status}" != "okay" && "${status}" != "ok" ]] && continue
37+
if [[ "${status}" != "okay" && "${status}" != "ok" ]]; then
38+
if [ -n "${disabled_nodes_regex}" ]; then
39+
disabled_nodes_regex="${disabled_nodes_regex}|${node}"
40+
else
41+
disabled_nodes_regex="${node}"
42+
fi
43+
continue
44+
fi
3845
fi
46+
47+
# Ignore this node if one of its ancestors was disabled
48+
if [ -n "${disabled_nodes_regex}" ]; then
49+
echo "${node}" | grep -q -E "${disabled_nodes_regex}" && continue
50+
fi
51+
3952
echo "${node}" | sed -e 's|\/proc\/device-tree||'
4053
done | sort
4154
)

0 commit comments

Comments
 (0)