/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 | 215 ASSERT_STREQ("", getFakeLogBuf().c_str()); in VerifyAllocCalls() 229 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in VerifyAllocCalls() 252 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 253 ASSERT_STREQ("", getFakeLogPrint().c_str()); in TEST_F() 259 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() 260 ASSERT_STREQ("4 malloc_debug malloc_testing: malloc debug enabled\n", getFakeLogPrint().c_str()); in TEST_F() 273 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in TEST_F() 283 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in TEST_F() 293 ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str()); in TEST_F() 309 ASSERT_STREQ("", getFakeLogBuf().c_str()); in TEST_F() [all …]
|
/bionic/tests/ |
D | dl_test.cpp | 135 eth.SetArgs({ path_to_linker, helper.c_str(), nullptr }); in TEST() 136 …eth.Run([&]() { execve(path_to_linker, eth.GetArgs(), eth.GetEnv()); }, 0, expected_output.c_str()… in TEST() 151 eth.SetArgs({ path_to_linker, helper.c_str(), nullptr }); in TEST() 152 …eth.Run([&]() { execve(path_to_linker, eth.GetArgs(), eth.GetEnv()); }, 0, expected_output.c_str()… in TEST() 162 …]() { execve(path_to_linker, eth.GetArgs(), eth.GetEnv()); }, EXIT_FAILURE, error_message.c_str()); in TEST() 171 chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607 in TEST() 173 eth.SetArgs({ helper.c_str(), nullptr }); in TEST() 174 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST() 183 chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607 in TEST() 185 eth.SetArgs({ helper.c_str(), nullptr }); in TEST() [all …]
|
D | system_properties_test2.cpp | 55 ASSERT_EQ(0, __system_property_set(property_name.c_str(), "value1")); in TEST() 56 ASSERT_EQ(6, __system_property_get(property_name.c_str(), propvalue)); in TEST() 67 ASSERT_EQ(-1, __system_property_set(property_name.c_str(), long_value.c_str())); in TEST() 68 ASSERT_EQ(6, __system_property_get(property_name.c_str(), propvalue)); in TEST() 72 ASSERT_EQ(0, __system_property_set(property_name.c_str(), "value1-1")); in TEST() 73 ASSERT_EQ(8, __system_property_get(property_name.c_str(), propvalue)); in TEST() 86 ASSERT_EQ(0, __system_property_set(long_property_name.c_str(), "value2")); in TEST() 87 ASSERT_EQ(6, __system_property_get(long_property_name.c_str(), propvalue)); in TEST() 91 const prop_info* pi = __system_property_find(property_name.c_str()); in TEST() 102 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() 141 handle_ = android_dlopen_ext(lib_path.c_str(), RTLD_NOW, &extinfo); in TEST_F() 154 extinfo.library_fd = TEMP_FAILURE_RETRY(open(lib_path.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F() 198 const std::string symlink_name = basename(symlink.get_symlink_path().c_str()); in TEST() 205 void* handle2 = android_dlopen_ext(symlink_name.c_str(), RTLD_NOW, &extinfo); in TEST() 215 const std::string symlink_name = basename(symlink.get_symlink_path().c_str()); in TEST() 218 void* handle = dlopen(symlink_name.c_str(), RTLD_NOW); in TEST() [all …]
|
D | cfi_test.cpp | 147 chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607 in TEST() 149 eth.SetArgs({ helper.c_str(), nullptr }); in TEST() 150 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST() 159 chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607 in TEST() 161 eth.SetArgs({ helper.c_str(), nullptr }); in TEST() 162 eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0, nullptr); in TEST()
|
D | gtest_globals.cpp | 32 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()
|
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()
|
D | dlfcn_test.cpp | 874 ASSERT_SUBSTR("/child/thread", child_thread_error.c_str()); in TEST() 887 ASSERT_SUBSTR("/child/thread", child_thread_error.c_str()); in TEST() 940 ASSERT_STREQ(executable_path.c_str(), dli_realpath); in TEST() 969 void* handle2 = dlopen(android::base::GetExecutablePath().c_str(), RTLD_NOW); in TEST() 1159 const std::string symlink_name = basename(symlink.get_symlink_path().c_str()); in TEST() 1161 void* handle2 = dlopen(symlink_name.c_str(), RTLD_NOW); in TEST() 1307 void* handle = dlopen(libpath.c_str(), RTLD_NOW); in TEST() 1579 ASSERT_TRUE(has_elf_hash) << path.c_str() << ": missing elf hash (DT_HASH)"; in validate_compatibility_of_native_library() 1580 ASSERT_TRUE(!has_android_rel) << path.c_str() << ": has packed relocations"; in validate_compatibility_of_native_library() 1584 ASSERT_TRUE(has_rel) << path.c_str() << ": missing DT_REL/DT_RELA"; in validate_compatibility_of_native_library() [all …]
|
/bionic/tools/versioner/src/ |
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() 160 D("Generating guard for availability: %s\n", to_string(avail).c_str()); in generateGuardCondition() 165 to_string(avail).c_str()); in generateGuardCondition() 171 to_string(avail).c_str()); in generateGuardCondition() [all …]
|
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 | 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() 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 …]
|
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() 284 file_path.c_str(), curr_line_num, tag.c_str()); in parseApiLevelValue()
|
D | Driver.cpp | 156 driver_args.push_back(str.c_str()); in generateTargetCC1Flags() 162 errx(1, "driver returned %zu jobs for %s", jobs.size(), to_string(type).c_str()); in generateTargetCC1Flags() 169 errx(1, "driver returned empty command for %s", to_string(type).c_str()); in generateTargetCC1Flags() 179 to_string(type).c_str()); in generateTargetCC1Flags() 189 errx(1, "failed to find target flags for CompilationType %s", to_string(type).c_str()); in getCC1Command() 197 result.push_back(filename.c_str()); in getCC1Command() 199 result.push_back(flag.c_str()); in getCC1Command() 219 to_string(type).c_str()); in initializeTargetCC1FlagCache()
|
D | DeclarationDatabase.h | 140 fprintf(out, "%s", indent_str.c_str()); 150 fprintf(out, "@ %s:%u:%u", StripPrefix(location.filename, base_path).str().c_str(), 156 fprintf(out, "\n%s ", indent_str.c_str()); 160 fprintf(out, "%s\n", to_string(avail).c_str()); 184 fprintf(out, " %s: ", name.c_str()); 187 fprintf(out, "%s\n", to_string(availability).c_str());
|
/bionic/linker/ |
D | linker_phdr.cpp | 189 DL_ERR("can't read file \"%s\": %s", name_.c_str(), strerror(errno)); in ReadElfHeader() 194 DL_ERR("\"%s\" is too small to be an ELF executable: only found %zd bytes", name_.c_str(), in ReadElfHeader() 211 DL_ERR("\"%s\" has bad ELF magic: %02x%02x%02x%02x", name_.c_str(), in VerifyElfHeader() 222 DL_ERR("\"%s\" is 32-bit instead of 64-bit", name_.c_str()); in VerifyElfHeader() 224 DL_ERR("\"%s\" has unknown ELF class: %d", name_.c_str(), elf_class); in VerifyElfHeader() 231 DL_ERR("\"%s\" is 64-bit instead of 32-bit", name_.c_str()); in VerifyElfHeader() 233 DL_ERR("\"%s\" has unknown ELF class: %d", name_.c_str(), elf_class); in VerifyElfHeader() 240 DL_ERR("\"%s\" not little-endian: %d", name_.c_str(), header_.e_ident[EI_DATA]); in VerifyElfHeader() 245 DL_ERR("\"%s\" has unexpected e_type: %d", name_.c_str(), header_.e_type); in VerifyElfHeader() 250 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() 216 const char* original_path = path.c_str(); in resolve_path() 237 if (parse_zip_path(normalized_path.c_str(), &zip_path, &entry_path)) { in resolve_path() 238 if (realpath(zip_path.c_str(), resolved_path) == nullptr) { in resolve_path() 240 zip_path.c_str(), strerror(errno)); in resolve_path() 247 if (stat(normalized_path.c_str(), &s) == 0 && S_ISDIR(s.st_mode)) { in resolve_path()
|
D | linker_config_test.cpp | 141 android::base::make_scope_guard([&version_file] { unlink(version_file.c_str()); }); in run_linker_config_smoke_test() 149 executable_path.c_str(), in run_linker_config_smoke_test() 258 executable_path.c_str(), in TEST() 275 mkdir(sub_dir.c_str(), 0755); in TEST() 278 android::base::make_scope_guard([&sub_dir] { rmdir(sub_dir.c_str()); }); in TEST() 281 symlink(sub_dir.c_str(), symlink_path.c_str()); in TEST() 284 android::base::make_scope_guard([&symlink_path] { unlink(symlink_path.c_str()); }); in TEST() 303 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() 336 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/benchmarks/spawn/ |
D | spawn_benchmarks.cpp | 31 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());
|
D | spawn_benchmark.cpp | 47 "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/benchmarks/ |
D | bionic_benchmarks.cpp | 243 ret = sscanf(arg.c_str(), "AT_ONEBUF_MANUAL_ALIGN_%" SCNd64 "_SIZE_%" SCNd64, in ParseOnebufManualStr() 246 ret = sscanf(arg.c_str(), "AT_ONEBUF_MANUAL_ALIGN_%" SCNd64 "_SIZE_" in ParseOnebufManualStr() 287 ret = sscanf(arg.c_str(), "AT_TWOBUF_MANUAL_ALIGN1_%" SCNd64 "_ALIGN2_%" SCNd64 "_SIZE_%" SCNd64, in ParseTwobufManualStr() 290 ret = sscanf(arg.c_str(), "AT_TWOBUF_MANUAL_ALIGN1_%" SCNd64 "_ALIGN2_%" SCNd64 "_SIZE_" in ParseTwobufManualStr() 327 args.c_str()); in ResolveArgs() 334 args.c_str()); in ResolveArgs() 344 int converted = static_cast<int>(strtol(argstr.c_str(), &check_null, 10)); in ResolveArgs() 346 errx(1, "ERROR: Args str %s contains an invalid macro or int.", args.c_str()); in ResolveArgs() 356 errx(1, "ERROR: No benchmark for function %s", fn_name.c_str()); in RegisterGoogleBenchmarks() 370 auto registration = benchmark::RegisterBenchmark(fn_name.c_str(), LockAndRun, in RegisterGoogleBenchmarks() [all …]
|
D | unistd_benchmark.cpp | 53 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()
|