/hardware/interfaces/audio/common/all-versions/test/utility/tests/ |
D | utility_tests.cpp | 85 ASSERT_TRUE(android::base::WriteStringToFile(INVALID_XML_SOURCE, xml.path)) << strerror(errno); in TEST() 87 ASSERT_TRUE(android::base::WriteStringToFile(XSD_SOURCE, xsd.path)) << strerror(errno); in TEST() 88 EXPECT_FALSE(validateXml("xml", "xsd", xml.path, xsd.path)); in TEST() 94 android::base::WriteStringToFile(substitute(VALID_XML_SOURCE, MODULE_SOURCE), xml.path)) in TEST() 97 ASSERT_TRUE(android::base::WriteStringToFile(XSD_SOURCE, xsd.path)) << strerror(errno); in TEST() 98 EXPECT_TRUE(validateXml("xml", "xsd", xml.path, xsd.path)); in TEST() 104 xmlInclude.path)) in TEST() 108 substitute(VALID_XML_SOURCE, substitute(XI_INCLUDE, xmlInclude.path)), xml.path)) in TEST() 111 ASSERT_TRUE(android::base::WriteStringToFile(XSD_SOURCE, xsd.path)) << strerror(errno); in TEST() 112 EXPECT_TRUE(validateXml("xml", "xsd", xml.path, xsd.path)); in TEST() [all …]
|
/hardware/google/aemu/base/testing/ |
D | file_io.cpp | 50 FILE* android_fopen(const char* path, const char* mode) { in android_fopen() argument 53 auto normalized = PathUtils::recompose(PathUtils::decompose(path)); in android_fopen() 62 printf("Failed to open %s, err: %d\n", path, err); in android_fopen() 66 return WIDEN_CALL_2(fopen, path, mode); in android_fopen() 70 FILE* android_popen(const char* path, const char* mode) { in android_popen() argument 71 return WIDEN_CALL_2(popen, path, mode); in android_popen() 81 int android_open_without_mode(const char* path, int flags) { in android_open_without_mode() argument 82 int res = WIDEN_CALL_1(open, path, flags | O_CLOEXEC); in android_open_without_mode() 87 int android_open_with_mode(const char* path, int flags, mode_t mode) { in android_open_with_mode() argument 88 int res = WIDEN_CALL_1(open, path, flags | O_CLOEXEC, mode); in android_open_with_mode() [all …]
|
/hardware/google/aemu/base/include/aemu/base/testing/ |
D | file_io.h | 24 FILE* android_fopen(const char* path, const char* mode); 25 FILE* android_popen(const char* path, const char* mode); 38 int android_open_without_mode(const char* path, int flags); 39 int android_open_with_mode(const char* path, int flags, mode_t mode); 42 #define android_lstat(path, buf) android_stat((path), (buf)) argument 43 int android_stat(const char* path, struct _stati64* buf); 45 int android_stat(const char* path, struct stat* buf); 46 int android_lstat(const char* path, struct stat* buf); 49 int android_access(const char* path, int mode); 50 int android_mkdir(const char* path, mode_t mode); [all …]
|
D | TestTempDir.h | 107 const char* path() const { return mPath.size() ? mPath.c_str() : NULL; } in path() function 128 std::string path = makeSubPath(subdir); in makeSubDir() local 129 if (android_mkdir(path.c_str(), 0755) < 0) { in makeSubDir() 138 std::string path = makeSubPath(file); in makeSubFile() local 139 int fd = ::android_open(path.c_str(), O_WRONLY | O_CREAT, 0744); in makeSubFile() 151 void DeleteRecursive(const std::string& path) { in DeleteRecursive() argument 153 std::filesystem::remove_all(path); in DeleteRecursive() 156 DIR* dir = opendir(path.c_str()); in DeleteRecursive() 166 std::string entry_path = StringFormat("%s/%s", path, entry->d_name); in DeleteRecursive() 183 android_rmdir(path.c_str()); in DeleteRecursive() [all …]
|
/hardware/libhardware/ |
D | hardware.c | 80 const char *path, in load() argument 98 strncmp(path, HAL_LIBRARY_PATH1, strlen(HAL_LIBRARY_PATH1)) == 0) { in load() 102 handle = dlopen(path, RTLD_NOW); in load() 105 handle = dlopen(path, RTLD_NOW); in load() 107 handle = android_load_sphal_library(path, RTLD_NOW); in load() 112 ALOGE("load: module=%s\n%s", path, err_str?err_str:"unknown"); in load() 147 id, path, hmi, handle); in load() 158 static bool __attribute__ ((unused)) path_in_path(const char *path, const char *in_path) { in path_in_path() argument 160 if (realpath(path, real_path) == NULL) return false; in path_in_path() 178 static int hw_module_exists(char *path, size_t path_len, const char *name, in hw_module_exists() argument [all …]
|
/hardware/google/pixel/power-libperfmgr/libperfmgr/tests/ |
D | NodeLooperThreadTest.cc | 38 "n0", tf->path, {{"n0_value0"}, {"n0_value1"}, {"n0_value2"}}, 2, in SetUp() 43 "n1", tf->path, {{"n1_value0"}, {"n1_value1"}, {"n1_value2"}}, 2, in SetUp() 56 static inline void _VerifyPathValue(const std::string& path, in _VerifyPathValue() argument 59 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno); in _VerifyPathValue() 69 _VerifyPathValue(files_[0]->path, ""); in TEST_F() 70 _VerifyPathValue(files_[1]->path, "n1_value2"); in TEST_F() 86 _VerifyPathValue(files_[0]->path, "n0_value0"); in TEST_F() 87 _VerifyPathValue(files_[1]->path, "n1_value1"); in TEST_F() 89 _VerifyPathValue(files_[0]->path, "n0_value2"); in TEST_F() 90 _VerifyPathValue(files_[1]->path, "n1_value1"); in TEST_F() [all …]
|
D | FileNodeTest.cc | 34 static inline void _VerifyPathValue(const std::string& path, in _VerifyPathValue() argument 37 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno); in _VerifyPathValue() 44 FileNode t("t", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, false, false); in TEST() 46 _VerifyPathValue(tf.path, ""); in TEST() 52 FileNode t("t", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, true, true); in TEST() 54 _VerifyPathValue(tf.path, "value1"); in TEST() 56 FileNode t2("t2", tf2.path, {{"value0"}, {"value1"}, {"value2"}}, 0, true, true); in TEST() 58 _VerifyPathValue(tf2.path, "value0"); in TEST() 64 FileNode t("test_dump", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, in TEST() 78 "test_dump", tf.path, static_cast<size_t>(1), "value1", 0, 1)); in TEST() [all …]
|
D | HintManagerTest.cc | 233 "n0", tf->path, {{"n0_value0"}, {"n0_value1"}, {"n0_value2"}}, 2, in SetUp() 238 "n1", tf->path, {{"n1_value0"}, {"n1_value1"}, {"n1_value2"}}, 2, in SetUp() 267 json_doc_.replace(start_pos, from.length(), files_[0 + 2]->path); in SetUp() 270 json_doc_.replace(start_pos, from.length(), files_[1 + 2]->path); in SetUp() 289 static inline void _VerifyPropertyValue(const std::string& path, in _VerifyPropertyValue() argument 291 std::string s = android::base::GetProperty(path, ""); in _VerifyPropertyValue() 295 static inline void _VerifyPathValue(const std::string& path, in _VerifyPathValue() argument 298 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno); in _VerifyPathValue() 341 _VerifyPathValue(files_[0]->path, ""); in TEST_F() 342 _VerifyPathValue(files_[1]->path, "n1_value2"); in TEST_F() [all …]
|
/hardware/google/graphics/common/memtrack-pixel/core/ |
D | filesystem.h | 18 class path { 20 path(const std::string _path) : strPath(_path) {} in path() function 22 path filename() const { in filename() 25 return path(strPath); in filename() 29 return path(strPath.substr(pos, l - pos)); in filename() 42 class path path() { in path() function 47 class path p; 50 bool exists(const path& p); 52 bool is_directory(const path& p); 54 bool is_symlink(const path& p); [all …]
|
D | filesystem.cpp | 15 bool exists(const path& p) { in exists() 20 bool is_directory(const path& p) { in is_directory() 28 bool is_symlink(const path& p) { in is_symlink() 36 path read_symlink(const path& p) { in read_symlink() 39 return path(p.string()); in read_symlink() 42 path out(actualPath); in read_symlink() 47 std::vector<directory_entry> directory_iterator(const path& p) { in directory_iterator()
|
/hardware/google/aemu/base/ |
D | PathUtils.cpp | 60 size_t PathUtils::rootPrefixSize(const std::string& path, HostType hostType) { in rootPrefixSize() argument 61 if (path.empty()) return 0; in rootPrefixSize() 64 return (path[0] == '/') ? 1U : 0U; in rootPrefixSize() 67 if (path[1] == ':') { in rootPrefixSize() 68 int ch = path[0]; in rootPrefixSize() 71 } else if (!strncmp(path.c_str(), "\\\\.\\", 4) || in rootPrefixSize() 72 !strncmp(path.c_str(), "\\\\?\\", 4)) { in rootPrefixSize() 75 } else if (isDirSeparator(path[0], hostType)) { in rootPrefixSize() 77 if (isDirSeparator(path[1], hostType)) { in rootPrefixSize() 79 while (path[result] && !isDirSeparator(path[result], HOST_WIN32)) in rootPrefixSize() [all …]
|
D | SharedLibrary.cpp | 41 void addPath(const char* path) { in addPath() argument 42 mPaths.push_back(path); in addPath() 46 for (const auto& path: mPaths) { in forEachPath() local 47 func(path); in forEachPath() 101 sSearchPaths()->forEachPath([&lib, libraryName](const std::string& path) { in do_open() argument 103 auto libName = PathUtils::join(path, libraryName); in do_open() 189 char* path = NULL; in do_open() local 204 path = static_cast<char*>(malloc(pathLen)); in do_open() 205 snprintf(path, pathLen, "%s%s", libraryName, kDllExtension); in do_open() 206 libPath = path; in do_open() [all …]
|
/hardware/google/aemu/base/include/aemu/base/files/ |
D | PathUtils.h | 157 static std::string removeTrailingDirSeparator(const char* path, 161 static std::string removeTrailingDirSeparator(const char* path) { in removeTrailingDirSeparator() argument 162 return removeTrailingDirSeparator(path, HOST_TYPE); in removeTrailingDirSeparator() 166 static std::string addTrailingDirSeparator(const std::string& path, 168 static std::string addTrailingDirSeparator(const char* path, 172 static std::string addTrailingDirSeparator(const std::string& path) { in addTrailingDirSeparator() argument 173 return addTrailingDirSeparator(path, HOST_TYPE); in addTrailingDirSeparator() 184 static size_t rootPrefixSize(const std::string& path, HostType hostType); 188 static size_t rootPrefixSize(const char* path, HostType hostType) { in rootPrefixSize() argument 189 return rootPrefixSize(path ? std::string(path) : std::string(""), hostType); in rootPrefixSize() [all …]
|
/hardware/google/gfxstream/guest/mesa/bin/ |
D | install_megadrivers.py | 36 if os.path.isabs(args.libdir): 39 to = os.path.join(destdir, args.libdir[1:]) 43 to = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.libdir) 45 master = os.path.join(to, os.path.basename(args.megadriver)) 47 if not os.path.exists(to): 48 if os.path.lexists(to): 53 abs_driver = os.path.join(to, driver) 55 if os.path.lexists(abs_driver): 64 name, ext = os.path.splitext(driver) 66 if os.path.lexists(name): [all …]
|
/hardware/google/gfxstream/guest/android-emu/aemu/base/ |
D | Path.cpp | 12 char path[1024]; in getProgramDirectory() local 13 memset(path, 0, sizeof(path)); // happy valgrind! in getProgramDirectory() 14 int len = readlink("/proc/self/exe", path, sizeof(path)); in getProgramDirectory() 15 if (len > 0 && len < (int)sizeof(path)) { in getProgramDirectory() 16 char* x = ::strrchr(path, '/'); in getProgramDirectory() 19 res.assign(path); in getProgramDirectory()
|
/hardware/google/av/hooks/ |
D | install | 13 import os, os.path 14 TOP = os.path.realpath(".") 15 HOOKS = os.path.realpath(".git/hooks") 16 src = os.path.join(TOP, "hooks", "install") 21 if os.path.isfile(tgt) and os.access(tgt, os.X_OK): 22 if os.path.realpath(tgt) != src: 25 if os.path.lexists(tgt): 27 …os.symlink(os.path.relpath(os.path.realpath("hooks/install"), os.path.realpath(".git/hooks/")), tg…
|
/hardware/google/graphics/common/libhwjpeg/ |
D | hwjpeg-base.cpp | 28 CHWJpegBase::CHWJpegBase(const char *path) : m_iFD(-1), m_uiDeviceCaps(0), m_uiAuxFlags(0) { in CHWJpegBase() argument 29 m_iFD = open(path, O_RDWR); in CHWJpegBase() 30 if (m_iFD < 0) ALOGERR("Failed to open '%s'", path); in CHWJpegBase() 92 bool WriteToFile(const char *path, const char *data, size_t len) { in WriteToFile() argument 93 int fd = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH | S_IWGRP); in WriteToFile() 95 ALOGERR("Failed to open '%s' for write/create", path); in WriteToFile() 102 ALOGERR("Failed to write %zu bytes to '%s'", len, path); in WriteToFile() 106 ALOGI("%zu/%zu bytes from ptr %p are written to '%s'", written, len, data, path); in WriteToFile() 111 bool WriteToFile(const char *path, int dmabuf, size_t len) { in WriteToFile() argument 119 int fd = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH | S_IWGRP); in WriteToFile() [all …]
|
/hardware/google/pixel/pixelstats/ |
D | PcaChargeStats.cpp | 36 std::string path = kPcaChargeMetricsPath; in CheckPcaContentsAndAck() local 40 if (!ReadFileToString(path.c_str(), file_contents)) { in CheckPcaContentsAndAck() 42 path = kDcChargeMetricsPath; in CheckPcaContentsAndAck() 44 path = kPca94xxChargeMetricsPath; in CheckPcaContentsAndAck() 46 if (!ReadFileToString(path.c_str(), file_contents)) { in CheckPcaContentsAndAck() 54 ALOGE("Unable to read first line %s - %s", path.c_str(), strerror(errno)); in CheckPcaContentsAndAck() 57 if (!WriteStringToFile(std::to_string(0), path.c_str())) { in CheckPcaContentsAndAck() 58 ALOGE("Couldn't clear %s - %s", path.c_str(), strerror(errno)); in CheckPcaContentsAndAck()
|
D | ThermalStatsReporter.cpp | 44 bool ThermalStatsReporter::readDfsCount(const std::string &path, int64_t *val) { in readDfsCount() argument 47 if (path.empty()) { in readDfsCount() 52 if (!ReadFileToString(path.c_str(), &file_contents)) { in readDfsCount() 53 ALOGE("Unable to read %s - %s", path.c_str(), strerror(errno)); in readDfsCount() 64 path.c_str()); in readDfsCount() 78 std::string path; in captureThermalDfsStats() local 86 path = thermal_stats_paths[ThermalDfsStats::kBigDfsCountFieldNumber - kVendorAtomOffset]; in captureThermalDfsStats() 87 if (!readDfsCount(path, &(pcur_data->big_count))) { in captureThermalDfsStats() 93 path = thermal_stats_paths[ThermalDfsStats::kMidDfsCountFieldNumber - kVendorAtomOffset]; in captureThermalDfsStats() 94 if (!readDfsCount(path, &(pcur_data->mid_count))) { in captureThermalDfsStats() [all …]
|
/hardware/google/gfxstream/guest/fuchsia/ |
D | releasepackage.py | 23 dir_path = os.path.dirname(os.path.realpath(__file__)) 27 fuchsia_root = os.path.abspath(os.path.join(dir_path, "../../../")) 28 fx_path = os.path.join(fuchsia_root, "scripts/fx") 31 release_dir = os.path.abspath(args.release_dir) 33 release_dir = os.path.join(fuchsia_root, "out/default") 35 if not os.path.exists(release_dir): 92 full_name = os.path.join(package_dir, file_name) 94 source_file_name = os.path.join(release_dir, target_name) 106 debug_source_file_name = os.path.join(release_dir, debug_target_name) 114 debug_output_dir = os.path.join(debug_dir, build_id[:2]) [all …]
|
/hardware/interfaces/drm/1.0/vts/functional/ |
D | vendor_modules.cpp | 53 DrmHalVTSVendorModule* VendorModules::getModule(const string& path) { in getModule() argument 54 if (mOpenLibraries.find(path) == mOpenLibraries.end()) { in getModule() 55 auto library = std::make_unique<SharedLibrary>(String8(path.c_str())); in getModule() 57 ALOGE("failed to map shared library %s", path.c_str()); in getModule() 60 mOpenLibraries[path] = std::move(library); in getModule() 62 const unique_ptr<SharedLibrary>& library = mOpenLibraries[path]; in getModule() 66 "%s", path.c_str(), library->lastError()); in getModule() 75 for (const auto &path : mPathList) { in getModuleByName() local 76 auto module = getModule(path); in getModuleByName()
|
/hardware/google/camera/common/hal/aidl_service/ |
D | libc_wrappers.cc | 67 extern "C" int chdir(const char* path) { in chdir() argument 70 int ret = real_function(path); in chdir() 71 ALOGI("chdir (%s) == %d", path, ret); in chdir() 102 extern "C" int chmod(const char* path, mode_t mode) { in chmod() argument 105 int ret = real_function(path, mode); in chmod() 106 ALOGI("chmod (%s) == %d", path, ret); in chmod() 109 extern "C" int chown(const char* path, uid_t owner, gid_t group) { in chown() argument 112 int ret = real_function(path, owner, group); in chown() 113 ALOGI("chown (%s,%d,%d) == %d", path, owner, group, ret); in chown() 130 extern "C" int execl(const char* path, const char* arg, ...) { in execl() argument [all …]
|
/hardware/google/gfxstream/guest/mesa/src/util/ |
D | disk_cache_os.c | 110 mkdir_if_needed(const char *path) in mkdir_if_needed() argument 117 if (stat(path, &sb) == 0) { in mkdir_if_needed() 122 "---disabling.\n", path); in mkdir_if_needed() 127 int ret = mkdir(path, 0700); in mkdir_if_needed() 132 path, strerror(errno)); in mkdir_if_needed() 148 concatenate_and_mkdir(void *ctx, const char *path, const char *name) in concatenate_and_mkdir() argument 153 if (stat(path, &sb) != 0 || ! S_ISDIR(sb.st_mode)) in concatenate_and_mkdir() 156 new_path = ralloc_asprintf(ctx, "%s/%s", path, name); in concatenate_and_mkdir() 316 is_regular_non_tmp_file(const char *path, const struct stat *sb, in is_regular_non_tmp_file() argument 330 unlink_lru_file_from_directory(const char *path) in unlink_lru_file_from_directory() argument [all …]
|
/hardware/google/camera/common/sensor_listener/tests/ |
D | sensor_test_utils.h | 23 const char* path = "/vendor/bin/lib_sensor_listener_test/"; in GenerateLogFilename() local 26 if (stat(path, &directory_stat) != 0) { in GenerateLogFilename() 29 if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) != 0) { in GenerateLogFilename() 31 path, errno); in GenerateLogFilename() 35 ALOGE("%s: %d: stat(%s) failed: (errno: %d).", __func__, __LINE__, path, in GenerateLogFilename() 47 ss << path << input_filename << "_" << timebuf << "_" << now_time.tv_usec in GenerateLogFilename()
|
/hardware/google/pixel/vibrator/drv2624/tests/ |
D | test-hwapi.cpp | 65 auto name = std::filesystem::path(n); in SetUp() 66 auto path = std::filesystem::path(mFilesDir.path) / name; in SetUp() local 67 fs_mkdirs(path.c_str(), S_IRWXU); in SetUp() 68 std::ofstream touch{path}; in SetUp() 69 mFileMap[name] = path; in SetUp() 71 prefix = std::filesystem::path(mFilesDir.path) / ""; in SetUp() 76 auto name = std::filesystem::path(n); in SetUp() 77 auto path = std::filesystem::path(mEmptyDir.path) / name; in SetUp() local 78 fs_mkdirs(path.c_str(), S_IRWXU); in SetUp() 79 std::ofstream touch{path}; in SetUp() [all …]
|