Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: base/native_library_unittest.cc

Issue 2771563002: Roll clang 296321:298539. (Closed)
Patch Set: tsan Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/clang/scripts/update.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/native_library.h" 7 #include "base/native_library.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/native_library_test_utils.h" 9 #include "base/test/native_library_test_utils.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Verifies that we can load a native library and resolve its exported symbols. 93 // Verifies that we can load a native library and resolve its exported symbols.
94 TEST(NativeLibraryTest, LoadLibrary) { 94 TEST(NativeLibraryTest, LoadLibrary) {
95 TestLibrary library; 95 TestLibrary library;
96 EXPECT_EQ(5, library.Call<int>("GetSimpleTestValue")); 96 EXPECT_EQ(5, library.Call<int>("GetSimpleTestValue"));
97 } 97 }
98 98
99 #endif // !defined(OS_ANDROID) 99 #endif // !defined(OS_ANDROID)
100 100
101 // Android dlopen() requires further investigation, as it might vary across 101 // Android dlopen() requires further investigation, as it might vary across
102 // versions with respect to symbol resolution scope. 102 // versions with respect to symbol resolution scope.
103 #if !defined(OS_ANDROID) 103 // TSan errors out on RTLD_DEEPBIND, https://crbug.com/705255
104 #if !defined(OS_ANDROID) && !defined(THREAD_SANITIZER)
104 105
105 // Verifies that the |prefer_own_symbols| option satisfies its guarantee that 106 // Verifies that the |prefer_own_symbols| option satisfies its guarantee that
106 // a loaded library will always prefer local symbol resolution before 107 // a loaded library will always prefer local symbol resolution before
107 // considering global symbols. 108 // considering global symbols.
108 TEST(NativeLibraryTest, LoadLibraryPreferOwnSymbols) { 109 TEST(NativeLibraryTest, LoadLibraryPreferOwnSymbols) {
109 NativeLibraryOptions options; 110 NativeLibraryOptions options;
110 options.prefer_own_symbols = true; 111 options.prefer_own_symbols = true;
111 TestLibrary library(options); 112 TestLibrary library(options);
112 113
113 // Verify that this binary and the DSO use different storage for 114 // Verify that this binary and the DSO use different storage for
(...skipping 22 matching lines...) Expand all
136 EXPECT_EQ(4, library.Call<int>("NativeLibraryTestIncrement")); 137 EXPECT_EQ(4, library.Call<int>("NativeLibraryTestIncrement"));
137 EXPECT_EQ(2, NativeLibraryTestIncrement()); 138 EXPECT_EQ(2, NativeLibraryTestIncrement());
138 EXPECT_EQ(3, NativeLibraryTestIncrement()); 139 EXPECT_EQ(3, NativeLibraryTestIncrement());
139 } 140 }
140 141
141 #endif // !defined(OS_ANDROID) 142 #endif // !defined(OS_ANDROID)
142 143
143 #endif // !defined(OS_IOS) && !defined(ADDRESS_SANITIZER) 144 #endif // !defined(OS_IOS) && !defined(ADDRESS_SANITIZER)
144 145
145 } // namespace base 146 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | tools/clang/scripts/update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698