On 11/11/25 14:32, Tom Rini wrote:
On Tue, Nov 11, 2025 at 10:29:23AM +0200, Ilias Apalodimas wrote:
Hi Heinrich

On Sun, 9 Nov 2025 at 12:10, Heinrich Schuchardt
<[email protected]> wrote:

The `fdt apply` sub-command is only available if CONFIG_OF_LIBFDT_OVERLAY
is enabled.

Signed-off-by: Heinrich Schuchardt <[email protected]>
---
  test/cmd/fdt.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
index 96a8488e172..a36f2dcdda8 100644
--- a/test/cmd/fdt.c
+++ b/test/cmd/fdt.c
@@ -1319,6 +1319,9 @@ static int fdt_test_apply(struct unit_test_state *uts)
         char fdt[8192], fdto[8192];
         ulong addr, addro;

+       if (!IS_ENABLED(CONFIG_OF_LIBFDT_OVERLAY))
+               return -EAGAIN;

The asserts return CMD_RET_FAILURE on failures. Should't we use the same here?

+
         /* Create base DT with __symbols__ node */
         ut_assertok(fdt_create(fdt, sizeof(fdt)));
         ut_assertok(fdt_finish_reservemap(fdt));

Or just guard the whole test if #ifdef CONFIG_OF_LIBFDT_OVERLAY ...
#endif.


-EGAIN is used for skipping in a good number of tests.
See also the usage in test/test-main.c.

Best regards

Heinrich

Reply via email to