tsan: fix tests to consistently use internal functions (otherwise it leads to false positives)
llvm-svn: 171057
This commit is contained in:
parent
f0a014bbb7
commit
116518af74
|
@ -72,7 +72,7 @@ TEST(SanitizerCommon, MmapAlignedOrDie) {
|
|||
uptr res = (uptr)MmapAlignedOrDie(
|
||||
size * PageSize, alignment * PageSize, "MmapAlignedOrDieTest");
|
||||
EXPECT_EQ(0U, res % (alignment * PageSize));
|
||||
memset((void*)res, 1, size * PageSize);
|
||||
internal_memset((void*)res, 1, size * PageSize);
|
||||
UnmapOrDie((void*)res, size * PageSize);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
#include "sanitizer_common/sanitizer_common.h"
|
||||
#include "sanitizer_common/sanitizer_flags.h"
|
||||
#include "sanitizer_common/sanitizer_libc.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <string.h>
|
||||
|
@ -31,7 +32,7 @@ static void TestStrFlag(const char *start_value, const char *env,
|
|||
const char *final_value) {
|
||||
const char *flag = start_value;
|
||||
ParseFlag(env, &flag, kFlagName);
|
||||
EXPECT_STREQ(final_value, flag);
|
||||
EXPECT_EQ(internal_strcmp(final_value, flag), 0);
|
||||
}
|
||||
|
||||
TEST(SanitizerCommon, BooleanFlags) {
|
||||
|
|
Loading…
Reference in New Issue