Enabling COMPILER_RT_INCLUDE_TESTS and updating tests/sanitizer_allocator_test.cc to remove Allocator64 related tests for MIPS.
Diff Detail
Event Timeline
lib/sanitizer_common/tests/CMakeLists.txt | ||
---|---|---|
166 | Please introduce a CMake variable to store a list of architectures that are support in unit tests (by calling filter_available_targets) and use a foreach() loop here and below instead. |
- Introduced new CMake variable 'SANITIZER_TEST_SUPPORTED_ARCH'
- Fixed Printf.Basic Test
lib/sanitizer_common/tests/CMakeLists.txt | ||
---|---|---|
5 | Let's name it as SANITIZER_UNITTEST_SUPPORTED_ARCH. Also, please add a FIXME to just use SANITIZER_COMMON_SUPPORTED_ARCH here. | |
lib/sanitizer_common/tests/sanitizer_allocator_test.cc | ||
32 | This line makes no sense - probably you've meant #if SANITIZER_CAN_USE_ALLOCATOR64 ? | |
lib/sanitizer_common/tests/sanitizer_printf_test.cc | ||
30–31 | I'd prefer to build the expected string for arbitrary value of SANITIZER_POINTER_FORMAT_LENGTH instead. |
lib/sanitizer_common/tests/sanitizer_printf_test.cc | ||
---|---|---|
34 | Sorry didn't got you. memset(expectedString + strlen(expectedString), '0', SANITIZER_POINTER_FORMAT_LENGTH - 3); |
lib/sanitizer_common/tests/sanitizer_printf_test.cc | ||
---|---|---|
34 | No. Please use std::string from STL (http://www.cplusplus.com/reference/string/string/). It overloads operator+ and allows you to concatenate strings easier. You also don't have to care about calculating the size of the buffer (in your case you assumed it would never ever be larger than 70) yourself. |
- used std::string instead of char in lib/sanitizer_common/tests/sanitizer_printf_test.cc
- fixed lib/sanitizer_common/tests/sanitizer_allocator_test.cc:384
Let's name it as SANITIZER_UNITTEST_SUPPORTED_ARCH.
Also, please add a FIXME to just use SANITIZER_COMMON_SUPPORTED_ARCH here.