/art/dexdump/ |
D | dexdump_test.cc | 41 bool Exec(const std::vector<std::string>& args, std::string* error_msg) { in Exec() argument 46 return ::art::Exec(exec_argv, error_msg); in Exec() 54 std::string error_msg; in TEST_F() local 55 ASSERT_FALSE(Exec({}, &error_msg)) << error_msg; in TEST_F() 59 std::string error_msg; in TEST_F() local 60 ASSERT_FALSE(Exec({"-o", "/non/existent/path", dex_file_}, &error_msg)) << error_msg; in TEST_F() 64 std::string error_msg; in TEST_F() local 65 ASSERT_FALSE(Exec({"-c", "-i", dex_file_}, &error_msg)) << error_msg; in TEST_F() 69 std::string error_msg; in TEST_F() local 71 dex_file_}, &error_msg)) << error_msg; in TEST_F() [all …]
|
/art/dexlist/ |
D | dexlist_test.cc | 43 bool Exec(const std::vector<std::string>& args, std::string* error_msg) { in Exec() argument 48 return ::art::Exec(exec_argv, error_msg); in Exec() 56 std::string error_msg; in TEST_F() local 57 ASSERT_FALSE(Exec({}, &error_msg)) << error_msg; in TEST_F() 61 std::string error_msg; in TEST_F() local 62 ASSERT_FALSE(Exec({"-o", "/non/existent/path", dex_file_}, &error_msg)) << error_msg; in TEST_F() 66 std::string error_msg; in TEST_F() local 67 ASSERT_FALSE(Exec({"-m", "joho", dex_file_}, &error_msg)) << error_msg; in TEST_F() 71 std::string error_msg; in TEST_F() local 72 ASSERT_TRUE(Exec({"-o", "/dev/null", dex_file_}, &error_msg)) << error_msg; in TEST_F() [all …]
|
/art/dexlayout/ |
D | dex_verify.cc | 35 std::string* error_msg) { in VerifyOutputDexFile() argument 37 if (!VerifyIds(orig_header->StringIds(), output_header->StringIds(), "string ids", error_msg) || in VerifyOutputDexFile() 38 !VerifyIds(orig_header->TypeIds(), output_header->TypeIds(), "type ids", error_msg) || in VerifyOutputDexFile() 39 !VerifyIds(orig_header->ProtoIds(), output_header->ProtoIds(), "proto ids", error_msg) || in VerifyOutputDexFile() 40 !VerifyIds(orig_header->FieldIds(), output_header->FieldIds(), "field ids", error_msg) || in VerifyOutputDexFile() 41 !VerifyIds(orig_header->MethodIds(), output_header->MethodIds(), "method ids", error_msg)) { in VerifyOutputDexFile() 45 if (!VerifyClassDefs(orig_header->ClassDefs(), output_header->ClassDefs(), error_msg)) { in VerifyOutputDexFile() 54 std::string* error_msg) { in VerifyIds() argument 58 if (!VerifyId(orig_iter->get(), output_iter->get(), error_msg)) { in VerifyIds() 69 *error_msg = StringPrintf("Mismatch for %s section: %s is longer.", section_name, longer); in VerifyIds() [all …]
|
D | dex_verify.h | 31 std::string* error_msg); 36 std::string* error_msg); 37 bool VerifyId(dex_ir::StringId* orig, dex_ir::StringId* output, std::string* error_msg); 38 bool VerifyId(dex_ir::TypeId* orig, dex_ir::TypeId* output, std::string* error_msg); 39 bool VerifyId(dex_ir::ProtoId* orig, dex_ir::ProtoId* output, std::string* error_msg); 40 bool VerifyId(dex_ir::FieldId* orig, dex_ir::FieldId* output, std::string* error_msg); 41 bool VerifyId(dex_ir::MethodId* orig, dex_ir::MethodId* output, std::string* error_msg); 45 std::string* error_msg); 46 bool VerifyClassDef(dex_ir::ClassDef* orig, dex_ir::ClassDef* output, std::string* error_msg); 52 std::string* error_msg); [all …]
|
D | dexdiag_test.cc | 65 std::string error_msg; in OpenOatAndVdexFiles() local 71 &error_msg)); in OpenOatAndVdexFiles() 72 EXPECT_TRUE(oat != nullptr) << error_msg; in OpenOatAndVdexFiles() 77 bool Exec(pid_t this_pid, const std::vector<std::string>& args, std::string* error_msg) { in Exec() argument 93 return ::art::Exec(exec_argv, error_msg); in Exec() 104 std::string error_msg; in TEST_F() local 105 ASSERT_TRUE(Exec(getpid(), { kDexDiagHelp }, &error_msg)) << "Failed to execute -- because: " in TEST_F() 106 << error_msg; in TEST_F() 116 std::string error_msg; local 117 ASSERT_TRUE(Exec(getpid(), { kDexDiagContains }, &error_msg)) << "Failed to execute -- because: " [all …]
|
D | dexlayout_test.cc | 260 bool FullPlainOutputExec(std::string* error_msg) { in FullPlainOutputExec() argument 274 if (!::art::Exec(dexdump_exec_argv, error_msg)) { in FullPlainOutputExec() 277 if (!DexLayoutExec(dexlayout_args, error_msg)) { in FullPlainOutputExec() 282 if (!::art::Exec(diff_exec_argv, error_msg)) { in FullPlainOutputExec() 290 bool DexFileOutputExec(std::string* error_msg) { in DexFileOutputExec() argument 300 if (!DexLayoutExec(dexlayout_args, error_msg, /*pass_default_cdex_option=*/ false)) { in DexFileOutputExec() 306 if (!::art::Exec(unzip_exec_argv, error_msg)) { in DexFileOutputExec() 311 if (!::art::Exec(diff_exec_argv, error_msg)) { in DexFileOutputExec() 330 std::string error_msg; in CreateProfile() local 336 &error_msg, in CreateProfile() [all …]
|
/art/libartbase/base/ |
D | mem_map_test.cc | 54 std::string error_msg; in GetValidMapAddress() local 59 &error_msg); in GetValidMapAddress() 65 std::string error_msg; in RemapAtEndTest() local 73 &error_msg); in RemapAtEndTest() 77 ASSERT_TRUE(base0 != nullptr) << error_msg; in RemapAtEndTest() 87 &error_msg); in RemapAtEndTest() 89 EXPECT_EQ(m0.Begin(), base0) << error_msg; in RemapAtEndTest() 118 &error_msg); in RemapAtEndTest() 119 ASSERT_TRUE(m2.IsValid()) << error_msg; in RemapAtEndTest() 164 std::string error_msg; in TEST_F() local [all …]
|
D | zip_archive_test.cc | 35 std::string error_msg; in TEST_F() local 36 …que_ptr<ZipArchive> zip_archive(ZipArchive::Open(GetLibCoreDexFileNames()[0].c_str(), &error_msg)); in TEST_F() 37 ASSERT_TRUE(zip_archive.get() != nullptr) << error_msg; in TEST_F() 38 ASSERT_TRUE(error_msg.empty()); in TEST_F() 39 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find("classes.dex", &error_msg)); in TEST_F() 41 ASSERT_TRUE(error_msg.empty()); in TEST_F() 47 bool success = zip_entry->ExtractToFile(*file, &error_msg); in TEST_F() 48 ASSERT_TRUE(success) << error_msg; in TEST_F() 49 ASSERT_TRUE(error_msg.empty()); in TEST_F()
|
D | zip_archive.cc | 61 bool ZipEntry::ExtractToFile(File& file, std::string* error_msg) { in ExtractToFile() argument 64 *error_msg = std::string(ErrorCodeString(error)); in ExtractToFile() 73 std::string* error_msg) { in ExtractToMemMap() argument 81 error_msg); in ExtractToMemMap() 83 DCHECK(!error_msg->empty()); in ExtractToMemMap() 88 if (!ExtractToMemory(map.Begin(), error_msg)) { in ExtractToMemMap() 95 bool ZipEntry::ExtractToMemory(/*out*/uint8_t* buffer, /*out*/std::string* error_msg) { in ExtractToMemory() argument 98 *error_msg = std::string(ErrorCodeString(error)); in ExtractToMemory() 104 MemMap ZipEntry::MapDirectlyFromFile(const char* zip_filename, std::string* error_msg) { in MapDirectlyFromFile() argument 118 *error_msg = StringPrintf("Cannot map '%s' (in zip '%s') directly because it is compressed.", in MapDirectlyFromFile() [all …]
|
D | file_magic.cc | 32 File OpenAndReadMagic(const char* filename, uint32_t* magic, std::string* error_msg) { in OpenAndReadMagic() argument 36 *error_msg = StringPrintf("Unable to open '%s' : %s", filename, strerror(errno)); in OpenAndReadMagic() 39 if (!ReadMagicAndReset(fd.Fd(), magic, error_msg)) { in OpenAndReadMagic() 40 StringPrintf("Error in reading magic from file %s: %s", filename, error_msg->c_str()); in OpenAndReadMagic() 46 bool ReadMagicAndReset(int fd, uint32_t* magic, std::string* error_msg) { in ReadMagicAndReset() argument 49 *error_msg = StringPrintf("Failed to find magic"); in ReadMagicAndReset() 53 *error_msg = StringPrintf("Failed to seek to beginning of file : %s", strerror(errno)); in ReadMagicAndReset()
|
D | scoped_flock.cc | 32 /* static */ ScopedFlock LockedFile::Open(const char* filename, std::string* error_msg) { in Open() argument 33 return Open(filename, O_CREAT | O_RDWR, true, error_msg); in Open() 37 std::string* error_msg) { in Open() argument 43 *error_msg = "flock is unsupported on Windows"; in Open() 54 *error_msg = StringPrintf("Failed to open file '%s': %s", filename, strerror(errno)); in Open() 65 *error_msg = StringPrintf("Failed to lock file '%s': %s", filename, strerror(errno)); in Open() 71 *error_msg = StringPrintf("Failed to fstat file '%s': %s", filename, strerror(errno)); in Open() 104 const bool read_only_mode, std::string* error_msg) { in DupOf() argument 110 *error_msg = "flock is unsupported on Windows."; in DupOf() 121 *error_msg = StringPrintf("Failed to duplicate open file '%s': %s", in DupOf() [all …]
|
/art/libdexfile/dex/ |
D | art_dex_file_loader.cc | 90 std::string* error_msg, in GetMultiDexChecksums() argument 98 if (ReadMagicAndReset(zip_fd, &magic, error_msg)) { in GetMultiDexChecksums() 102 fd = OpenAndReadMagic(filename, &magic, error_msg); in GetMultiDexChecksums() 105 DCHECK(!error_msg->empty()); in GetMultiDexChecksums() 110 ZipArchive::OpenFromFd(fd.Release(), filename, error_msg)); in GetMultiDexChecksums() 112 *error_msg = StringPrintf("Failed to open zip archive '%s' (error msg: %s)", filename, in GetMultiDexChecksums() 113 error_msg->c_str()); in GetMultiDexChecksums() 119 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find(zip_entry_name.c_str(), error_msg)); in GetMultiDexChecksums() 121 *error_msg = StringPrintf("Zip archive '%s' doesn't contain %s (error msg: %s)", filename, in GetMultiDexChecksums() 122 zip_entry_name.c_str(), error_msg->c_str()); in GetMultiDexChecksums() [all …]
|
D | dex_file_loader.cc | 68 const std::vector<uint8_t> Extract(std::string* error_msg) { in Extract() argument 71 DCHECK(!error_msg->empty()); in Extract() 76 *error_msg = std::string(ErrorCodeString(error)); in Extract() 110 static DexZipArchive* Open(const uint8_t* base, size_t size, std::string* error_msg) { in Open() argument 115 *error_msg = std::string(ErrorCodeString(error)); in Open() 122 DexZipEntry* Find(const char* name, std::string* error_msg) const { in Find() 128 *error_msg = std::string(ErrorCodeString(error)); in Find() 215 std::string* error_msg, in GetMultiDexChecksums() argument 218 *error_msg = "UNIMPLEMENTED"; in GetMultiDexChecksums() 229 std::string* error_msg) { in Open() argument [all …]
|
/art/runtime/ |
D | exec_utils_test.cc | 39 std::string error_msg; in TEST_F() local 42 EXPECT_TRUE(Exec(command, &error_msg)); in TEST_F() 43 EXPECT_EQ(0U, error_msg.size()) << error_msg; in TEST_F() 52 std::string error_msg; in TEST_F() local 55 EXPECT_FALSE(Exec(command, &error_msg)); in TEST_F() 56 EXPECT_FALSE(error_msg.empty()); in TEST_F() 73 std::string error_msg; in TEST_F() local 76 EXPECT_FALSE(Exec(command, &error_msg)); in TEST_F() 77 EXPECT_NE(0U, error_msg.size()) << error_msg; in TEST_F() 97 std::string error_msg; in TEST_F() local [all …]
|
D | indirect_reference_table_test.cc | 57 std::string error_msg; in TEST_F() local 61 &error_msg); in TEST_F() 62 ASSERT_TRUE(irt.IsValid()) << error_msg; in TEST_F() 85 iref0 = irt.Add(cookie, obj0.Get(), &error_msg); in TEST_F() 88 IndirectRef iref1 = irt.Add(cookie, obj1.Get(), &error_msg); in TEST_F() 91 IndirectRef iref2 = irt.Add(cookie, obj2.Get(), &error_msg); in TEST_F() 111 EXPECT_FALSE(irt.IsValidReference(iref0, &error_msg)); in TEST_F() 114 iref0 = irt.Add(cookie, obj0.Get(), &error_msg); in TEST_F() 116 iref1 = irt.Add(cookie, obj1.Get(), &error_msg); in TEST_F() 118 iref2 = irt.Add(cookie, obj2.Get(), &error_msg); in TEST_F() [all …]
|
D | oat_file_test.cc | 40 std::string error_msg; in TEST_F() local 42 dex_location, kRuntimeISA, &oat_location, &error_msg)) << error_msg; in TEST_F() 49 &error_msg)); in TEST_F() 63 std::string error_msg; in TEST_F() local 65 dex_location, kRuntimeISA, &oat_location, &error_msg)) << error_msg; in TEST_F() 75 &error_msg)); in TEST_F() 90 &error_msg)); in TEST_F() 92 EXPECT_NE(std::string::npos, error_msg.find("expected 2 uncompressed dex files, but found 1")) in TEST_F() 93 << error_msg; in TEST_F()
|
D | elf_file.cc | 64 std::string* error_msg) { in Open() argument 76 if (!elf_file->Setup(file, prot, flags, low_4gb, error_msg)) { in Open() 87 std::string* error_msg) { in Open() argument 90 if (!elf_file->Setup(file, prot, flags, low_4gb, error_msg)) { in Open() 101 std::string* error_msg) { in Setup() argument 105 *error_msg = StringPrintf("Failed to get length of file: '%s' fd=%d: %s", in Setup() 111 *error_msg = StringPrintf("File size of %zd bytes not large enough to contain ELF header of " in Setup() 128 error_msg), in Setup() 129 error_msg)) { in Setup() 135 *error_msg = StringPrintf("File size of %zd bytes not large enough to contain ELF program " in Setup() [all …]
|
D | exec_utils.cc | 78 int ExecAndReturnCode(std::vector<std::string>& arg_vector, std::string* error_msg) { in ExecAndReturnCode() argument 81 *error_msg = StringPrintf("Failed to execv(%s) because fork failed: %s", in ExecAndReturnCode() 90 *error_msg = StringPrintf("Failed after fork for execv(%s) because waitpid failed: " in ExecAndReturnCode() 104 std::string* error_msg) { in ExecAndReturnCode() argument 110 *error_msg = StringPrintf("Failed to execv(%s) because fork failed: %s", in ExecAndReturnCode() 120 *error_msg = StringPrintf("Failed to set sigprocmask(): %s", strerror(errno)); in ExecAndReturnCode() 132 *error_msg = StringPrintf("Fail to restore sigprocmask(): %s", strerror(errno)); in ExecAndReturnCode() 141 *error_msg = "Timed out."; in ExecAndReturnCode() 144 *error_msg = StringPrintf("Failed to sigtimedwait(): %s", strerror(errno)); in ExecAndReturnCode() 155 *error_msg = StringPrintf("Failed after fork for execv(%s) because waitpid failed: " in ExecAndReturnCode() [all …]
|
/art/runtime/arch/x86/ |
D | instruction_set_features_x86_test.cc | 25 std::string error_msg; in TEST() local 27 InstructionSetFeatures::FromVariant(InstructionSet::kX86, "default", &error_msg)); in TEST() 28 ASSERT_TRUE(x86_features.get() != nullptr) << error_msg; in TEST() 40 std::string error_msg; in TEST() local 42 InstructionSetFeatures::FromVariant(InstructionSet::kX86, "atom", &error_msg)); in TEST() 43 ASSERT_TRUE(x86_features.get() != nullptr) << error_msg; in TEST() 52 InstructionSetFeatures::FromVariant(InstructionSet::kX86_64, "atom", &error_msg)); in TEST() 53 ASSERT_TRUE(x86_64_features.get() != nullptr) << error_msg; in TEST() 65 std::string error_msg; in TEST() local 67 InstructionSetFeatures::FromVariant(InstructionSet::kX86, "sandybridge", &error_msg)); in TEST() [all …]
|
/art/runtime/arch/ |
D | instruction_set_features_test.cc | 59 std::string error_msg; local 61 InstructionSetFeatures::FromVariant(kRuntimeISA, dex2oat_isa_variant, &error_msg)); 62 ASSERT_TRUE(property_features.get() != nullptr) << error_msg; 98 std::string error_msg; local 100 InstructionSetFeatures::FromVariant(kRuntimeISA, dex2oat_isa_variant, &error_msg)); 101 ASSERT_TRUE(base_features.get() != nullptr) << error_msg; 104 base_features->AddFeaturesFromString(dex2oat_isa_features, &error_msg)); 105 ASSERT_TRUE(property_features.get() != nullptr) << error_msg; 135 std::string error_msg; local 137 InstructionSetFeatures::FromVariant(kRuntimeISA, "default", &error_msg)); [all …]
|
/art/dex2oat/linker/ |
D | elf_writer_test.cc | 69 std::string error_msg; in TEST_F() local 74 &error_msg)); in TEST_F() 75 CHECK(ef.get() != nullptr) << error_msg; in TEST_F() 81 std::string error_msg; in TEST_F() local 86 &error_msg)); in TEST_F() 87 CHECK(ef.get() != nullptr) << error_msg; in TEST_F() 93 std::string error_msg; in TEST_F() local 98 &error_msg)); in TEST_F() 99 CHECK(ef.get() != nullptr) << error_msg; in TEST_F() 101 bool success = ef->GetLoadedSize(&size, &error_msg); in TEST_F() [all …]
|
/art/runtime/arch/arm/ |
D | instruction_set_features_arm_test.cc | 25 std::string error_msg; in TEST() local 27 InstructionSetFeatures::FromVariant(InstructionSet::kArm, "krait", &error_msg)); in TEST() 28 ASSERT_TRUE(krait_features.get() != nullptr) << error_msg; in TEST() 39 InstructionSetFeatures::FromVariant(InstructionSet::kArm, "kryo", &error_msg)); in TEST() 40 ASSERT_TRUE(kryo_features.get() != nullptr) << error_msg; in TEST() 51 InstructionSetFeatures::FromVariant(InstructionSet::kArm, "generic", &error_msg)); in TEST() 52 ASSERT_TRUE(generic_features.get() != nullptr) << error_msg; in TEST() 64 InstructionSetFeatures::FromVariant(InstructionSet::kArm, "arm6", &error_msg)); in TEST() 66 EXPECT_NE(error_msg.size(), 0U); in TEST() 70 std::string error_msg; in TEST() local [all …]
|
/art/runtime/gc/space/ |
D | image_space_test.cc | 92 std::string error_msg; in TEST_F() local 93 bool success = CompileBootImage(extra_args, image_dir + '/' + prefix, dex_files, &error_msg); in TEST_F() 94 ASSERT_TRUE(success) << error_msg; in TEST_F() 111 std::string error_msg; in TEST_F() local 112 bool success = StartDex2OatCommandLine(&argv, &error_msg, /*use_runtime_bcp_and_image=*/ false); in TEST_F() 113 ASSERT_TRUE(success) << error_msg; in TEST_F() 127 success = RunDex2Oat(argv, &error_msg); in TEST_F() 128 ASSERT_TRUE(success) << error_msg; in TEST_F() 202 std::string error_msg; in TEST_F() local 209 &error_msg)); in TEST_F() [all …]
|
/art/runtime/arch/arm64/ |
D | instruction_set_features_arm64_test.cc | 25 std::string error_msg; in TEST() local 27 InstructionSetFeatures::FromVariant(InstructionSet::kArm64, "default", &error_msg)); in TEST() 28 ASSERT_TRUE(arm64_features.get() != nullptr) << error_msg; in TEST() 35 InstructionSetFeatures::FromVariant(InstructionSet::kArm64, "cortex-a57", &error_msg)); in TEST() 36 ASSERT_TRUE(cortex_a57_features.get() != nullptr) << error_msg; in TEST() 45 InstructionSetFeatures::FromVariant(InstructionSet::kArm64, "cortex-a73", &error_msg)); in TEST() 46 ASSERT_TRUE(cortex_a73_features.get() != nullptr) << error_msg; in TEST() 59 InstructionSetFeatures::FromVariant(InstructionSet::kArm64, "cortex-a35", &error_msg)); in TEST() 60 ASSERT_TRUE(cortex_a35_features.get() != nullptr) << error_msg; in TEST() 68 InstructionSetFeatures::FromVariant(InstructionSet::kArm64, "kryo", &error_msg)); in TEST() [all …]
|
/art/imgdiag/ |
D | imgdiag_test.cc | 79 bool Exec(pid_t image_diff_pid, const std::string& boot_image, std::string* error_msg) { in Exec() argument 98 return ::art::Exec(exec_argv, error_msg); in Exec() 102 bool ExecDefaultBootImage(pid_t image_diff_pid, std::string* error_msg) { in ExecDefaultBootImage() argument 103 return Exec(image_diff_pid, boot_image_location_, error_msg); in ExecDefaultBootImage() 123 std::string error_msg; in TEST_F() local 124 ASSERT_TRUE(ExecDefaultBootImage(getpid(), &error_msg)) << "Failed to execute -- because: " in TEST_F() 125 << error_msg; in TEST_F() 132 std::string error_msg; in TEST_F() local 134 &error_msg)) << "Incorrectly executed"; in TEST_F() 135 UNUSED(error_msg); in TEST_F()
|