Home
last modified time | relevance | path

Searched refs:error_msg (Results 1 – 25 of 97) sorted by relevance

1234

/art/oatdump/
Doatdump_test.cc61 bool Exec(Mode mode, const std::vector<std::string>& args, std::string* error_msg) { in Exec() argument
79 return ::art::Exec(exec_argv, error_msg); in Exec()
88 std::string error_msg; in TEST_F() local
89 ASSERT_TRUE(Exec(kModeArt, {}, &error_msg)) << error_msg; in TEST_F()
93 std::string error_msg; in TEST_F() local
94 ASSERT_TRUE(Exec(kModeOat, {}, &error_msg)) << error_msg; in TEST_F()
98 std::string error_msg; in TEST_F() local
99 ASSERT_TRUE(Exec(kModeArt, {"--dump:raw_mapping_table"}, &error_msg)) << error_msg; in TEST_F()
103 std::string error_msg; in TEST_F() local
104 ASSERT_TRUE(Exec(kModeArt, {"--dump:raw_gc_map"}, &error_msg)) << error_msg; in TEST_F()
[all …]
/art/runtime/
Dmem_map_test.cc37 std::string error_msg; in RemapAtEndTest() local
47 &error_msg); in RemapAtEndTest()
50 ASSERT_TRUE(base0 != nullptr) << error_msg; in RemapAtEndTest()
60 &error_msg); in RemapAtEndTest()
62 EXPECT_EQ(m0->Begin(), base0) << error_msg; in RemapAtEndTest()
131 std::string error_msg; in TEST_F() local
138 &error_msg)); in TEST_F()
139 ASSERT_TRUE(map.get() != nullptr) << error_msg; in TEST_F()
140 ASSERT_TRUE(error_msg.empty()); in TEST_F()
147 &error_msg)); in TEST_F()
[all …]
Ddex_file_verifier_test.cc106 std::string* error_msg) { in OpenDexFileBase64() argument
127 bool success = DexFile::Open(location, location, error_msg, &tmp); in OpenDexFileBase64()
128 CHECK(success) << error_msg; in OpenDexFileBase64()
154 std::string error_msg; in TEST_F() local
156 &error_msg)); in TEST_F()
157 ASSERT_TRUE(raw.get() != nullptr) << error_msg; in TEST_F()
172 std::string* error_msg) { in FixChecksumAndOpen() argument
193 if (!DexFile::Open(location, location, error_msg, &tmp)) { in FixChecksumAndOpen()
204 uint8_t new_val, std::string* error_msg) { in ModifyAndLoad() argument
215 error_msg)); in ModifyAndLoad()
[all …]
Doat_file_test.cc75 std::string error_msg; in TEST_F() local
78 EXPECT_TRUE(OatFile::CheckStaticDexFileDependencies(nullptr, &error_msg)) << error_msg; in TEST_F()
79 EXPECT_TRUE(OatFile::CheckStaticDexFileDependencies("", &error_msg)) << error_msg; in TEST_F()
82 EXPECT_FALSE(OatFile::CheckStaticDexFileDependencies("abc", &error_msg)); in TEST_F()
83 EXPECT_FALSE(OatFile::CheckStaticDexFileDependencies("abc*123*def", &error_msg)); in TEST_F()
84 EXPECT_FALSE(OatFile::CheckStaticDexFileDependencies("abc*def*", &error_msg)); in TEST_F()
87 EXPECT_FALSE(OatFile::CheckStaticDexFileDependencies("abc*123*", &error_msg)); in TEST_F()
95 EXPECT_TRUE(OatFile::CheckStaticDexFileDependencies(encoding1.c_str(), &error_msg)) in TEST_F()
96 << error_msg << " " << encoding1; in TEST_F()
106 EXPECT_TRUE(OatFile::CheckStaticDexFileDependencies(encoding2.c_str(), &error_msg)) in TEST_F()
[all …]
Dzip_archive_test.cc34 std::string error_msg; in TEST_F() local
35 …:unique_ptr<ZipArchive> zip_archive(ZipArchive::Open(GetLibCoreDexFileName().c_str(), &error_msg)); in TEST_F()
36 ASSERT_TRUE(zip_archive.get() != nullptr) << error_msg; in TEST_F()
37 ASSERT_TRUE(error_msg.empty()); in TEST_F()
38 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find("classes.dex", &error_msg)); in TEST_F()
40 ASSERT_TRUE(error_msg.empty()); in TEST_F()
46 bool success = zip_entry->ExtractToFile(*file, &error_msg); in TEST_F()
47 ASSERT_TRUE(success) << error_msg; in TEST_F()
48 ASSERT_TRUE(error_msg.empty()); in TEST_F()
Dzip_archive.cc43 bool ZipEntry::ExtractToFile(File& file, std::string* error_msg) { in ExtractToFile() argument
46 *error_msg = std::string(ErrorCodeString(error)); in ExtractToFile()
54 std::string* error_msg) { in ExtractToMemMap() argument
61 error_msg)); in ExtractToMemMap()
63 DCHECK(!error_msg->empty()); in ExtractToMemMap()
70 *error_msg = std::string(ErrorCodeString(error)); in ExtractToMemMap()
91 ZipArchive* ZipArchive::Open(const char* filename, std::string* error_msg) { in Open() argument
97 *error_msg = std::string(ErrorCodeString(error)); in Open()
106 ZipArchive* ZipArchive::OpenFromFd(int fd, const char* filename, std::string* error_msg) { in OpenFromFd() argument
113 *error_msg = std::string(ErrorCodeString(error)); in OpenFromFd()
[all …]
Doat_file_assistant.cc121 bool OatFileAssistant::Lock(std::string* error_msg) { in Lock() argument
122 CHECK(error_msg != nullptr); in Lock()
126 *error_msg = "Failed to determine lock file"; in Lock()
131 if (!flock_.Init(lock_file_name.c_str(), error_msg)) { in Lock()
157 bool OatFileAssistant::MakeUpToDate(std::string* error_msg) { in MakeUpToDate() argument
160 case kDex2OatNeeded: return GenerateOatFile(error_msg); in MakeUpToDate()
161 case kPatchOatNeeded: return RelocateOatFile(OdexFileName(), error_msg); in MakeUpToDate()
162 case kSelfPatchOatNeeded: return RelocateOatFile(OatFileName(), error_msg); in MakeUpToDate()
209 std::string error_msg; in LoadDexFiles() local
218 std::unique_ptr<const DexFile> dex_file = oat_dex_file->OpenDexFile(&error_msg); in LoadDexFiles()
[all …]
Doat_file.cc90 std::string* error_msg) { in OpenWithElfFile() argument
99 return oat_file->Setup(abs_dex_location, error_msg) ? oat_file.release() : nullptr; in OpenWithElfFile()
108 std::string* error_msg) { in Open() argument
120 ret.reset(OpenDlopen(filename, location, requested_base, abs_dex_location, error_msg)); in Open()
125 LOG(ERROR) << "Failed to dlopen: " << *error_msg; in Open()
144 *error_msg = StringPrintf("Failed to open oat filename for reading: %s", strerror(errno)); in Open()
148 abs_dex_location, error_msg)); in Open()
158 std::string* error_msg) { in OpenWritable() argument
160 return OpenElfFile(file, location, nullptr, nullptr, true, false, abs_dex_location, error_msg); in OpenWritable()
165 std::string* error_msg) { in OpenReadable() argument
[all …]
Delf_file.cc142 std::string* error_msg, uint8_t* requested_base) { in Open() argument
154 if (!elf_file->Setup(prot, flags, error_msg)) { in Open()
162 File* file, int prot, int flags, std::string* error_msg) { in Open() argument
166 if (!elf_file->Setup(prot, flags, error_msg)) { in Open()
173 bool ElfFileImpl<ElfTypes>::Setup(int prot, int flags, std::string* error_msg) { in Setup() argument
177 *error_msg = StringPrintf("Failed to get length of file: '%s' fd=%d: %s", in Setup()
183 *error_msg = StringPrintf("File size of %zd bytes not large enough to contain ELF header of " in Setup()
193 file_->GetPath().c_str(), error_msg), in Setup()
194 error_msg)) { in Setup()
200 *error_msg = StringPrintf("File size of %zd bytes not large enough to contain ELF program " in Setup()
[all …]
Ddex_file.cc59 static int OpenAndReadMagic(const char* filename, uint32_t* magic, std::string* error_msg) { in OpenAndReadMagic() argument
63 *error_msg = StringPrintf("Unable to open '%s' : %s", filename, strerror(errno)); in OpenAndReadMagic()
68 *error_msg = StringPrintf("Failed to find magic in '%s'", filename); in OpenAndReadMagic()
72 *error_msg = StringPrintf("Failed to seek to beginning of file '%s' : %s", filename, in OpenAndReadMagic()
79 bool DexFile::GetChecksum(const char* filename, uint32_t* checksum, std::string* error_msg) { in GetChecksum() argument
95 ScopedFd fd(OpenAndReadMagic(file_part, &magic, error_msg)); in GetChecksum()
97 DCHECK(!error_msg->empty()); in GetChecksum()
102 ZipArchive::OpenFromFd(fd.release(), filename, error_msg)); in GetChecksum()
104 *error_msg = StringPrintf("Failed to open zip archive '%s' (error msg: %s)", file_part, in GetChecksum()
105 error_msg->c_str()); in GetChecksum()
[all …]
Dzip_archive.h39 bool ExtractToFile(File& file, std::string* error_msg);
41 std::string* error_msg);
61 static ZipArchive* Open(const char* filename, std::string* error_msg);
62 static ZipArchive* OpenFromFd(int fd, const char* filename, std::string* error_msg);
64 ZipEntry* Find(const char* name, std::string* error_msg) const;
Doat_file_assistant_test.cc61 std::string error_msg; in SetUp() local
68 ASSERT_FALSE(DexFile::GetChecksum(GetStrippedDexSrc1().c_str(), &checksum, &error_msg)) in SetUp()
77 GetMultiDexSrc1().c_str(), &error_msg, &multi1)) << error_msg; in SetUp()
82 GetMultiDexSrc2().c_str(), &error_msg, &multi2)) << error_msg; in SetUp()
210 std::string error_msg; in GenerateOdexForTest() local
211 ASSERT_TRUE(OatFileAssistant::Dex2Oat(args, &error_msg)) << error_msg; in GenerateOdexForTest()
249 std::string error_msg; in ReserveImageSpaceChunk() local
253 PROT_NONE, false, false, &error_msg))); in ReserveImageSpaceChunk()
254 ASSERT_TRUE(image_reservation_.back().get() != nullptr) << error_msg; in ReserveImageSpaceChunk()
287 std::string error_msg; in GenerateOatForTest() local
[all …]
Delf_file.h41 static ElfFile* Open(File* file, bool writable, bool program_header_only, std::string* error_msg,
45 static ElfFile* Open(File* file, int mmap_prot, int mmap_flags, std::string* error_msg);
49 bool Load(bool executable, std::string* error_msg);
69 bool GetLoadedSize(size_t* size, std::string* error_msg) const;
73 static bool Strip(File* file, std::string* error_msg);
/art/runtime/gc/space/
Dimage_space.cc176 std::string* error_msg) { in GenerateImage() argument
181 *error_msg = "Failed to generate image because no boot class path specified"; in GenerateImage()
231 return Exec(arg_vector, error_msg); in GenerateImage()
264 std::string error_msg; in FindImageFilename() local
265 if (!GetDalvikCacheFilename(image_location, dalvik_cache.c_str(), cache_filename, &error_msg)) { in FindImageFilename()
266 LOG(WARNING) << error_msg; in FindImageFilename()
288 InstructionSet isa, std::string* error_msg) { in RelocateImage() argument
330 return Exec(argv, error_msg); in RelocateImage()
333 static ImageHeader* ReadSpecificImageHeader(const char* filename, std::string* error_msg) { in ReadSpecificImageHeader() argument
336 *error_msg = StringPrintf("Unable to read image header for %s", filename); in ReadSpecificImageHeader()
[all …]
/art/runtime/arch/x86/
Dinstruction_set_features_x86_test.cc24 std::string error_msg; in TEST() local
26 InstructionSetFeatures::FromVariant(kX86, "default", &error_msg)); in TEST()
27 ASSERT_TRUE(x86_features.get() != nullptr) << error_msg; in TEST()
36 std::string error_msg; in TEST() local
38 InstructionSetFeatures::FromVariant(kX86, "atom", &error_msg)); in TEST()
39 ASSERT_TRUE(x86_features.get() != nullptr) << error_msg; in TEST()
47 InstructionSetFeatures::FromVariant(kX86, "default", &error_msg)); in TEST()
48 ASSERT_TRUE(x86_default_features.get() != nullptr) << error_msg; in TEST()
57 InstructionSetFeatures::FromVariant(kX86_64, "atom", &error_msg)); in TEST()
58 ASSERT_TRUE(x86_64_features.get() != nullptr) << error_msg; in TEST()
[all …]
/art/runtime/arch/arm/
Dinstruction_set_features_arm_test.cc25 std::string error_msg; in TEST() local
27 InstructionSetFeatures::FromVariant(kArm, "krait", &error_msg)); in TEST()
28 ASSERT_TRUE(krait_features.get() != nullptr) << error_msg; in TEST()
39 InstructionSetFeatures::FromVariant(kArm, "denver", &error_msg)); in TEST()
40 ASSERT_TRUE(denver_features.get() != nullptr) << error_msg; in TEST()
52 InstructionSetFeatures::FromVariant(kArm, "arm7", &error_msg)); in TEST()
53 ASSERT_TRUE(arm7_features.get() != nullptr) << error_msg; in TEST()
65 InstructionSetFeatures::FromVariant(kArm, "arm6", &error_msg)); in TEST()
67 EXPECT_NE(error_msg.size(), 0U); in TEST()
71 std::string error_msg; in TEST() local
[all …]
/art/compiler/
Delf_writer.cc44 std::string error_msg; in GetOatElfInformation() local
45 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, false, false, &error_msg)); in GetOatElfInformation()
46 CHECK(elf_file.get() != nullptr) << error_msg; in GetOatElfInformation()
48 bool success = elf_file->GetLoadedSize(oat_loaded_size, &error_msg); in GetOatElfInformation()
49 CHECK(success) << error_msg; in GetOatElfInformation()
56 std::string error_msg; in Fixup() local
57 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, true, false, &error_msg)); in Fixup()
58 CHECK(elf_file.get() != nullptr) << error_msg; in Fixup()
Delf_writer_test.cc65 std::string error_msg; in TEST_F() local
66 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, false, &error_msg)); in TEST_F()
67 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
73 std::string error_msg; in TEST_F() local
74 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, false, &error_msg)); in TEST_F()
75 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
81 std::string error_msg; in TEST_F() local
82 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, true, &error_msg)); in TEST_F()
83 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
84 CHECK(ef->Load(false, &error_msg)) << error_msg; in TEST_F()
/art/imgdiag/
Dimgdiag_test.cc78 bool Exec(pid_t image_diff_pid, const std::string& boot_image, std::string* error_msg) { in Exec() argument
99 return ::art::Exec(exec_argv, error_msg); in Exec()
103 bool ExecDefaultBootImage(pid_t image_diff_pid, std::string* error_msg) { in ExecDefaultBootImage() argument
104 return Exec(image_diff_pid, boot_image_location_, error_msg); in ExecDefaultBootImage()
124 std::string error_msg; in TEST_F() local
125 ASSERT_TRUE(ExecDefaultBootImage(getpid(), &error_msg)) << "Failed to execute -- because: " in TEST_F()
126 << error_msg; in TEST_F()
133 std::string error_msg; in TEST_F() local
134 ASSERT_FALSE(ExecDefaultBootImage(-12345, &error_msg)) << "Incorrectly executed"; in TEST_F()
135 UNUSED(error_msg); in TEST_F()
/art/cmdline/
Dcmdline.h66 std::string error_msg; in LocationToFilename() local
68 &cache_filename, &error_msg)) { in LocationToFilename()
138 std::string error_msg; in Parse() local
162 ParseStatus parse_status = ParseCustom(option, &error_msg); in Parse()
169 fprintf(stderr, "%s\n", error_msg.c_str()); in Parse()
179 ParseStatus checks_status = ParseChecks(&error_msg); in Parse()
181 fprintf(stderr, "%s\n", error_msg.c_str()); in Parse()
224 bool ParseCheckBootImage(std::string* error_msg) { in ParseCheckBootImage()
226 *error_msg = "--boot-image must be specified"; in ParseCheckBootImage()
237 *error_msg = "Boot image location must have a / in it"; in ParseCheckBootImage()
[all …]
/art/runtime/arch/
Dinstruction_set_features_test.cc46 std::string error_msg; local
48 InstructionSetFeatures::FromVariant(kRuntimeISA, dex2oat_isa_variant, &error_msg));
49 ASSERT_TRUE(property_features.get() != nullptr) << error_msg;
79 std::string error_msg; local
81 InstructionSetFeatures::FromVariant(kRuntimeISA, dex2oat_isa_variant, &error_msg));
82 ASSERT_TRUE(base_features.get() != nullptr) << error_msg;
85 base_features->AddFeaturesFromString(dex2oat_isa_features, &error_msg));
86 ASSERT_TRUE(property_features.get() != nullptr) << error_msg;
116 std::string error_msg; local
118 InstructionSetFeatures::FromVariant(kRuntimeISA, "default", &error_msg));
[all …]
Dinstruction_set_features.cc34 std::string* error_msg) { in FromVariant() argument
39 result = ArmInstructionSetFeatures::FromVariant(variant, error_msg); in FromVariant()
42 result = Arm64InstructionSetFeatures::FromVariant(variant, error_msg); in FromVariant()
45 result = MipsInstructionSetFeatures::FromVariant(variant, error_msg); in FromVariant()
48 result = Mips64InstructionSetFeatures::FromVariant(variant, error_msg); in FromVariant()
51 result = X86InstructionSetFeatures::FromVariant(variant, error_msg); in FromVariant()
54 result = X86_64InstructionSetFeatures::FromVariant(variant, error_msg); in FromVariant()
60 CHECK_EQ(result == nullptr, error_msg->size() != 0); in FromVariant()
213 const std::string& feature_list, std::string* error_msg) const { in AddFeaturesFromString()
215 *error_msg = "No instruction set features specified"; in AddFeaturesFromString()
[all …]
/art/runtime/jit/
Djit.cc64 Jit* Jit::Create(JitOptions* options, std::string* error_msg) { in Create() argument
67 if (!jit->LoadCompiler(error_msg)) { in Create()
70 jit->code_cache_.reset(JitCodeCache::Create(options->GetCodeCacheCapacity(), error_msg)); in Create()
80 bool Jit::LoadCompiler(std::string* error_msg) { in LoadCompiler() argument
86 *error_msg = oss.str(); in LoadCompiler()
93 *error_msg = "JIT couldn't find jit_load entry point"; in LoadCompiler()
100 *error_msg = "JIT couldn't find jit_unload entry point"; in LoadCompiler()
107 *error_msg = "JIT couldn't find jit_compile_method entry point"; in LoadCompiler()
116 *error_msg = "JIT couldn't load compiler"; in LoadCompiler()
121 *error_msg = "JIT compiler callbacks were not set"; in LoadCompiler()
/art/runtime/base/
Dscoped_flock.cc28 bool ScopedFlock::Init(const char* filename, std::string* error_msg) { in Init() argument
35 *error_msg = StringPrintf("Failed to open file '%s': %s", filename, strerror(errno)); in Init()
40 *error_msg = StringPrintf("Failed to lock file '%s': %s", filename, strerror(errno)); in Init()
46 *error_msg = StringPrintf("Failed to fstat file '%s': %s", filename, strerror(errno)); in Init()
64 bool ScopedFlock::Init(File* file, std::string* error_msg) { in Init() argument
68 *error_msg = StringPrintf("Failed to duplicate open file '%s': %s", in Init()
74 *error_msg = StringPrintf( in Init()
/art/compiler/utils/
Dassembler_test_base.h103 EXPECT_TRUE(res.ok) << res.error_msg; in Driver()
187 std::string error_msg; member
194 bool Assemble(const char* from_file, const char* to_file, std::string* error_msg) { in Assemble() argument
217 bool success = Exec(args, error_msg); in Assemble()
236 std::string error_msg; in Objdump() local
253 if (!Exec(args, &error_msg)) { in Objdump()
254 EXPECT_TRUE(false) << error_msg; in Objdump()
287 std::string error_msg; in DisassembleBinaries() local
288 if (!DisassembleBinary(data_name, &error_msg)) { in DisassembleBinaries()
289 LOG(INFO) << "Error disassembling: " << error_msg; in DisassembleBinaries()
[all …]

1234