summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-05-11 01:34:26 +0300
committerTom Rini <trini@konsulko.com>2023-05-13 16:52:32 +0300
commitc8894348454aef103a29e5afbfe45c0959b9d45b (patch)
treead0e08049b5acf510ab6f56fe9d30cd1188c47e2 /test
parentd8d40bc392d1ce60660e479a73970666e6a8a7be (diff)
downloadu-boot-c8894348454aef103a29e5afbfe45c0959b9d45b.tar.xz
bootstd: Tidy up reporting of errors
In a few cases the error handling is not quite right. Make sure we return the actual error in distro_efi_read_bootflow_file() rather than -EINVAL. Return -IO when a file cannot be read. Also show the error name if available. This does not change operation, but does make it easier to diagnose problems. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/boot/bootflow.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index fd0e1d6243..bb53bab0c0 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -168,21 +168,21 @@ static int bootflow_cmd_scan_e(struct unit_test_state *uts)
ut_assert_nextlinen("---");
ut_assert_nextline("Scanning bootdev 'mmc2.bootdev':");
ut_assert_nextline(" 0 syslinux media mmc 0 mmc2.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-93");
+ ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
ut_assert_nextline(" 1 efi media mmc 0 mmc2.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-93");
+ ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
ut_assert_nextline("Scanning bootdev 'mmc1.bootdev':");
ut_assert_nextline(" 2 syslinux media mmc 0 mmc1.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-2");
+ ut_assert_nextline(" ** No partition found, err=-2: No such file or directory");
ut_assert_nextline(" 3 efi media mmc 0 mmc1.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-2");
+ ut_assert_nextline(" ** No partition found, err=-2: No such file or directory");
ut_assert_nextline(" 4 syslinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
ut_assert_nextline(" 5 efi fs mmc 1 mmc1.bootdev.part_1 efi/boot/bootsbox.efi");
ut_assert_skip_to_line("Scanning bootdev 'mmc0.bootdev':");
ut_assert_skip_to_line(" 3f efi media mmc 0 mmc0.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-93");
+ ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
ut_assert_nextline("No more bootdevs");
ut_assert_nextlinen("---");
ut_assert_nextline("(64 bootflows, 1 valid)");