Home
last modified time | relevance | path

Searched refs:c_str (Results 1 – 25 of 95) sorted by relevance

1234

/bionic/libc/malloc_debug/tests/
Dmalloc_debug_config_tests.cpp51 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F()
53 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F()
59 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F()
61 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F()
67 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F()
69 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F()
75 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F()
78 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F()
84 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F()
88 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F()
[all …]
Dmalloc_debug_unit_tests.cpp122 unlink(record_filename.c_str()); in TearDown()
135 init += android::base::StringPrintf(" record_allocs_file=%s", record_filename.c_str()); in InitRecordAllocs()
136 Init(init.c_str()); in InitRecordAllocs()
190 ASSERT_STREQ(str.c_str(), actual.substr(offset, str.size()).c_str()); in VerifyRecords()
257 ASSERT_STREQ("", getFakeLogBuf().c_str()); in VerifyAllocCalls()
277 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in VerifyAllocCalls()
300 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F()
301 ASSERT_STREQ("", getFakeLogPrint().c_str()); in TEST_F()
307 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F()
308 ASSERT_STREQ("4 malloc_debug malloc_testing: malloc debug enabled\n", getFakeLogPrint().c_str()); in TEST_F()
[all …]
/bionic/tests/
Dsystem_properties_test2.cpp51 ASSERT_EQ(0, __system_property_set(property_name.c_str(), "value1")); in TEST()
52 ASSERT_EQ(6, __system_property_get(property_name.c_str(), propvalue)); in TEST()
63 ASSERT_EQ(-1, __system_property_set(property_name.c_str(), long_value.c_str())); in TEST()
64 ASSERT_EQ(6, __system_property_get(property_name.c_str(), propvalue)); in TEST()
68 ASSERT_EQ(0, __system_property_set(property_name.c_str(), "value1-1")); in TEST()
69 ASSERT_EQ(8, __system_property_get(property_name.c_str(), propvalue)); in TEST()
82 ASSERT_EQ(0, __system_property_set(long_property_name.c_str(), "value2")); in TEST()
83 ASSERT_EQ(6, __system_property_get(long_property_name.c_str(), propvalue)); in TEST()
87 const prop_info* pi = __system_property_find(property_name.c_str()); in TEST()
98 pi = __system_property_find(long_property_name.c_str()); in TEST()
[all …]
Dmemtag_stack_dlopen_test.cpp51 eth.SetArgs({path.c_str(), nullptr}); in TEST()
52 eth.SetEnv({ld_library_path.c_str(), nullptr}); in TEST()
53 eth.Run([&]() { execve(path.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, "RAN"); in TEST()
69 eth.SetArgs({path.c_str(), nullptr}); in TEST()
70 eth.SetEnv({ld_library_path.c_str(), nullptr}); in TEST()
71 eth.Run([&]() { execve(path.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, "RAN"); in TEST()
90 eth.SetArgs({path.c_str(), lib_path.c_str(), nullptr}); in TEST()
91 eth.SetEnv({ld_library_path.c_str(), nullptr}); in TEST()
92 eth.Run([&]() { execve(path.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, "RAN"); in TEST()
111 eth.SetArgs({path.c_str(), lib_path.c_str(), nullptr}); in TEST()
[all …]
Dgwp_asan_test.cpp82 flock_fd_ = open(path.c_str(), O_RDONLY); in SyspropRestorer()
86 const char* basename = __gnu_basename(path.c_str()); in SyspropRestorer()
110 __system_property_set(prop.c_str(), ""); in SyspropRestorer()
118 __system_property_set(kv.first.c_str(), kv.second.c_str()); in ~SyspropRestorer()
126 const prop_info* pi = __system_property_find(name.c_str()); in GetSysprop()
172 const char* basename = __gnu_basename(path.c_str()); in TEST()
173 __system_property_set((std::string("libc.debug.gwp_asan.sample_rate.") + basename).c_str(), "1"); in TEST()
174 __system_property_set((std::string("libc.debug.gwp_asan.process_sampling.") + basename).c_str(), in TEST()
176 __system_property_set((std::string("libc.debug.gwp_asan.max_allocs.") + basename).c_str(), in TEST()
189 const char* basename = __gnu_basename(path.c_str()); in TEST()
[all …]
Ddl_test.cpp128 eth.SetArgs({ path_to_linker, helper.c_str(), nullptr }); in TEST()
145 eth.SetArgs({ path_to_linker, helper.c_str(), nullptr }); in TEST()
157 …]() { execve(path_to_linker, eth.GetArgs(), eth.GetEnv()); }, EXIT_FAILURE, error_message.c_str()); in TEST()
166 eth.SetArgs({ helper.c_str(), nullptr }); in TEST()
167 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST()
176 eth.SetArgs({ helper.c_str(), nullptr }); in TEST()
177 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST()
189 eth.SetArgs({ helper.c_str(), nullptr }); in TEST()
190 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, "12345"); in TEST()
199 eth.SetArgs({ helper.c_str(), nullptr }); in TEST()
[all …]
Ddlext_test.cpp115 extinfo.library_fd = TEMP_FAILURE_RETRY(open(lib_path.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F()
117 handle_ = android_dlopen_ext(lib_path.c_str(), RTLD_NOW, &extinfo); in TEST_F()
133 extinfo.library_fd = TEMP_FAILURE_RETRY(open(lib_path.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F()
137 ASSERT_EQ(0, OpenArchive(lib_path.c_str(), &handle)); in TEST_F()
143 handle_ = android_dlopen_ext(lib_path.c_str(), RTLD_NOW, &extinfo); in TEST_F()
156 extinfo.library_fd = TEMP_FAILURE_RETRY(open(lib_path.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F()
200 const std::string symlink_name = basename(symlink.get_symlink_path().c_str()); in TEST()
207 void* handle2 = android_dlopen_ext(symlink_name.c_str(), RTLD_NOW, &extinfo); in TEST()
217 const std::string symlink_name = basename(symlink.get_symlink_path().c_str()); in TEST()
220 void* handle = dlopen(symlink_name.c_str(), RTLD_NOW); in TEST()
[all …]
Dutils.cpp45 eh.SetArgs({exec.c_str(), "--gtest_also_run_disabled_tests", filter_arg.c_str(), nullptr}); in RunGwpAsanTest()
46 eh.Run([&]() { execve(exec.c_str(), eh.GetArgs(), eh.GetEnv()); }, in RunGwpAsanTest()
57 eh.SetArgs({exec.c_str(), "--gtest_also_run_disabled_tests", filter_arg.c_str(), nullptr}); in RunSubtestNoEnv()
58 eh.Run([&]() { execve(exec.c_str(), eh.GetArgs(), eh.GetEnv()); }, in RunSubtestNoEnv()
Dsys_thread_properties_test.cpp28 eth.SetArgs({helper.c_str(), nullptr}); in TEST()
29 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, expected_out); in TEST()
39 eth.SetArgs({helper.c_str(), nullptr}); in TEST()
40 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, expected_out); in TEST()
Dgtest_globals.cpp32 if (!android::base::Realpath(path.c_str(), &out_path)) { in GetTestLibRoot()
33 printf("Failed to get realpath for \"%s\"\n", path.c_str()); in GetTestLibRoot()
41 printf("\"%s\": does not exists\n", out_path.c_str()); in GetTestLibRoot()
Delftls_test.cpp97 eth.SetArgs({helper.c_str(), nullptr}); in TEST()
98 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST()
104 eth.SetArgs({helper.c_str(), nullptr}); in TEST()
105 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST()
Dsystem_properties_test.cpp48 mkdir(appcompat_path.c_str(), S_IRWXU | S_IXGRP | S_IXOTH); in SystemPropertiesTest()
56 umount2(real_sysprop_dir.c_str(), MNT_DETACH); in ~SystemPropertiesTest()
65 const char* get_appcompat_path() const { return appcompat_path.c_str(); } in get_appcompat_path()
67 const char* get_mount_path() const { return mount_path.c_str(); } in get_mount_path()
69 const char* get_real_sysprop_dir() const { return real_sysprop_dir.c_str(); } in get_real_sysprop_dir()
537 ASSERT_EQ(0, system_properties.Add(name.c_str(), name.size(), value.c_str(), value.size())); in TEST()
543 ASSERT_EQ(0, system_properties.Add(name.c_str(), name.size(), value.c_str(), value.size())); in TEST()
549 EXPECT_EQ(static_cast<int>(expected_value.size()), system_properties.Get(name.c_str(), value)) in TEST()
556 const prop_info* pi = system_properties.Find(name.c_str()); in TEST()
603 ASSERT_NE(0, system_properties.Add(name.c_str(), name.size(), value.c_str(), value.size())); in TEST()
[all …]
Dhwasan_test.cpp64 ASSERT_EQ(0, access(path.c_str(), F_OK)); // Verify test setup. in TEST()
67 ASSERT_EQ(0, access(hwasan_path.c_str(), F_OK)); // Verify test setup. in TEST()
69 void* handle = dlopen(path.c_str(), RTLD_NOW); in TEST()
/bionic/tools/versioner/src/
DPreprocessor.cpp75 D("Calculating required guard for %s:\n", declaration.name.c_str()); in calculateRequiredGuard()
76 D(" Declaration availability: %s\n", to_string(decl_av).c_str()); in calculateRequiredGuard()
92 arch_visibility_str.c_str()); in calculateRequiredGuard()
107 D(" Calculated result: %s\n", to_string(result).c_str()); in calculateRequiredGuard()
114 std::ifstream is(path.c_str()); in readFileLines()
127 err(1, "failed to create directory '%s'", dirname(path).c_str()); in writeFileLines()
130 std::ofstream os(path.c_str(), std::ios_base::out | std::ios_base::trunc); in writeFileLines()
161 D("Generating guard for availability: %s\n", to_string(avail).c_str()); in generateGuardCondition()
166 to_string(avail).c_str()); in generateGuardCondition()
175 to_string(avail).c_str()); in generateGuardCondition()
[all …]
DSymbolDatabase.cpp44 errx(1, "failed to open library at %s: %s\n", filename.c_str(), in getSymbols()
45 llvm::toString(binaryOrError.takeError()).c_str()); in getSymbols()
50 errx(1, "failed to parse %s as ELF", filename.c_str()); in getSymbols()
57 errx(1, "failed to get symbol name for symbol in %s: %s", filename.c_str(), in getSymbols()
58 llvm::toString(symbolNameOrError.takeError()).c_str()); in getSymbols()
82 errx(1, "error: failed to load: %s", path.c_str()); in parsePlatform()
94 printf("duplicated symbol '%s' in '%s'\n", symbol_name.c_str(), path.c_str()); in parsePlatform()
Dversioner.cpp95 return stat(path.c_str(), &st) == 0 && S_ISDIR(st.st_mode); in is_dir()
110 DIR* dir = opendir(dir_path.c_str()); in collectRequirements()
112 err(1, "failed to open dependency directory '%s'", dir_path.c_str()); in collectRequirements()
125 if (stat(dependency.c_str(), &st) != 0) { in collectRequirements()
126 err(1, "failed to stat dependency '%s'", dependency.c_str()); in collectRequirements()
130 errx(1, "'%s' is not a directory", dependency.c_str()); in collectRequirements()
301 symbol.name.c_str()); in checkSymbol()
302 fprintf(stderr, " declarations visible in: %s\n", Join(intersection, ", ").c_str()); in checkSymbol()
328 fprintf(stderr, "versioner: inconsistent availability for symbol '%s'\n", symbol.name.c_str()); in checkSymbol()
425 printf("%s: declaration marked available but symbol missing in [%s]\n", symbol_name.c_str(), in checkVersions()
[all …]
DSymbolFileParser.cpp121 file_path.c_str(), curr_line_num); in parseVersion()
138 file_path.c_str(), curr_line_num); in parseVersion()
173 file_path.c_str(), curr_line_num, visibility.c_str()); in parseVersion()
182 file_path.c_str(), curr_line_num); in parseVersion()
191 file_path.c_str(), curr_line_num); in parseVersion()
200 file_path.c_str(), curr_line_num, start_line_num); in parseVersion()
284 file_path.c_str(), curr_line_num, tag.c_str()); in parseApiLevelValue()
/bionic/benchmarks/spawn/
Dspawn_benchmarks.cpp31 SPAWN_BENCHMARK(noop, test_program("bench_noop").c_str());
32 SPAWN_BENCHMARK(noop_nostl, test_program("bench_noop_nostl").c_str());
33 SPAWN_BENCHMARK(noop_static, test_program("bench_noop_static").c_str());
34 SPAWN_BENCHMARK(bench_cxa_atexit, test_program("bench_cxa_atexit").c_str(), "100000", "_Exit");
35 SPAWN_BENCHMARK(bench_cxa_atexit_full, test_program("bench_cxa_atexit").c_str(), "100000", "exit");
Dspawn_benchmark.cpp47 "posix_spawn of %s failed: %s", argv[0], strerror(spawn_err)).c_str()); in BM_spawn_test()
56 static_cast<int>(child), argv[0], strerror(errno)).c_str()); in BM_spawn_test()
60 state.SkipWithError(android::base::StringPrintf("could not exec %s", argv[0]).c_str()); in BM_spawn_test()
/bionic/linker/
Dlinker_phdr.cpp226 DL_ERR("can't read file \"%s\": %s", name_.c_str(), strerror(errno)); in ReadElfHeader()
231 DL_ERR("\"%s\" is too small to be an ELF executable: only found %zd bytes", name_.c_str(), in ReadElfHeader()
249 DL_ERR("\"%s\" has bad ELF magic: %02x%02x%02x%02x", name_.c_str(), in VerifyElfHeader()
260 DL_ERR("\"%s\" is 32-bit instead of 64-bit", name_.c_str()); in VerifyElfHeader()
262 DL_ERR("\"%s\" has unknown ELF class: %d", name_.c_str(), elf_class); in VerifyElfHeader()
269 DL_ERR("\"%s\" is 64-bit instead of 32-bit", name_.c_str()); in VerifyElfHeader()
271 DL_ERR("\"%s\" has unknown ELF class: %d", name_.c_str(), elf_class); in VerifyElfHeader()
278 DL_ERR("\"%s\" not little-endian: %d", name_.c_str(), header_.e_ident[EI_DATA]); in VerifyElfHeader()
283 DL_ERR("\"%s\" has unexpected e_type: %d", name_.c_str(), header_.e_type); in VerifyElfHeader()
288 DL_ERR("\"%s\" has unexpected e_version: %d", name_.c_str(), header_.e_version); in VerifyElfHeader()
[all …]
Dlinker_utils.cpp120 const char* needle = dir.c_str(); in file_is_in_dir()
121 const char* haystack = file.c_str(); in file_is_in_dir()
130 const char* needle = dir.c_str(); in file_is_under_dir()
131 const char* haystack = file.c_str(); in file_is_under_dir()
146 const char* const path = normalized_path.c_str(); in parse_zip_path()
206 const char* original_path = path.c_str(); in resolve_path()
227 if (parse_zip_path(normalized_path.c_str(), &zip_path, &entry_path)) { in resolve_path()
228 if (realpath(zip_path.c_str(), resolved_path) == nullptr) { in resolve_path()
230 zip_path.c_str(), strerror(errno)); in resolve_path()
237 if (stat(normalized_path.c_str(), &s) == 0 && S_ISDIR(s.st_mode)) { in resolve_path()
Dlinker_config_test.cpp178 android::base::make_scope_guard([&version_file] { unlink(version_file.c_str()); }); in run_linker_config_smoke_test()
186 executable_path.c_str(), in run_linker_config_smoke_test()
300 executable_path.c_str(), in TEST()
318 mkdir(sub_dir.c_str(), 0755); in TEST()
321 android::base::make_scope_guard([&sub_dir] { rmdir(sub_dir.c_str()); }); in TEST()
324 symlink(sub_dir.c_str(), symlink_path.c_str()); in TEST()
327 android::base::make_scope_guard([&symlink_path] { unlink(symlink_path.c_str()); }); in TEST()
346 executable_path.c_str(), in TEST()
/bionic/benchmarks/tests/
Dinterface_test.cpp90 args.insert(args.begin(), exe.c_str()); in Exec()
148 ASSERT_NE(-1, stat(exe.c_str(), &st)) << "Stat of " << exe << " failed"; in TEST_F()
204 Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_small.xml").c_str(), in TEST_F()
224 Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_medium.xml").c_str(), in TEST_F()
239 Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_from_each.xml").c_str(), in TEST_F()
292 GetBionicXmlArg("test_medium.xml").c_str(), in TEST_F()
410 Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_size.xml").c_str()}); in TEST_F()
878 std::vector<const char*>{GetBionicXmlArg("test_alignment_onebuf.xml").c_str()}); in TEST_F()
900 std::vector<const char*>{GetBionicXmlArg("test_alignment_onebuf_manual.xml").c_str()}); in TEST_F()
2868 std::vector<const char*>{GetBionicXmlArg("test_alignment_twobuf.xml").c_str()}); in TEST_F()
[all …]
/bionic/libc/system_properties/
Dcontext_node.cpp54 pa_ = prop_area::map_prop_area_rw(filename.c_str(), context_, fsetxattr_failed); in Open()
56 pa_ = prop_area::map_prop_area(filename.c_str()); in Open()
82 return access(filename.c_str(), R_OK) == 0; in CheckAccess()
/bionic/benchmarks/
Dunistd_benchmark.cpp53 state.SkipWithError(err.c_str()); in BM_unistd_fork_call()
59 state.SkipWithError(err.c_str()); in BM_unistd_fork_call()
63 state.SkipWithError(err.c_str()); in BM_unistd_fork_call()

1234