Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 858) sorted by relevance

12345678910>>...35

/system/apex/apexd/
Dapex_file_repository_test.cpp76 fs::copy(GetTestFile("apex.apexd_test.apex"), built_in_dir.path); in TEST()
78 built_in_dir.path); in TEST()
80 fs::copy(GetTestFile("apex.apexd_test.apex"), data_dir.path); in TEST()
81 fs::copy(GetTestFile("apex.apexd_test_different_app.apex"), data_dir.path); in TEST()
84 ASSERT_TRUE(IsOk(instance.AddPreInstalledApex({built_in_dir.path}))); in TEST()
85 ASSERT_TRUE(IsOk(instance.AddDataApex(data_dir.path))); in TEST()
101 ASSERT_EQ(StringPrintf("%s/%s", built_in_dir.path, apex_name.c_str()), in TEST()
108 ASSERT_EQ(StringPrintf("%s/%s", data_dir.path, apex_name.c_str()), *ret); in TEST()
119 ASSERT_TRUE(IsOk(instance.AddPreInstalledApex({built_in_dir.path}))); in TEST()
120 ASSERT_TRUE(IsOk(instance.AddDataApex(data_dir.path))); in TEST()
[all …]
Dapexd_utils_test.cpp51 TemporaryFile child_file_1(root_dir.path); in TEST()
52 TemporaryFile child_file_2(root_dir.path); in TEST()
53 std::string child_dir = StringPrintf("%s/child-dir", root_dir.path); in TEST()
57 auto content = ReadDir(root_dir.path, [](auto _) { return true; }); in TEST()
61 auto del_result = DeleteDirContent(root_dir.path); in TEST()
63 content = ReadDir(root_dir.path, [](auto _) { return true; }); in TEST()
71 auto result = FindFirstExistingDirectory(first_dir.path, second_dir.path); in TEST()
73 ASSERT_EQ(*result, first_dir.path); in TEST()
79 auto result = FindFirstExistingDirectory(first_dir.path, second_dir); in TEST()
81 ASSERT_EQ(*result, first_dir.path); in TEST()
[all …]
Dapexd_utils.h91 android::base::Result<void> WalkDir(const std::string& path, Fn fn) { in WalkDir() argument
94 auto it = fs::directory_iterator(path, ec); in WalkDir()
102 << "Can't open " << path << " for reading : " << ec.message(); in WalkDir()
108 android::base::Result<std::vector<std::string>> ReadDir(const std::string& path, in ReadDir() argument
113 auto status = WalkDir(path, [&](const fs::directory_entry& entry) { in ReadDir()
115 ret.push_back(entry.path()); in ReadDir()
124 inline bool IsEmptyDirectory(const std::string& path) { in IsEmptyDirectory() argument
125 auto res = ReadDir(path, [](auto _) { return true; }); in IsEmptyDirectory()
129 inline android::base::Result<void> CreateDirIfNeeded(const std::string& path, in CreateDirIfNeeded() argument
133 if (stat(path.c_str(), &stat_data) != 0) { in CreateDirIfNeeded()
[all …]
/system/incremental_delivery/incfs/
Dpath.cpp32 namespace android::incfs::path { namespace
66 bool isAbsolute(std::string_view path) { in isAbsolute() argument
67 return !path.empty() && path[0] == '/'; in isAbsolute()
70 std::string normalize(std::string_view path) { in normalize() argument
71 if (path.empty()) { in normalize()
74 if (path.starts_with("../"sv)) { in normalize()
79 if (isAbsolute(path)) { in normalize()
80 path.remove_prefix(1); in normalize()
91 for (; end != path.npos; start = end + 1) { in normalize()
92 end = path.find('/', start); in normalize()
[all …]
/system/bt/gd/cert/
Dbluetooth_packets_python3_setup.py32 PYBIND11_INCLUDE_DIR = os.path.join(ANDROID_BUILD_TOP, "external/python/pybind11/include")
33 GD_DIR = os.path.join(ANDROID_BUILD_TOP, "system/bt/gd")
34 BT_PACKETS_GEN_DIR = os.path.join(ANDROID_BUILD_TOP,
36 BT_PACKETS_PY3_GEN_DIR = os.path.join(ANDROID_BUILD_TOP,
40 os.path.join(GD_DIR, "l2cap/fcs.cc"),
41 os.path.join(GD_DIR, "packet/bit_inserter.cc"),
42 os.path.join(GD_DIR, "packet/byte_inserter.cc"),
43 os.path.join(GD_DIR, "packet/byte_observer.cc"),
44 os.path.join(GD_DIR, "packet/iterator.cc"),
45 os.path.join(GD_DIR, "packet/fragmenting_inserter.cc"),
[all …]
/system/unwinding/libunwindstack/benchmarks/
DMapsBenchmark.cpp81 CreateMap(initial_maps.path, kNumSmallMaps, 2); in BM_local_updatable_maps_reparse_double_initial_small()
84 CreateMap(reparse_maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_double_initial_small()
86 ReparseBenchmark(state, initial_maps.path, kNumSmallMaps / 2, reparse_maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_double_initial_small()
92 CreateMap(initial_maps.path, kNumLargeMaps, 2); in BM_local_updatable_maps_reparse_double_initial_large()
95 CreateMap(reparse_maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_double_initial_large()
97 ReparseBenchmark(state, initial_maps.path, kNumLargeMaps / 2, reparse_maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_double_initial_large()
104 CreateMap(maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_same_maps_small()
106 ReparseBenchmark(state, maps.path, kNumSmallMaps, maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_same_maps_small()
112 CreateMap(maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_same_maps_large()
114 ReparseBenchmark(state, maps.path, kNumLargeMaps, maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_same_maps_large()
[all …]
/system/sepolicy/tools/
Dsepolicy_cleanup_check.sh39 …if [[ `find $sedir -name "*_contexts" -not -path "*prebuilts*" -exec grep $type '{}' \; |wc -l` -e…
52 path=`echo $path_line | sed 's/^.*:[^\/]*\([^ ]*\) .*$/\1/'`
54 path=`echo $path | sed 's/\[[^]]*\]/*/' | sed 's/+/*/'`
56 if [ -n "`$adb_cmd shell ls -lZ $path < /dev/null |& grep "No such file or directory"`" ]; then
57 echo "$path does not exist"
66path=`echo $file_line | sed 's/rootfs //' | sed 's/sysfs /\/sys/' | sed 's/proc /\/proc/' | sed 's…
68 if [[ $path = *" "* ]]; then
72 if [ -n "`$adb_cmd shell ls -lZ $path < /dev/null |& grep "No such file or directory"`" ]; then
73 echo "$path does not exist"
80 …name file_contexts -not -path "*prebuilts*" -exec grep "^/" '{}' \; | cut -d' ' -f1 | cut -f1 | so…
[all …]
/system/core/libcutils/
Dfs.cpp42 static int fs_prepare_path_impl(const char* path, mode_t mode, uid_t uid, gid_t gid, in fs_prepare_path_impl() argument
52 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { in fs_prepare_path_impl()
56 ALOGE("Failed to lstat(%s): %s", path, strerror(errno)); in fs_prepare_path_impl()
64 ALOGE("Not a %s: %s", (prepare_as_dir ? "directory" : "regular file"), path); in fs_prepare_path_impl()
77 path, uid, gid, sb.st_uid, sb.st_gid); in fs_prepare_path_impl()
81 path, mode, (sb.st_mode & ALL_PERMS)); in fs_prepare_path_impl()
88 ? TEMP_FAILURE_RETRY(mkdir(path, mode)) in fs_prepare_path_impl()
89 : TEMP_FAILURE_RETRY(open(path, O_CREAT | O_CLOEXEC | O_NOFOLLOW | O_RDONLY, 0644)); in fs_prepare_path_impl()
93 (prepare_as_dir ? "mkdir" : "open"), path, strerror(errno)); in fs_prepare_path_impl()
99 ALOGW("Failed to close file after create %s: %s", path, strerror(errno)); in fs_prepare_path_impl()
[all …]
Dcanned_fs_config.cpp29 const char* path; member
41 return strcmp(((Path*)a)->path, ((Path*)b)->path); in path_compare()
67 p->path = strdup(rootdir ? "" : strtok(line, " ")); in load_canned_fs_config()
94 void canned_fs_config(const char* path, int dir, const char* target_out_path, in canned_fs_config() argument
98 key.path = path; in canned_fs_config()
99 if (path[0] == '/') key.path++; // canned paths lack the leading '/' in canned_fs_config()
102 fprintf(stderr, "failed to find [%s] in canned fs_config\n", path); in canned_fs_config()
116 fs_config(path, dir, target_out_path, &c_uid, &c_gid, &c_mode, &c_capabilities); in canned_fs_config()
118 if (c_uid != *uid) printf("%s uid %d %d\n", path, *uid, c_uid); in canned_fs_config()
119 if (c_gid != *gid) printf("%s gid %d %d\n", path, *gid, c_gid); in canned_fs_config()
[all …]
/system/libbase/
Dfile.cpp56 std::wstring path; in mkstemp() local
57 CHECK(android::base::UTF8ToWide(name_template, &path)) in mkstemp()
59 if (_wmktemp_s(path.data(), path.size() + 1) != 0) { in mkstemp()
65 int fd = _wopen(path.c_str(), O_CREAT | O_EXCL | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR); in mkstemp()
71 CHECK(android::base::WideToUTF8(path, &path_utf8)) << "path can't be converted to utf8"; in mkstemp()
79 std::wstring path; in mkdtemp() local
80 CHECK(android::base::UTF8ToWide(name_template, &path)) in mkdtemp()
83 if (_wmktemp_s(path.data(), path.size() + 1) != 0) { in mkdtemp()
87 if (_wmkdir(path.c_str()) != 0) { in mkdtemp()
92 CHECK(android::base::WideToUTF8(path, &path_utf8)) << "path can't be converted to utf8"; in mkdtemp()
[all …]
Dfile_test.cpp48 ASSERT_NE(tf.fd, -1) << tf.path; in TEST()
49 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path)) in TEST()
52 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST()
61 ASSERT_EQ(0, unlink(link.path)); in TEST()
62 ASSERT_EQ(0, symlink(target.path, link.path)); in TEST()
63 ASSERT_FALSE(android::base::WriteStringToFile("foo", link.path, false)); in TEST()
65 ASSERT_TRUE(android::base::WriteStringToFile("foo", link.path, true)); in TEST()
68 ASSERT_FALSE(android::base::ReadFileToString(link.path, &s)); in TEST()
70 ASSERT_TRUE(android::base::ReadFileToString(link.path, &s, true)); in TEST()
80 ASSERT_NE(tf.fd, -1) << tf.path; in TEST()
[all …]
/system/incremental_delivery/incfs/include/
Dpath.h26 namespace android::incfs::path {
33 bool isAbsolute(std::string_view path);
34 std::string normalize(std::string_view path);
52 inline std::string_view baseName(std::string_view path) { in baseName() argument
54 if (path.empty()) { in baseName()
57 if (path == "/"sv) { in baseName()
60 auto pos = path.rfind('/'); in baseName()
61 while (!path.empty() && pos == path.size() - 1) { in baseName()
62 path.remove_suffix(1); in baseName()
63 pos = path.rfind('/'); in baseName()
[all …]
/system/core/init/
Dutil_test.cpp44 EXPECT_RESULT_OK(WriteFile(tf.path, s)); in TEST()
45 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0620, AT_SYMLINK_NOFOLLOW)) << strerror(errno); in TEST()
46 auto file_contents = ReadFile(tf.path); in TEST()
55 EXPECT_RESULT_OK(WriteFile(tf.path, s)); in TEST()
56 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0602, AT_SYMLINK_NOFOLLOW)) << strerror(errno); in TEST()
57 auto file_contents = ReadFile(tf.path); in TEST()
90 EXPECT_RESULT_OK(WriteFile(tf.path, contents)); in TEST()
92 auto read_back_contents = ReadFile(tf.path); in TEST()
101 std::string path = android::base::StringPrintf("%s/does-not-exist", test_dir.path); in TEST() local
102 EXPECT_RESULT_OK(WriteFile(path, s)); in TEST()
[all …]
Ddevices.cpp59 static bool FindPciDevicePrefix(const std::string& path, std::string* result) { in FindPciDevicePrefix() argument
62 if (!StartsWith(path, "/devices/pci")) return false; in FindPciDevicePrefix()
69 auto end = path.find('/', start); in FindPciDevicePrefix()
72 end = path.find('/', end + 1); in FindPciDevicePrefix()
82 *result = path.substr(start, length); in FindPciDevicePrefix()
90 static bool FindVbdDevicePrefix(const std::string& path, std::string* result) { in FindVbdDevicePrefix() argument
93 if (!StartsWith(path, "/devices/vbd-")) return false; in FindVbdDevicePrefix()
100 auto end = path.find('/', start); in FindVbdDevicePrefix()
106 *result = path.substr(start, length); in FindVbdDevicePrefix()
114 static bool FindDmDevice(const std::string& path, std::string* name, std::string* uuid) { in FindDmDevice() argument
[all …]
/system/core/healthd/
DBatteryMonitor.cpp177 int BatteryMonitor::readFromFile(const String8& path, std::string* buf) { in readFromFile() argument
178 if (android::base::ReadFileToString(path.c_str(), buf)) { in readFromFile()
184 BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String8& path) { in readPowerSupplyType() argument
203 if (readFromFile(path, &buf) <= 0) in readPowerSupplyType()
215 bool BatteryMonitor::getBooleanField(const String8& path) { in getBooleanField() argument
219 if (readFromFile(path, &buf) > 0) in getBooleanField()
226 int BatteryMonitor::getIntField(const String8& path) { in getIntField() argument
230 if (readFromFile(path, &buf) > 0) in getIntField()
239 String8 path; in isScopedPowerSupply() local
240 path.appendFormat("%s/%s/scope", POWER_SUPPLY_SYSFS_PATH, name); in isScopedPowerSupply()
[all …]
/system/tools/hidl/hashing/
DHash.cpp33 Hash& Hash::getMutableHash(const std::string& path) { in getMutableHash() argument
36 auto it = hashes.find(path); in getMutableHash()
38 if (hashes.find(path) == hashes.end()) { in getMutableHash()
39 it = hashes.insert(it, {path, Hash(path)}); in getMutableHash()
45 const Hash& Hash::getHash(const std::string& path) { in getHash() argument
46 return getMutableHash(path); in getHash()
49 void Hash::clearHash(const std::string& path) { in clearHash() argument
50 getMutableHash(path).mHash = kEmptyHash; in clearHash()
53 static std::vector<uint8_t> sha256File(const std::string& path) { in sha256File() argument
54 std::ifstream stream(path); in sha256File()
[all …]
/system/tools/mkbootimg/tests/
Dmkbootimg_test.py47 random.seed(os.path.basename(pathname) if seed is None else seed)
81 self._exec_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
83 self._avbtool_path = os.path.join(self._exec_dir, 'avbtool')
92 boot_img = os.path.join(temp_out_dir, 'boot.img')
93 kernel = generate_test_file(os.path.join(temp_out_dir, 'kernel'),
95 ramdisk = generate_test_file(os.path.join(temp_out_dir, 'ramdisk'),
119 '--out', os.path.join(temp_out_dir, 'out'),
158 os.path.join(temp_out_dir, 'out', 'boot_signature')
176 boot_img = os.path.join(temp_out_dir, 'boot.img')
177 kernel = generate_test_file(os.path.join(temp_out_dir, 'kernel'),
[all …]
/system/vold/
DAppFuseUtil.cpp36 static android::status_t GetMountPath(uid_t uid, const std::string& name, std::string* path) { in GetMountPath() argument
47 *path = StringPrintf("/mnt/appfuse/%d_%s", uid, name.c_str()); in GetMountPath()
51 static android::status_t Mount(int device_fd, const std::string& path) { in Mount() argument
63 TEMP_FAILURE_RETRY(mount("/dev/fuse", path.c_str(), "fuse", in Mount()
66 PLOG(ERROR) << "Failed to mount " << path; in Mount()
73 static android::status_t RunCommand(const std::string& command, uid_t uid, const std::string& path, in RunCommand() argument
76 LOG(DEBUG) << "Run app fuse command " << command << " for the path " << path << " and uid " in RunCommand()
81 return Mount(device_fd, path); in RunCommand()
85 if (umount2(path.c_str(), UMOUNT_NOFOLLOW | MNT_DETACH) != 0 && errno != EINVAL && in RunCommand()
90 if (rmdir(path.c_str()) != 0) { in RunCommand()
[all …]
/system/tools/aidl/
Dimport_resolver.cpp42 for (string path : import_paths) { in ImportResolver() local
43 if (path.empty()) { in ImportResolver()
44 path = "."; in ImportResolver()
46 if (path[path.size() - 1] != OS_PATH_SEPARATOR) { in ImportResolver()
47 path += OS_PATH_SEPARATOR; in ImportResolver()
49 import_paths_.push_back(std::move(path)); in ImportResolver()
65 for (string path : import_paths_) { in FindImportFile() local
66 path = path + relative_path; in FindImportFile()
67 if (io_delegate_.FileIsReadable(path)) { in FindImportFile()
68 found_paths.emplace_back(path); in FindImportFile()
/system/linkerconfig/modules/
Dnamespace.cc56 ns.AddSearchPath(apex_info.path + "/${LIB}"); in InitializeWithApex()
57 ns.AddPermittedPath(apex_info.path + "/${LIB}"); in InitializeWithApex()
116 void Namespace::AddSearchPath(const std::string& path) { in AddSearchPath() argument
117 search_paths_.push_back(path); in AddSearchPath()
119 if (RequiresAsanPath(path)) { in AddSearchPath()
120 asan_search_paths_.push_back(CreateAsanPath(path)); in AddSearchPath()
122 asan_search_paths_.push_back(path); in AddSearchPath()
125 void Namespace::AddPermittedPath(const std::string& path) { in AddPermittedPath() argument
126 permitted_paths_.push_back(path); in AddPermittedPath()
128 if (RequiresAsanPath(path)) { in AddPermittedPath()
[all …]
/system/apex/apexer/
Dapexer_test.py39 TEST_PRIVATE_KEY = os.path.join("testdata", "com.android.example.apex.pem")
40 TEST_X509_KEY = os.path.join("testdata", "com.android.example.apex.x509.pem")
41 TEST_PK8_KEY = os.path.join("testdata", "com.android.example.apex.pk8")
42 TEST_AVB_PUBLIC_KEY = os.path.join("testdata", "com.android.example.apex.avbpubkey")
77 host_command_dir = os.path.join(host_build_top, "out/soong/host/linux-x86/bin")
78 args[0] = os.path.join(host_command_dir, args[0])
130 current_dir = os.path.dirname(os.path.realpath(__file__))
165 self._get_host_tools(os.path.join(get_current_dir(), "apexer_test_host_tools.zip"))
170 if os.path.isdir(i):
181 if os.path.isfile(host_tools_file_path):
[all …]
/system/bt/test/
Drun_host_unit_tests.py47 if not os.path.isdir(dir):
65 current_path = os.path.abspath(os.getcwd())
66 while current_path and os.path.isdir(current_path):
67 soong_ui_bash_path = os.path.join(current_path, SOONG_UI_BASH)
68 if os.path.isfile(soong_ui_bash_path):
73 parent_path = os.path.abspath(os.path.join(current_path, os.pardir))
89 …value = get_output_from_command((os.path.join(ANDROID_BUILD_TOP, SOONG_UI_BASH), '--dumpvar-mode',…
104 value = os.path.join(os.path.join(ANDROID_BUILD_TOP, 'out'), 'dist')
105 if not os.path.isdir(value):
106 if os.path.exists(value):
[all …]
/system/tools/hidl/c2hal/test/
Dbuild_all.py20 from os.path import isfile, join as path_join
29 path = args.path
32 success, failure = genFiles(path, is_open_gl)
48 def genFiles(path, is_open_gl): argument
52 for header in sorted(headers(path)):
62 command += [path_join(path, header)]
73 def headers(path): argument
75 for item in listdir(path):
76 if not isfile(path_join(path, item)):
/system/linkerconfig/contents/tests/backward_compatibility/
Dtestbase.h59 const std::string& path) { in ContainsPath() argument
62 [&](const std::string& item) { return item == path; }); in ContainsPath()
67 const std::string& path) { in ContainsSearchPath() argument
68 if (!ContainsPath(ns->SearchPaths(), path)) { in ContainsSearchPath()
74 if (!ContainsPath(asan_search_path, path)) { in ContainsSearchPath()
78 if (!android::base::StartsWith(path, "/apex") && in ContainsSearchPath()
79 !ContainsPath(asan_search_path, "/data/asan" + path)) { in ContainsSearchPath()
88 const std::string& path) { in ContainsPermittedPath() argument
89 if (!ContainsPath(ns->PermittedPaths(), path)) { in ContainsPermittedPath()
95 if (!ContainsPath(asan_search_path, path)) { in ContainsPermittedPath()
[all …]
/system/apex/tests/testdata/sharedlibs/build/
Dshared_libs_repack.py137 zip_obj.extractall(path=dir_name)
143 file_path = os.path.join(dir_name, i)
144 if os.path.exists(file_path):
166 if os.path.exists(os.path.join(dir_name, i)):
167 os.remove(os.path.join(dir_name, i))
168 if os.path.isdir(os.path.join(dir_name, 'lost+found')):
169 shutil.rmtree(os.path.join(dir_name, 'lost+found'))
180 os.path.dirname(apexer_cmd) + ':prebuilts/sdk/tools/linux/bin'
203 if os.path.isfile('prebuilts/jdk/jdk11/linux-x86/bin/java'):
207 os.path.join(os.path.dirname(_get_host_tools_path()), 'lib64') + ':' +
[all …]

12345678910>>...35