diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2023-07-03 08:39:53 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-17 15:39:55 -0400 |
commit | 44ef2855e1ec5964c02cadd2cc3423f87524830b (patch) | |
tree | 7c5645eadad71d777ca8ff6a15577c47bc6f4c93 | |
parent | 19c961e21cfcc1ea01f50bcfec09331d112f73d3 (diff) | |
download | u-boot-44ef2855e1ec5964c02cadd2cc3423f87524830b.zip u-boot-44ef2855e1ec5964c02cadd2cc3423f87524830b.tar.gz u-boot-44ef2855e1ec5964c02cadd2cc3423f87524830b.tar.bz2 |
dm: test: Improve partition test error output
Improve the logging when the partition test fails so that it is clear
what went wrong, shown with actual values.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | test/dm/part.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/dm/part.c b/test/dm/part.c index d5c58d6..7dd8bc7 100644 --- a/test/dm/part.c +++ b/test/dm/part.c @@ -17,10 +17,12 @@ static int do_test(struct unit_test_state *uts, int expected, struct blk_desc *mmc_dev_desc; struct disk_partition part_info; - ut_asserteq(expected, - part_get_info_by_dev_and_name_or_num("mmc", part_str, - &mmc_dev_desc, - &part_info, whole)); + int ret = part_get_info_by_dev_and_name_or_num("mmc", part_str, + &mmc_dev_desc, + &part_info, whole); + + ut_assertf(expected == ret, "test(%d, \"%s\", %d) == %d", expected, + part_str, whole, ret); return 0; } |