/bionic/libc/malloc_debug/tests/ |
D | malloc_debug_config_tests.cpp | 50 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 52 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F() 58 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 60 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F() 66 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 68 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F() 74 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 77 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F() 83 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 87 ASSERT_STREQ((log_msg + usage_string).c_str(), getFakeLogPrint().c_str()); in TEST_F() [all …]
|
D | malloc_debug_unit_tests.cpp | 210 ASSERT_STREQ("", getFakeLogBuf().c_str()); in VerifyAllocCalls() 224 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in VerifyAllocCalls() 247 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 248 ASSERT_STREQ("", getFakeLogPrint().c_str()); in TEST_F() 254 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 255 ASSERT_STREQ("4 malloc_debug malloc_testing: malloc debug enabled\n", getFakeLogPrint().c_str()); in TEST_F() 268 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in TEST_F() 278 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in TEST_F() 288 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in TEST_F() 304 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() [all …]
|
/bionic/tests/ |
D | dl_test.cpp | 110 eth.SetArgs({ kPathToLinker, helper.c_str(), nullptr }); in TEST() 111 …eth.Run([&]() { execve(kPathToLinker, eth.GetArgs(), eth.GetEnv()); }, 0, expected_output.c_str()); in TEST() 125 eth.SetArgs({ kPathToLinker, helper.c_str(), nullptr }); in TEST() 126 …eth.Run([&]() { execve(kPathToLinker, eth.GetArgs(), eth.GetEnv()); }, 0, expected_output.c_str()); in TEST() 135 …&]() { execve(kPathToLinker, eth.GetArgs(), eth.GetEnv()); }, EXIT_FAILURE, error_message.c_str()); in TEST() 144 chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607 in TEST() 146 eth.SetArgs({ helper.c_str(), nullptr }); in TEST() 147 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST() 156 chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607 in TEST() 158 eth.SetArgs({ helper.c_str(), nullptr }); in TEST() [all …]
|
D | system_properties_test2.cpp | 53 ASSERT_EQ(0, __system_property_set(property_name.c_str(), "value1")); in TEST() 54 ASSERT_EQ(6, __system_property_get(property_name.c_str(), propvalue)); in TEST() 65 ASSERT_EQ(-1, __system_property_set(property_name.c_str(), long_value.c_str())); in TEST() 66 ASSERT_EQ(6, __system_property_get(property_name.c_str(), propvalue)); in TEST() 70 ASSERT_EQ(0, __system_property_set(property_name.c_str(), "value1-1")); in TEST() 71 ASSERT_EQ(8, __system_property_get(property_name.c_str(), propvalue)); in TEST() 84 ASSERT_EQ(0, __system_property_set(long_property_name.c_str(), "value2")); in TEST() 85 ASSERT_EQ(6, __system_property_get(long_property_name.c_str(), propvalue)); in TEST() 89 const prop_info* pi = __system_property_find(property_name.c_str()); in TEST() 100 pi = __system_property_find(long_property_name.c_str()); in TEST() [all …]
|
D | dlext_test.cpp | 113 extinfo.library_fd = TEMP_FAILURE_RETRY(open(lib_path.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F() 115 handle_ = android_dlopen_ext(lib_path.c_str(), RTLD_NOW, &extinfo); in TEST_F() 131 extinfo.library_fd = TEMP_FAILURE_RETRY(open(lib_path.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F() 135 ASSERT_EQ(0, OpenArchive(lib_path.c_str(), &handle)); in TEST_F() 144 handle_ = android_dlopen_ext(lib_path.c_str(), RTLD_NOW, &extinfo); in TEST_F() 157 extinfo.library_fd = TEMP_FAILURE_RETRY(open(lib_path.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F() 201 const std::string symlink_name = basename(symlink.get_symlink_path().c_str()); in TEST() 208 void* handle2 = android_dlopen_ext(symlink_name.c_str(), RTLD_NOW, &extinfo); in TEST() 218 const std::string symlink_name = basename(symlink.get_symlink_path().c_str()); in TEST() 221 void* handle = dlopen(symlink_name.c_str(), RTLD_NOW); in TEST() [all …]
|
D | gtest_globals.cpp | 31 if (!android::base::Realpath(path.c_str(), &out_path)) { in GetTestlibRoot() 32 printf("Failed to get realpath for \"%s\"", path.c_str()); in GetTestlibRoot() 40 printf("\"%s\": does not exists", out_path.c_str()); in GetTestlibRoot()
|
D | cfi_test.cpp | 139 chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607 in TEST() 141 eth.SetArgs({ helper.c_str(), nullptr }); in TEST() 142 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST() 151 chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607 in TEST() 153 eth.SetArgs({ helper.c_str(), nullptr }); in TEST() 154 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST()
|
D | dlfcn_symlink_support.cpp | 72 ASSERT_TRUE(symlink(source_file_path.c_str(), link_path.c_str()) == 0) << strerror(errno); in create_dlfcn_test_symlink() 77 ASSERT_TRUE(unlink(path.c_str()) == 0) << strerror(errno); in remove_dlfcn_test_symlink()
|
/bionic/tools/versioner/src/ |
D | SymbolDatabase.cpp | 44 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()
|
D | Preprocessor.cpp | 75 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() 106 D(" Calculated result: %s\n", to_string(result).c_str()); in calculateRequiredGuard() 113 std::ifstream is(path.c_str()); in readFileLines() 126 err(1, "failed to create directory '%s'", dirname(path).c_str()); in writeFileLines() 129 std::ofstream os(path.c_str(), std::ios_base::out | std::ios_base::trunc); in writeFileLines() 163 D("Generating guard for availability: %s\n", to_string(avail).c_str()); in generateGuardCondition() 168 to_string(avail).c_str()); in generateGuardCondition() 174 to_string(avail).c_str()); in generateGuardCondition() [all …]
|
D | versioner.cpp | 95 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() 299 symbol.name.c_str()); in checkSymbol() 300 fprintf(stderr, " declarations visible in: %s\n", Join(intersection, ", ").c_str()); in checkSymbol() 326 fprintf(stderr, "versioner: inconsistent availability for symbol '%s'\n", symbol.name.c_str()); in checkSymbol() 423 printf("%s: declaration marked available but symbol missing in [%s]\n", symbol_name.c_str(), in checkVersions() [all …]
|
D | Utils.h | 35 std::unique_ptr<char, decltype(&free)> path_copy(strdup(path.c_str()), free); in dirname() 41 if (stat(path.c_str(), &st) == 0 && S_ISDIR(st.st_mode)) { in is_directory() 61 if (mkdir(path.c_str(), 0700) != 0) { in mkdirs()
|
D | VFS.cpp | 38 char* paths[] = { const_cast<char*>(path.c_str()), nullptr }; in addDirectoryToVFS() 43 err(1, "failed to open directory %s", path.c_str()); in addDirectoryToVFS() 86 err(1, "failed to open %s", header_path.c_str()); in createCommonVFS()
|
D | DeclarationDatabase.h | 139 fprintf(out, "%s", indent_str.c_str()); 146 fprintf(out, "@ %s:%u:%u", StripPrefix(location.filename, base_path).str().c_str(), 152 fprintf(out, "\n%s ", indent_str.c_str()); 156 fprintf(out, "%s\n", to_string(avail).c_str()); 180 fprintf(out, " %s: ", name.c_str()); 183 fprintf(out, "%s\n", to_string(availability).c_str());
|
D | Driver.cpp | 162 driver_args.push_back(str.c_str()); in generateTargetCC1Flags() 168 errx(1, "driver returned %zu jobs for %s", jobs.size(), to_string(type).c_str()); in generateTargetCC1Flags() 175 errx(1, "driver returned empty command for %s", to_string(type).c_str()); in generateTargetCC1Flags() 185 to_string(type).c_str()); in generateTargetCC1Flags() 195 errx(1, "failed to find target flags for CompilationType %s", to_string(type).c_str()); in getCC1Command() 203 result.push_back(filename.c_str()); in getCC1Command() 205 result.push_back(flag.c_str()); in getCC1Command() 225 to_string(type).c_str()); in initializeTargetCC1FlagCache()
|
D | SymbolFileParser.cpp | 121 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()
|
D | Utils.cpp | 44 char* dir_argv[2] = { const_cast<char*>(directory.c_str()), nullptr }; in collectHeaders() 49 err(1, "failed to open directory '%s'", directory.c_str()); in collectHeaders()
|
/bionic/linker/ |
D | linker_phdr.cpp | 191 DL_ERR("can't read file \"%s\": %s", name_.c_str(), strerror(errno)); in ReadElfHeader() 196 DL_ERR("\"%s\" is too small to be an ELF executable: only found %zd bytes", name_.c_str(), in ReadElfHeader() 214 DL_ERR("\"%s\" has bad ELF magic: %02x%02x%02x%02x", name_.c_str(), in VerifyElfHeader() 225 DL_ERR("\"%s\" is 32-bit instead of 64-bit", name_.c_str()); in VerifyElfHeader() 227 DL_ERR("\"%s\" has unknown ELF class: %d", name_.c_str(), elf_class); in VerifyElfHeader() 234 DL_ERR("\"%s\" is 64-bit instead of 32-bit", name_.c_str()); in VerifyElfHeader() 236 DL_ERR("\"%s\" has unknown ELF class: %d", name_.c_str(), elf_class); in VerifyElfHeader() 243 DL_ERR("\"%s\" not little-endian: %d", name_.c_str(), header_.e_ident[EI_DATA]); in VerifyElfHeader() 248 DL_ERR("\"%s\" has unexpected e_type: %d", name_.c_str(), header_.e_type); in VerifyElfHeader() 253 DL_ERR("\"%s\" has unexpected e_version: %d", name_.c_str(), header_.e_version); in VerifyElfHeader() [all …]
|
D | linker_utils.cpp | 120 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() 209 const char* original_path = path.c_str(); in resolve_paths() 230 if (parse_zip_path(normalized_path.c_str(), &zip_path, &entry_path)) { in resolve_paths() 231 if (realpath(zip_path.c_str(), resolved_path) == nullptr) { in resolve_paths() 233 zip_path.c_str(), strerror(errno)); in resolve_paths() 240 if (stat(normalized_path.c_str(), &s) == 0 && S_ISDIR(s.st_mode)) { in resolve_paths()
|
D | linker_config_test.cpp | 138 android::base::make_scope_guard([&version_file] { unlink(version_file.c_str()); }); in run_linker_config_smoke_test() 146 executable_path.c_str(), in run_linker_config_smoke_test() 255 executable_path.c_str(), in TEST() 272 mkdir(sub_dir.c_str(), 0755); in TEST() 275 android::base::make_scope_guard([&sub_dir] { rmdir(sub_dir.c_str()); }); in TEST() 278 symlink(sub_dir.c_str(), symlink_path.c_str()); in TEST() 281 android::base::make_scope_guard([&symlink_path] { unlink(symlink_path.c_str()); }); in TEST() 300 executable_path.c_str(), in TEST()
|
D | linker_config.cpp | 177 async_safe_format_buffer(buf, sizeof(buf), "%s:%zu: error: %s", file, lineno, msg.c_str()); in create_error_msg() 209 error.c_str()); in parse_config_file() 223 name.c_str()); in parse_config_file() 242 if (access(value.c_str(), R_OK) != 0) { in parse_config_file() 250 } else if (realpath(value.c_str(), buf)) { in parse_config_file() 260 value.c_str(), in parse_config_file() 272 INFO("[ Using config section \"%s\" ]", section_name.c_str()); in parse_config_file() 311 name.c_str()); in parse_config_file() 320 name.c_str()); in parse_config_file() 335 name.c_str()); in parse_config_file() [all …]
|
/bionic/benchmarks/tests/ |
D | interface_test.cpp | 201 Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_small.xml").c_str(), in TEST_F() 219 Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_medium.xml").c_str(), in TEST_F() 234 Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_from_each.xml").c_str(), in TEST_F() 282 GetBionicXmlArg("test_medium.xml").c_str(), in TEST_F() 398 Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_size.xml").c_str()}); in TEST_F() 864 std::vector<const char*>{GetBionicXmlArg("test_alignment_onebuf.xml").c_str()}); in TEST_F() 886 std::vector<const char*>{GetBionicXmlArg("test_alignment_onebuf_manual.xml").c_str()}); in TEST_F() 2852 std::vector<const char*>{GetBionicXmlArg("test_alignment_twobuf.xml").c_str()}); in TEST_F() 2909 std::vector<const char*>{GetBionicXmlArg("test_alignment_twobuf_manual.xml").c_str()}); in TEST_F()
|
/bionic/libc/malloc_debug/ |
D | Config.cpp | 150 long long_value = strtol(value.c_str(), &end, 10); in ParseValue() 152 error_log("%s: bad value for option '%s': %s", getprogname(), option.c_str(), strerror(errno)); in ParseValue() 155 if (end == value.c_str()) { in ParseValue() 156 error_log("%s: bad value for option '%s'", getprogname(), option.c_str()); in ParseValue() 159 if (static_cast<size_t>(end - value.c_str()) != value.size()) { in ParseValue() 161 option.c_str(), end); in ParseValue() 166 option.c_str(), long_value); in ParseValue() 172 option.c_str(), min_value, long_value); in ParseValue() 177 option.c_str(), max_value, long_value); in ParseValue() 321 option.c_str()); in VerifyValueEmpty() [all …]
|
/bionic/libc/private/ |
D | FdPath.h | 25 const char* c_str() { in c_str() function
|
/bionic/benchmarks/ |
D | bionic_benchmarks.cpp | 241 ret = sscanf(arg.c_str(), "AT_ONEBUF_MANUAL_ALIGN_%" SCNd64 "_SIZE_%" SCNd64, in ParseOnebufManualStr() 244 ret = sscanf(arg.c_str(), "AT_ONEBUF_MANUAL_ALIGN_%" SCNd64 "_SIZE_" in ParseOnebufManualStr() 285 ret = sscanf(arg.c_str(), "AT_TWOBUF_MANUAL_ALIGN1_%" SCNd64 "_ALIGN2_%" SCNd64 "_SIZE_%" SCNd64, in ParseTwobufManualStr() 288 ret = sscanf(arg.c_str(), "AT_TWOBUF_MANUAL_ALIGN1_%" SCNd64 "_ALIGN2_%" SCNd64 "_SIZE_" in ParseTwobufManualStr() 325 args.c_str()); in ResolveArgs() 332 args.c_str()); in ResolveArgs() 342 int converted = static_cast<int>(strtol(argstr.c_str(), &check_null, 10)); in ResolveArgs() 344 errx(1, "ERROR: Args str %s contains an invalid macro or int.", args.c_str()); in ResolveArgs() 354 errx(1, "ERROR: No benchmark for function %s", fn_name.c_str()); in RegisterGoogleBenchmarks() 368 auto registration = benchmark::RegisterBenchmark(fn_name.c_str(), LockAndRun, in RegisterGoogleBenchmarks() [all …]
|