Home
last modified time | relevance | path

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

123456789

/art/dexdump/
Ddexdump_test.cc41 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/
Ddexlist_test.cc43 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/
Ddex_verify.cc35 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 …]
Ddex_verify.h31 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 …]
Ddexdiag_test.cc63 std::string error_msg; in OpenOatAndVdexFiles() local
69 &error_msg)); in OpenOatAndVdexFiles()
70 EXPECT_TRUE(oat != nullptr) << error_msg; in OpenOatAndVdexFiles()
75 bool Exec(pid_t this_pid, const std::vector<std::string>& args, std::string* error_msg) { in Exec() argument
91 return ::art::Exec(exec_argv, error_msg); in Exec()
102 std::string error_msg; in TEST_F() local
103 ASSERT_TRUE(Exec(getpid(), {kDexDiagHelp}, &error_msg)) in TEST_F()
104 << "Failed to execute -- because: " << error_msg; in TEST_F()
114 std::string error_msg; local
115 ASSERT_TRUE(Exec(getpid(), {kDexDiagContains}, &error_msg))
[all …]
Ddexlayout_test.cc262 bool FullPlainOutputExec(std::string* error_msg) { in FullPlainOutputExec() argument
276 if (!::art::Exec(dexdump_exec_argv, error_msg)) { in FullPlainOutputExec()
279 if (!DexLayoutExec(dexlayout_args, error_msg)) { in FullPlainOutputExec()
284 if (!::art::Exec(diff_exec_argv, error_msg)) { in FullPlainOutputExec()
292 bool DexFileOutputExec(std::string* error_msg) { in DexFileOutputExec() argument
302 if (!DexLayoutExec(dexlayout_args, error_msg, /*pass_default_cdex_option=*/ false)) { in DexFileOutputExec()
308 if (!::art::Exec(unzip_exec_argv, error_msg)) { in DexFileOutputExec()
313 if (!::art::Exec(diff_exec_argv, error_msg)) { in DexFileOutputExec()
332 std::string error_msg; in CreateProfile() local
336 &error_msg, in CreateProfile()
[all …]
/art/libartbase/base/
Dmem_map_test.cc54 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 …]
Dzip_archive.cc61 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 …]
Dfile_magic.cc32 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
48 *error_msg = StringPrintf("Failed to seek to beginning of file : %s", strerror(errno)); in ReadMagicAndReset()
53 *error_msg = StringPrintf("Failed to find magic"); in ReadMagicAndReset()
57 *error_msg = StringPrintf("Failed to seek to beginning of file : %s", strerror(errno)); in ReadMagicAndReset()
Dzip_archive.h46 bool ExtractToFile(File& file, /*out*/std::string* error_msg);
51 /*out*/std::string* error_msg);
54 bool ExtractToMemory(/*out*/uint8_t* buffer, /*out*/std::string* error_msg);
62 MemMap MapDirectlyFromFile(const char* zip_filename, /*out*/std::string* error_msg);
67 std::string* error_msg,
93 static ZipArchive* Open(const char* filename, std::string* error_msg);
94 static ZipArchive* OpenFromFd(int fd, const char* filename, std::string* error_msg);
95 static ZipArchive* OpenFromOwnedFd(int fd, const char* filename, std::string* error_msg);
99 std::string* error_msg);
101 ZipEntry* Find(const char* name, std::string* error_msg) const;
[all …]
Dzip_archive_test.cc35 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()
Dfile_utils.cc121 std::string* error_msg) { in GetAndroidDirSafe() argument
127 *error_msg = StringPrintf("%s not set and %s does not exist", env_var, default_dir); in GetAndroidDirSafe()
132 *error_msg = StringPrintf("Failed to find directory %s", android_dir); in GetAndroidDirSafe()
141 std::string error_msg; in GetAndroidDir() local
142 const char* dir = GetAndroidDirSafe(env_var, default_dir, must_exist, &error_msg); in GetAndroidDir()
146 LOG(FATAL) << error_msg; in GetAndroidDir()
151 std::string GetAndroidRootSafe(std::string* error_msg) { in GetAndroidRootSafe() argument
154 *error_msg = "GetAndroidRootSafe unsupported for Windows."; in GetAndroidRootSafe()
173 *error_msg = std::move(local_error_msg); in GetAndroidRootSafe()
182 std::string error_msg; in GetAndroidRoot() local
[all …]
Dscoped_flock.cc32 /* 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/runtime/arch/x86/
Dinstruction_set_features_x86_test.cc25 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/
Dinstruction_set_features_test.cc59 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/libdexfile/dex/
Dart_dex_file_loader.cc45 std::string* error_msg, in GetMultiDexChecksums() argument
53 if (ReadMagicAndReset(zip_fd, &magic, error_msg)) { in GetMultiDexChecksums()
57 fd = OpenAndReadMagic(filename, &magic, error_msg); in GetMultiDexChecksums()
60 DCHECK(!error_msg->empty()); in GetMultiDexChecksums()
65 ZipArchive::OpenFromFd(fd.Release(), filename, error_msg)); in GetMultiDexChecksums()
67 *error_msg = StringPrintf("Failed to open zip archive '%s' (error msg: %s)", filename, in GetMultiDexChecksums()
68 error_msg->c_str()); in GetMultiDexChecksums()
79 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find(zip_entry_name.c_str(), error_msg)); in GetMultiDexChecksums()
86 error_msg->c_str()); in GetMultiDexChecksums()
99 zip_entry.reset(zip_archive->Find(zip_entry_name.c_str(), error_msg)); in GetMultiDexChecksums()
[all …]
Ddex_file_loader.cc194 std::string* error_msg) { in Open() argument
198 if (!InitAndReadMagic(&magic, error_msg) || !MapRootContainer(error_msg)) { in Open()
199 DCHECK(!error_msg->empty()); in Open()
211 error_msg, in Open()
216 bool DexFileLoader::InitAndReadMagic(uint32_t* magic, std::string* error_msg) { in InitAndReadMagic() argument
219 *error_msg = StringPrintf("Unable to open '%s' : Size is too small", location_.c_str()); in InitAndReadMagic()
229 *error_msg = StringPrintf("Unable to open '%s' : %s", filename_.c_str(), strerror(errno)); in InitAndReadMagic()
233 if (!ReadMagicAndReset(file_->Fd(), magic, error_msg)) { in InitAndReadMagic()
240 bool DexFileLoader::MapRootContainer(std::string* error_msg) { in MapRootContainer() argument
250 *error_msg = StringPrintf("DexFile: fstat '%s' failed: %s", filename_.c_str(), strerror(errno)); in MapRootContainer()
[all …]
/art/dex2oat/linker/
Delf_writer_test.cc67 std::string error_msg; in TEST_F() local
72 &error_msg)); in TEST_F()
73 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
79 std::string error_msg; in TEST_F() local
84 &error_msg)); in TEST_F()
85 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
91 std::string error_msg; in TEST_F() local
96 &error_msg)); in TEST_F()
97 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
99 bool success = ef->GetLoadedSize(&size, &error_msg); in TEST_F()
[all …]
/art/runtime/
Dexec_utils_test.cc111 std::string error_msg; in TEST_P() local
114 EXPECT_TRUE(exec_utils_->Exec(command, &error_msg)); in TEST_P()
115 EXPECT_EQ(0U, error_msg.size()) << error_msg; in TEST_P()
121 std::string error_msg; in TEST_P() local
124 ExecResult result = exec_utils_->ExecAndReturnResult(command, /*timeout_sec=*/-1, &error_msg); in TEST_P()
127 EXPECT_FALSE(error_msg.empty()); in TEST_P()
139 std::string error_msg; in TEST_P() local
142 EXPECT_FALSE(exec_utils_->Exec(command, &error_msg)); in TEST_P()
143 EXPECT_NE(0U, error_msg.size()) << error_msg; in TEST_P()
158 std::string error_msg; in TEST_P() local
[all …]
Doat_file_test.cc38 std::string error_msg; in TEST_F() local
40 dex_location, kRuntimeISA, &oat_location, &error_msg)) in TEST_F()
41 << error_msg; in TEST_F()
48 &error_msg)); in TEST_F()
62 std::string error_msg; in TEST_F() local
64 dex_location, kRuntimeISA, &oat_location, &error_msg)) in TEST_F()
65 << 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()
[all …]
Delf_file.cc64 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 …]
Dexec_utils.cc67 pid_t ExecWithoutWait(const std::vector<std::string>& arg_vector, std::string* error_msg) { in ExecWithoutWait() argument
97 *error_msg = StringPrintf("Failed to execute (%s) because fork failed: %s", in ExecWithoutWait()
109 std::string* error_msg) { in WaitChild() argument
114 *error_msg = StringPrintf("waitid failed for (%s) pid %d: %s", in WaitChild()
121 *error_msg = StringPrintf("waitid failed for (%s): wanted pid %d, got %d: %s", in WaitChild()
129 *error_msg = in WaitChild()
143 std::string* error_msg) { in WaitChildWithTimeoutFallback() argument
157 ExecResult result = WaitChild(pid, arg_vector, /*no_wait=*/true, error_msg); in WaitChildWithTimeoutFallback()
168 *error_msg = in WaitChildWithTimeoutFallback()
183 std::string* error_msg) { in WaitChildWithTimeout() argument
[all …]
/art/runtime/arch/arm/
Dinstruction_set_features_arm_test.cc25 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/
Dinstruction_set_features_arm64_test.cc25 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/runtime/jni/
Dlocal_reference_table_test.cc83 std::string error_msg; in BasicTest() local
85 bool success = lrt.Initialize(max_count, &error_msg); in BasicTest()
86 ASSERT_TRUE(success) << error_msg; in BasicTest()
98 IndirectRef iref0 = lrt.Add(cookie, obj0.Get(), &error_msg); in BasicTest()
101 IndirectRef iref1 = lrt.Add(cookie, obj1.Get(), &error_msg); in BasicTest()
104 IndirectRef iref2 = lrt.Add(cookie, obj2.Get(), &error_msg); in BasicTest()
124 EXPECT_FALSE(lrt.IsValidReference(iref0, &error_msg)); in BasicTest()
127 iref0 = lrt.Add(cookie, obj0.Get(), &error_msg); in BasicTest()
129 iref1 = lrt.Add(cookie, obj1.Get(), &error_msg); in BasicTest()
131 iref2 = lrt.Add(cookie, obj2.Get(), &error_msg); in BasicTest()
[all …]

123456789