/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 | file_utils_test.cc | 64 std::string error_msg; in TEST_F() local 69 std::string android_root = GetAndroidRootSafe(&error_msg); in TEST_F() 71 EXPECT_EQ(android_root, android_root_env) << error_msg; in TEST_F() 77 std::string android_root2 = GetAndroidRootSafe(&error_msg); in TEST_F() 78 EXPECT_STREQ(dir, android_root2.c_str()) << error_msg; in TEST_F() 82 EXPECT_EQ(GetAndroidRootSafe(&error_msg), ""); in TEST_F() 83 error_msg = ""; in TEST_F() 89 std::string android_root3 = GetAndroidRootSafe(&error_msg); in TEST_F() 96 EXPECT_STREQ(real_root.get(), real_root3.get()) << error_msg; in TEST_F() 98 EXPECT_STRNE(real_root3.get(), "") << error_msg; in TEST_F() [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 | 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 …]
|
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 …]
|
/art/runtime/ |
D | exec_utils_test.cc | 38 std::string error_msg; in TEST_F() local 41 EXPECT_TRUE(Exec(command, &error_msg)); in TEST_F() 42 EXPECT_EQ(0U, error_msg.size()) << error_msg; in TEST_F() 51 std::string error_msg; in TEST_F() local 54 EXPECT_FALSE(Exec(command, &error_msg)); in TEST_F() 55 EXPECT_FALSE(error_msg.empty()); in TEST_F() 72 std::string error_msg; in TEST_F() local 75 EXPECT_FALSE(Exec(command, &error_msg)); in TEST_F() 76 EXPECT_NE(0U, error_msg.size()) << error_msg; in TEST_F() 96 std::string error_msg; in TEST_F() local [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 | 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() 113 iref0 = irt.Add(cookie, obj0.Get(), &error_msg); in TEST_F() 115 iref1 = irt.Add(cookie, obj1.Get(), &error_msg); in TEST_F() 117 iref2 = irt.Add(cookie, obj2.Get(), &error_msg); in TEST_F() 133 iref0 = irt.Add(cookie, obj0.Get(), &error_msg); in TEST_F() [all …]
|
D | hidden_api_test.cc | 490 static bool Copy(const std::string& src, const std::string& dst, /*out*/ std::string* error_msg) { in Copy() argument 499 *error_msg = "Copy " + src + " => " + dst + " (src_good=" in Copy() 510 /* out */ std::string* error_msg) REQUIRES_SHARED(Locks::mutator_lock_) { in LoadDexFiles() argument 515 error_msg, in LoadDexFiles() 539 static bool Remove(const std::string& path, /*out*/ std::string* error_msg) { in Remove() argument 543 *error_msg = StringPrintf("Unable to remove(\"%s\"): %s", path.c_str(), strerror(errno)); in Remove() 550 /* out */ std::string* error_msg) in CheckAllDexFilesInDomain() argument 559 *error_msg = ss.str(); in CheckAllDexFilesInDomain() 567 *error_msg = ss.str(); in CheckAllDexFilesInDomain() 582 std::string error_msg; in TEST_F() local [all …]
|
/art/libdexfile/dex/ |
D | art_dex_file_loader.cc | 89 std::string* error_msg, in GetMultiDexChecksums() argument 97 if (ReadMagicAndReset(zip_fd, &magic, error_msg)) { in GetMultiDexChecksums() 101 fd = OpenAndReadMagic(filename, &magic, error_msg); in GetMultiDexChecksums() 104 DCHECK(!error_msg->empty()); in GetMultiDexChecksums() 109 ZipArchive::OpenFromFd(fd.Release(), filename, error_msg)); in GetMultiDexChecksums() 111 *error_msg = StringPrintf("Failed to open zip archive '%s' (error msg: %s)", filename, in GetMultiDexChecksums() 112 error_msg->c_str()); in GetMultiDexChecksums() 118 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find(zip_entry_name.c_str(), error_msg)); in GetMultiDexChecksums() 120 *error_msg = StringPrintf("Zip archive '%s' doesn't contain %s (error msg: %s)", filename, in GetMultiDexChecksums() 121 zip_entry_name.c_str(), error_msg->c_str()); in GetMultiDexChecksums() [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 …]
|
D | elf_writer.cc | 36 std::string error_msg; in GetOatElfInformation() local 41 &error_msg)); in GetOatElfInformation() 42 CHECK(elf_file.get() != nullptr) << error_msg; in GetOatElfInformation() 44 bool success = elf_file->GetLoadedSize(oat_loaded_size, &error_msg); in GetOatElfInformation() 45 CHECK(success) << error_msg; in GetOatElfInformation() 52 std::string error_msg; in Fixup() local 53 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, true, false, /*low_4gb*/false, &error_msg)); in Fixup() 54 CHECK(elf_file.get() != nullptr) << error_msg; in Fixup()
|
/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/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/oatdump/ |
D | oatdump_test.cc | 30 std::string error_msg; in TEST_F() local 36 std::string error_msg; in TEST_F() local 42 std::string error_msg; in TEST_F() local 48 std::string error_msg; in TEST_F() local 54 std::string error_msg; in TEST_F() local 60 std::string error_msg; in TEST_F() local 66 std::string error_msg; in TEST_F() local 72 std::string error_msg; in TEST_F() local 78 std::string error_msg; in TEST_F() local 84 std::string error_msg; in TEST_F() local [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()
|