Message ID | 20230430013003.1047454-15-sjg@chromium.org |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | Allow building sandbox with MSYS2 | expand |
On Sun, Apr 30, 2023 at 9:30 AM Simon Glass <sjg@chromium.org> wrote: > > 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@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(-) > Reviewed-by: Bin Meng <bmeng@tinylab.org> Tested-by: Bin Meng <bmeng@tinylab.org>
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 */
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@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(-)