[PATCH 21/31] test: Avoid strange symbols in the assembler file

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Apr 25 04:29:14 CEST 2023



Am 25. April 2023 01:08:26 MESZ schrieb Simon Glass <sjg at chromium.org>:
>This works correctly on Linux with ELF but not on Windows with PE, since
>it creates assembly symbols with invalid names.
>
>Use the lowest/highest valid characters instead. This should still work
>correctly, since we have no tests starting with $ and none starting with
>'z' at present.
>
>Signed-off-by: Simon Glass <sjg at chromium.org>
>---
>
> include/test/test.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/include/test/test.h b/include/test/test.h
>index 838e3ce8a8f3..3e3d14878a7b 100644
>--- a/include/test/test.h
>+++ b/include/test/test.h
>@@ -127,8 +127,8 @@ struct unit_test {
> 	ll_entry_count(struct unit_test, ut_ ## _suite)
> 
> /* Use ! and ~ so that all tests will be sorted between these two values */

This comment needs to be updated.

>-#define UNIT_TEST_ALL_START()	ll_entry_start(struct unit_test, ut_!)
>-#define UNIT_TEST_ALL_END()	ll_entry_start(struct unit_test, ut_~)
>+#define UNIT_TEST_ALL_START()	ll_entry_start(struct unit_test, ut_$)
>+#define UNIT_TEST_ALL_END()	ll_entry_start(struct unit_test, ut_z)

Can we use ut_zz here?

Best regards

Heinrich

> #define UNIT_TEST_ALL_COUNT()	(UNIT_TEST_ALL_END() - UNIT_TEST_ALL_START())
> 
> /* Sizes for devres tests */


More information about the U-Boot mailing list