[PATCH v2 14/30] test: Avoid strange symbols in the assembler file
Simon Glass
sjg at chromium.org
Sun Apr 30 03:29:47 CEST 2023
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
'zz' at present.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Update comment and use zz to make it less likely we have a problem
include/test/test.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/test/test.h b/include/test/test.h
index 838e3ce8a8f3..fd07238a7b0b 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -126,9 +126,9 @@ struct unit_test {
#define UNIT_TEST_SUITE_COUNT(_suite) \
ll_entry_count(struct unit_test, ut_ ## _suite)
-/* Use ! and ~ so that all tests will be sorted between these two values */
-#define UNIT_TEST_ALL_START() ll_entry_start(struct unit_test, ut_!)
-#define UNIT_TEST_ALL_END() ll_entry_start(struct unit_test, ut_~)
+/* Use $ and zz so that all tests will be sorted between these two values */
+#define UNIT_TEST_ALL_START() ll_entry_start(struct unit_test, ut_$)
+#define UNIT_TEST_ALL_END() ll_entry_start(struct unit_test, ut_zz)
#define UNIT_TEST_ALL_COUNT() (UNIT_TEST_ALL_END() - UNIT_TEST_ALL_START())
/* Sizes for devres tests */
--
2.40.1.495.gc816e09b53d-goog
More information about the U-Boot
mailing list