| Message ID | 20251023160415.705294-1-linux@roeck-us.net |
|---|---|
| State | New |
| Headers | show |
| Series | of: Skip devicetree kunit tests when RISCV+ACPI doesn't populate root node | expand |
On Thu, 23 Oct 2025, Guenter Roeck wrote: > 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. > > Fixes: 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used") > Cc: Han Gao <rabenda.cn@gmail.com> > Cc: Paul Walmsley <pjw@kernel.org> > Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Paul Walmsley <pjw@kernel.org> # arch/riscv thanks Guenter, - Paul
On Thu, Oct 23, 2025 at 11:48 AM Paul Walmsley <pjw@kernel.org> wrote: > > On Thu, 23 Oct 2025, Guenter Roeck wrote: > > > 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. > > > > Fixes: 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used") > > Cc: Han Gao <rabenda.cn@gmail.com> > > Cc: Paul Walmsley <pjw@kernel.org> > > Signed-off-by: Guenter Roeck <linux@roeck-us.net> > > Reviewed-by: Paul Walmsley <pjw@kernel.org> # 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 [1] https://lore.kernel.org/all/20251015071420.1173068-1-herve.codina@bootlin.com/
On Thu, 23 Oct 2025, Rob Herring wrote: > On Thu, Oct 23, 2025 at 11:48 AM Paul Walmsley <pjw@kernel.org> wrote: > > > > On Thu, 23 Oct 2025, Guenter Roeck wrote: > > > > > 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. > > > > > > Fixes: 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used") > > > Cc: Han Gao <rabenda.cn@gmail.com> > > > Cc: Paul Walmsley <pjw@kernel.org> > > > Signed-off-by: Guenter Roeck <linux@roeck-us.net> > > > > Reviewed-by: Paul Walmsley <pjw@kernel.org> # 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. Thanks for the context, Rob. Can you share a pointer to the ARM64 disagreement thread(s) (either publicly or privately)? - Paul
On 10/23/25 18:00, Rob Herring wrote: > On Thu, Oct 23, 2025 at 11:48 AM Paul Walmsley <pjw@kernel.org> wrote: >> >> On Thu, 23 Oct 2025, Guenter Roeck wrote: >> >>> 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. >>> >>> Fixes: 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used") >>> Cc: Han Gao <rabenda.cn@gmail.com> >>> Cc: Paul Walmsley <pjw@kernel.org> >>> Signed-off-by: Guenter Roeck <linux@roeck-us.net> >> >> Reviewed-by: Paul Walmsley <pjw@kernel.org> # 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. > I guess that means that I'll have to disable devicetree unit tests for riscv targets. NP; thanks for letting me know. Guenter
On Thu, Oct 23, 2025 at 9:54 PM Paul Walmsley <pjw@kernel.org> wrote: > > On Thu, 23 Oct 2025, Rob Herring wrote: > > > On Thu, Oct 23, 2025 at 11:48 AM Paul Walmsley <pjw@kernel.org> wrote: > > > > > > On Thu, 23 Oct 2025, Guenter Roeck wrote: > > > > > > > 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. > > > > > > > > Fixes: 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used") > > > > Cc: Han Gao <rabenda.cn@gmail.com> > > > > Cc: Paul Walmsley <pjw@kernel.org> > > > > Signed-off-by: Guenter Roeck <linux@roeck-us.net> > > > > > > Reviewed-by: Paul Walmsley <pjw@kernel.org> # 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. > > Thanks for the context, Rob. Can you share a pointer to the ARM64 > disagreement thread(s) (either publicly or privately)? https://lore.kernel.org/all/ZaZtbU9hre3YhZam@FVFF77S0Q05N/
diff --git a/drivers/of/of_kunit_helpers.c b/drivers/of/of_kunit_helpers.c index 7b3ed5a382aa..f6ed1af8b62a 100644 --- a/drivers/of/of_kunit_helpers.c +++ b/drivers/of/of_kunit_helpers.c @@ -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);
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. Fixes: 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by probing DT devices when ACPI is used") Cc: Han Gao <rabenda.cn@gmail.com> Cc: Paul Walmsley <pjw@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> --- drivers/of/of_kunit_helpers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)