[PATCH] lib: uuid: fix 32-bit support

Tom Rini trini at konsulko.com
Wed Oct 30 02:14:55 CET 2024


On Wed, Oct 30, 2024 at 01:32:55AM +0100, Caleb Connolly wrote:
> In 22c48a92cdce (lib: uuid: supporting building as part of host tools),
> some instances of simple_strtoull() were accidentally replaced with
> strtoul() instead (spot the difference!).
> 
> To keep compatibility with building as part of host tools, re-implement
> this via a new hextoull macro to handle both cases.
> 
> Fixes: 22c48a92cdce (lib: uuid: supporting building as part of host tools)
> Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
> Reported-by: Patrick DELAUNAY <patrick.delaunay at foss.st.com>
> ---
> I've build-tested this but don't have the hardware set up to easily test.
> ---
>  lib/uuid.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

Close, but not quite:
=================================== FAILURES ===================================
____________________ test_ut[ut_lib_lib_test_dynamic_uuid] _____________________
test/py/tests/test_ut.py:592: in test_ut
    assert output.endswith('Failures: 0')
E   assert False
E    +  where False = <built-in method endswith of str object at 0x7fd53ca39e30>('Failures: 0')
E    +    where <built-in method endswith of str object at 0x7fd53ca39e30> = 'Test: lib_test_dynamic_uuid: uuid.c\r\ntest/lib/uuid.c:114, lib_test_dynamic_uuid_case(): expected_uuid = uuid_str: E...-8e063312964b", got "92a09169-9f8a-5f94-8635-0d9c2e830a92"\r\nTest lib_test_dynamic_uuid failed 1 times\r\nFailures: 1'.endswith
----------------------------- Captured stdout call -----------------------------
U-Boot> ut lib lib_test_dynamic_uuid
Test: lib_test_dynamic_uuid: uuid.c
test/lib/uuid.c:114, lib_test_dynamic_uuid_case(): expected_uuid = uuid_str: Expected "985f2937-7c2e-5e9a-8a5e-8e063312964b", got "92a09169-9f8a-5f94-8635-0d9c2e830a92"
Test lib_test_dynamic_uuid failed 1 times
Failures: 1
U-Boot>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241029/fcf2a1e4/attachment.sig>


More information about the U-Boot mailing list