of: Skip devicetree kunit tests when RISCV+ACPI doesn't populate root node
Subsystems (2)
PATCH 1/1 of: Skip devicetree kunit tests when RISCV+ACPI doesn't populate root node
Starting with commit 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used"), riscv images no longer populate devicetree if ACPI is enabled. This causes unit tests to fail which require the root node to be set.
# Subtest: of_dtb
# module: of_test
1..2
# of_dtb_root_node_found_by_path: EXPECTATION FAILED at drivers/of/of_test.c:21 Expected np is not null, but is
# of_dtb_root_node_found_by_path: pass:0 fail:1 skip:0 total:1
not ok 1 of_dtb_root_node_found_by_path
# of_dtb_root_node_populates_of_root: EXPECTATION FAILED at drivers/of/of_test.c:31 Expected of_root is not null, but is
# of_dtb_root_node_populates_of_root: pass:0 fail:1 skip:0 total:1 not ok 2 of_dtb_root_node_populates_of_root
Skip those tests for RISCV if the root node is not populated.
--- drivers/of/of_kunit_helpers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/of/of_kunit_helpers.c +3 -2
@@ -18,8 +18,9 @@*/ void of_root_kunit_skip (struct kunit *test) { -if (IS_ENABLED (CONFIG_ARM64 ) &&IS_ENABLED (CONFIG_ACPI ) && !of_root) -kunit_skip (test,"arm64+acpi doesn't populate a root node" ); +if ((IS_ENABLED (CONFIG_ARM64 ) ||IS_ENABLED (CONFIG_RISCV )) && +IS_ENABLED (CONFIG_ACPI ) && !of_root) +kunit_skip (test,"arm64/riscv+acpi doesn't populate a root node" ); }EXPORT_SYMBOL_GPL (of_root_kunit_skip);
Signature · 1 line
2.45.2
Quoted 17 lines · Guenter Roeck
Starting with commit
69a8b62a7aa1("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used"), riscv images no longer populate devicetree if ACPI is enabled. This causes unit tests to fail which require the root node to be set.# Subtest:
of_dtb
# module:of_test
1..2
#of_dtb_root_node_found_by_path: EXPECTATION FAILED atdrivers/of/of_test.c:21Expected np is not null, but is
#of_dtb_root_node_found_by_path: pass:0 fail:1 skip:0 total:1
not ok 1of_dtb_root_node_found_by_path
#of_dtb_root_node_populates_of_root: EXPECTATION FAILED atdrivers/of/of_test.c:31Expectedof_rootis not null, but is
#of_dtb_root_node_populates_of_root: pass:0 fail:1 skip:0 total:1 not ok 2of_dtb_root_node_populates_of_root
Quoted 6 lines
Skip those tests for RISCV if the root node is not populated.
Fixes 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used")Cc Han Gao <[email protected]>Cc Paul Walmsley <[email protected]>Signed-off-by Guenter Roeck <[email protected]>
thanks Guenter,
- Paul
Rob Herring
maintainerQuoted 20 lines · Paul Walmsley
Quoted 17 lines · Guenter Roeck
Starting with commit
69a8b62a7aa1("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used"), riscv images no longer populate devicetree if ACPI is enabled. This causes unit tests to fail which require the root node to be set.# Subtest:
of_dtb
# module:of_test
1..2
#of_dtb_root_node_found_by_path: EXPECTATION FAILED atdrivers/of/of_test.c:21Expected np is not null, but is
#of_dtb_root_node_found_by_path: pass:0 fail:1 skip:0 total:1
not ok 1of_dtb_root_node_found_by_path
#of_dtb_root_node_populates_of_root: EXPECTATION FAILED atdrivers/of/of_test.c:31Expectedof_rootis not null, but is
#of_dtb_root_node_populates_of_root: pass:0 fail:1 skip:0 total:1 not ok 2of_dtb_root_node_populates_of_root
Quoted 8 lines
Quoted 6 lines
Skip those tests for RISCV if the root node is not populated.
Fixes 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used")Cc Han Gao <[email protected]>Cc Paul Walmsley <[email protected]>Signed-off-by Guenter Roeck <[email protected]>Reviewed-by Paul Walmsley <[email protected]> # arch/riscv
FWIW, the fixed commit will also prevent enabling features like this series[1] enables. Arm64 is still disabled ATM because of disagreement with the arm64 maintainers, so that can was kicked down the road. It would be better to not disable this and address the issues as they happen rather than breaking people down the road.
Rob
Paul Walmsley
maintainerQuoted 28 lines · Rob Herring
Quoted 27 lines · Paul Walmsley
Quoted 23 lines · Guenter Roeck
Starting with commit
69a8b62a7aa1("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used"), riscv images no longer populate devicetree if ACPI is enabled. This causes unit tests to fail which require the root node to be set.# Subtest:
of_dtb
# module:of_test
1..2
#of_dtb_root_node_found_by_path: EXPECTATION FAILED atdrivers/of/of_test.c:21Expected np is not null, but is
#of_dtb_root_node_found_by_path: pass:0 fail:1 skip:0 total:1
not ok 1of_dtb_root_node_found_by_path
#of_dtb_root_node_populates_of_root: EXPECTATION FAILED atdrivers/of/of_test.c:31Expectedof_rootis not null, but is
#of_dtb_root_node_populates_of_root: pass:0 fail:1 skip:0 total:1 not ok 2of_dtb_root_node_populates_of_rootSkip those tests for RISCV if the root node is not populated.
Fixes 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used")Cc Han Gao <[email protected]>Cc Paul Walmsley <[email protected]>Signed-off-by Guenter Roeck <[email protected]>
Quoted 7 lines
Quoted 1 line
Reviewed-by Paul Walmsley <[email protected]> # arch/riscvFWIW, the fixed commit will also prevent enabling features like this series[1] enables. Arm64 is still disabled ATM because of disagreement with the arm64 maintainers, so that can was kicked down the road. It would be better to not disable this and address the issues as they happen rather than breaking people down the road.
Thanks for the context, Rob. Can you share a pointer to the ARM64 disagreement thread(s) (either publicly or privately)?
- Paul
Rob Herring
maintainerQuoted 33 lines · Paul Walmsley
Quoted 30 lines · Rob Herring
Quoted 28 lines · Paul Walmsley
Quoted 17 lines · Guenter Roeck
Starting with commit
69a8b62a7aa1("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used"), riscv images no longer populate devicetree if ACPI is enabled. This causes unit tests to fail which require the root node to be set.# Subtest:
of_dtb
# module:of_test
1..2
#of_dtb_root_node_found_by_path: EXPECTATION FAILED atdrivers/of/of_test.c:21Expected np is not null, but is
#of_dtb_root_node_found_by_path: pass:0 fail:1 skip:0 total:1
not ok 1of_dtb_root_node_found_by_path
#of_dtb_root_node_populates_of_root: EXPECTATION FAILED atdrivers/of/of_test.c:31Expectedof_rootis not null, but is
#of_dtb_root_node_populates_of_root: pass:0 fail:1 skip:0 total:1 not ok 2of_dtb_root_node_populates_of_rootQuoted 6 lines
Skip those tests for RISCV if the root node is not populated.
Fixes 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used")Cc Han Gao <[email protected]>Cc Paul Walmsley <[email protected]>Signed-off-by Guenter Roeck <[email protected]>Reviewed-by Paul Walmsley <[email protected]> # arch/riscv
Quoted 8 lines
Quoted 5 lines
FWIW, the fixed commit will also prevent enabling features like this series[1] enables. Arm64 is still disabled ATM because of disagreement with the arm64 maintainers, so that can was kicked down the road. It would be better to not disable this and address the issues as they happen rather than breaking people down the road.
Thanks for the context, Rob. Can you share a pointer to the ARM64 disagreement thread(s) (either publicly or privately)?
Quoted 28 lines · Rob Herring
Quoted 27 lines · Paul Walmsley
Quoted 23 lines · Guenter Roeck
Starting with commit
69a8b62a7aa1("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used"), riscv images no longer populate devicetree if ACPI is enabled. This causes unit tests to fail which require the root node to be set.# Subtest:
of_dtb
# module:of_test
1..2
#of_dtb_root_node_found_by_path: EXPECTATION FAILED atdrivers/of/of_test.c:21Expected np is not null, but is
#of_dtb_root_node_found_by_path: pass:0 fail:1 skip:0 total:1
not ok 1of_dtb_root_node_found_by_path
#of_dtb_root_node_populates_of_root: EXPECTATION FAILED atdrivers/of/of_test.c:31Expectedof_rootis not null, but is
#of_dtb_root_node_populates_of_root: pass:0 fail:1 skip:0 total:1 not ok 2of_dtb_root_node_populates_of_rootSkip those tests for RISCV if the root node is not populated.
Fixes 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used")Cc Han Gao <[email protected]>Cc Paul Walmsley <[email protected]>Signed-off-by Guenter Roeck <[email protected]>
Quoted 8 lines
Quoted 1 line
Reviewed-by Paul Walmsley <[email protected]> # arch/riscvFWIW, the fixed commit will also prevent enabling features like this series[1] enables. Arm64 is still disabled ATM because of disagreement with the arm64 maintainers, so that can was kicked down the road. It would be better to not disable this and address the issues as they happen rather than breaking people down the road.
I guess that means that I'll have to disable devicetree unit tests for riscv targets. NP; thanks for letting me know.
Guenter
Rob Herring (Arm)
maintainerQuoted 19 lines · Guenter Roeck
Starting with commit
69a8b62a7aa1("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used"), riscv images no longer populate devicetree if ACPI is enabled. This causes unit tests to fail which require the root node to be set.# Subtest:
of_dtb
# module:of_test
1..2
#of_dtb_root_node_found_by_path: EXPECTATION FAILED atdrivers/of/of_test.c:21Expected np is not null, but is
#of_dtb_root_node_found_by_path: pass:0 fail:1 skip:0 total:1
not ok 1of_dtb_root_node_found_by_path
#of_dtb_root_node_populates_of_root: EXPECTATION FAILED atdrivers/of/of_test.c:31Expectedof_rootis not null, but is
#of_dtb_root_node_populates_of_root: pass:0 fail:1 skip:0 total:1 not ok 2of_dtb_root_node_populates_of_rootSkip those tests for RISCV if the root node is not populated.
Quoted 8 lines
Fixes 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used")Cc Han Gao <[email protected]>Cc Paul Walmsley <[email protected]>Signed-off-by Guenter Roeck <[email protected]>--- drivers/of/of_kunit_helpers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
I guess the riscv folks don't care about supporting the relevant features either, so I've applied it. Can kicked down the road again.
Paul Walmsley
maintainerHi Rob,
Quoted 2 lines · Rob Herring (Arm)
I guess the riscv folks don't care about supporting the relevant features either, so I've applied it. Can kicked down the road again.
For the record: we do care. However, it looks like this problem needs a more general solution, something that applies across CPU architectures. Lacking that, we might as well have behavior consistent with ARM64 - and for its faults, this approach is at least simpler to reason about.
(That's not to say that I don't have some personal opinions about this topic. IMHO, we're missing a canonical Linux kernel way of representing device integration data. The kernel would control how the various random device integration data formats are integrated and merged, which should sidestep at least some of the problems that we're facing today. That would also give us a reasonable way to store superset data, such as bus topology information. But as for me personally, as you might recall, I'm afraid I lost my appetite for trying to drive device data improvements during the ARM DT conversion of the late 2000s.)
Sorry for the delay in getting back to you, and that I don't have the ability to help further at the moment -
- Paul
Rob Herring
maintainerQuoted 5 lines · Paul Walmsley
Hi Rob,
On Wed, 12 Nov 2025, Rob Herring (Arm) wrote:
Quoted 7 lines
Quoted 2 lines
I guess the riscv folks don't care about supporting the relevant features either, so I've applied it. Can kicked down the road again.
For the record: we do care. However, it looks like this problem needs a more general solution, something that applies across CPU architectures. Lacking that, we might as well have behavior consistent with ARM64 - and for its faults, this approach is at least simpler to reason about.
The thing is that problems show up on specific machines which has little to do with the specific CPU arch. I don't have any visibility as to what problem you all had which prompted disabling it (for the arch, not the kunit tests) to be able to think about a solution. Leaving it off just means we're potentially adding regressions in the future when we try to turn it on.
Rob
Quoted 14 lines · Rob Herring
Quoted 5 lines · Paul Walmsley
Hi Rob,
On Wed, 12 Nov 2025, Rob Herring (Arm) wrote:
Quoted 7 lines
Quoted 2 lines
I guess the riscv folks don't care about supporting the relevant features either, so I've applied it. Can kicked down the road again.
For the record: we do care. However, it looks like this problem needs a more general solution, something that applies across CPU architectures. Lacking that, we might as well have behavior consistent with ARM64 - and for its faults, this approach is at least simpler to reason about.
Quoted 7 lines
The thing is that problems show up on specific machines which has little to do with the specific CPU arch. I don't have any visibility as to what problem you all had which prompted disabling it (for the arch, not the kunit tests) to be able to think about a solution. Leaving it off just means we're potentially adding regressions in the future when we try to turn it on.
Since the patch introducing the problem has now been backported to v6.12 and v6.17, I disabled CONFIG_OF_KUNIT_TEST for riscv entirely in my test system.
Guenter