On 5/31/23 20:24, Tom Rini wrote:
On Wed, May 31, 2023 at 08:05:18PM +0200, Heinrich Schuchardt wrote:
On 5/31/23 19:13, Simon Glass wrote:
Hi Heinrich,
On Wed, 31 May 2023 at 09:52, Tom Rini <tr...@konsulko.com> wrote:
On Wed, May 31, 2023 at 04:25:46PM +0200, Heinrich Schuchardt wrote:
Tom Rini <tr...@konsulko.com> schrieb am Mi., 31. Mai 2023, 16:02:
On Wed, May 31, 2023 at 10:50:52AM +0200, Heinrich Schuchardt wrote:
qemu_arm64_defconfig with UNIT_TEST=y does not build.
CONFIG_EXPO depends on CONFIG_VIDEO. Hence on platforms without video we
must not enable unit tests invoking expo functions.
Fixes: fb1451bec2a5 ("bootstd: Add tests for bootstd including all
uclasses")
Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com>
---
test/boot/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/boot/Makefile b/test/boot/Makefile
index 22ed61c8fa..665017ba3d 100644
--- a/test/boot/Makefile
+++ b/test/boot/Makefile
@@ -2,7 +2,10 @@
#
# Copyright 2021 Google LLC
-obj-$(CONFIG_BOOTSTD) += bootdev.o bootstd_common.o bootflow.o
bootmeth.o
+ifdef CONFIG_BOOTSTD
+obj-y += bootstd_common.o bootmeth.o
+obj-$(VIDEO) += bootdev.o bootflow.o
+endif
obj-$(CONFIG_FIT) += image.o
obj-$(CONFIG_EXPO) += expo.o
OK, but the functionality itself doesn't depend on video, it looks like
maybe only the bootflow_menu_theme test itself, so lets try and solve
this differently.
--
Tom
Yes I should have used CONFIG_EXPO not CONFIG_VIDEO .
Well no, at first glance it's 1 out of 15 tests in that file that depend
on CONFIG_EXPO, so we should just ifdef that test.
Yes, there is only one test in bootflow.o depending on EXPO.
There are multiple tests in bootdev.o depending on CONFIG_DM_MMC.
And the tests presumably check for DM_MMC, or should.
You could put something like this at the top of bootflow_cmd_menu():
/* 'bootflow menu' currently requires a video console */
if (!IS_ENABLED(CONFIG_VIDEO))
return -EAGAIN;
With this change I still get:
aarch64-linux-gnu-ld.bfd: boot/bootflow_menu.o: in function
`bootflow_menu_new':
Looks like there's an extra line in boot/Makefile then, we already
include bootflow_menu.o on EXPO.
Hello Simon,
the bootstd tests are in complete disarray
On the sandbox invoked with
./u-boot -T
=> ut bootstd
Can't map file 'mmc1.img': Invalid argument
mmc1: Unable to map file 'mmc1.img'
Failed to set up for bootstd tests (err=-5)
It I create a file mmc1.img:
test/boot/bootdev.c:460, bootdev_test_bootable(): -EINVAL ==
bootdev_find_in_blk(iter.dev, blk, &iter, &bflow): Expected 0xffffffea
(-22), got 0xffffffa3 (-93)
test/boot/bootdev.c:465, bootdev_test_bootable(): -ENOENT ==
bootdev_find_in_blk(iter.dev, blk, &iter, &bflow): Expected 0xfffffffe
(-2), got 0xffffffa3 (-93)
test/boot/bootdev.c:466, bootdev_test_bootable(): 1 ==
iter.first_bootable: Expected 0x1 (1), got 0x0 (0)
test/boot/bootdev.c:470, bootdev_test_bootable(): -EINVAL ==
bootdev_find_in_blk(iter.dev, blk, &iter, &bflow): Expected 0xffffffea
(-22), got 0xffffffa3 (-93)
Test: bootdev_test_bootable: bootdev.c (flat tree)
test/boot/bootdev.c:460, bootdev_test_bootable(): -EINVAL ==
bootdev_find_in_blk(iter.dev, blk, &iter, &bflow): Expected 0xffffffea
(-22), got 0xffffffa3 (-93)
test/boot/bootdev.c:465, bootdev_test_bootable(): -ENOENT ==
bootdev_find_in_blk(iter.dev, blk, &iter, &bflow): Expected 0xfffffffe
(-2), got 0xffffffa3 (-93)
test/boot/bootdev.c:466, bootdev_test_bootable(): 1 ==
iter.first_bootable: Expected 0x1 (1), got 0x0 (0)
test/boot/bootdev.c:470, bootdev_test_bootable(): -EINVAL ==
bootdev_find_in_blk(iter.dev, blk, &iter, &bflow): Expected 0xffffffea
(-22), got 0xffffffa3 (-93)
Test <NULL> failed 8 times