Home
last modified time | relevance | path

Searched refs:fs (Results 1 – 25 of 142) sorted by relevance

123456

/system/update_engine/payload_generator/
Dsquashfs_filesystem_unittest.cc75 void CheckSquashfs(const unique_ptr<SquashfsFilesystem>& fs) { in CheckSquashfs() argument
76 ASSERT_TRUE(fs); in CheckSquashfs()
77 EXPECT_EQ(kTestBlockSize, fs->GetBlockSize()); in CheckSquashfs()
80 ASSERT_TRUE(fs->GetFiles(&files)); in CheckSquashfs()
87 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in CheckSquashfs()
114 unique_ptr<SquashfsFilesystem> fs = SquashfsFilesystem::CreateFromFile( in TEST_F() local
116 CheckSquashfs(fs); in TEST_F()
119 EXPECT_EQ(4096 / kTestBlockSize, fs->GetBlockCount()); in TEST_F()
122 ASSERT_TRUE(fs->GetFiles(&files)); in TEST_F()
135 unique_ptr<SquashfsFilesystem> fs = SquashfsFilesystem::CreateFromFile( in TEST_F() local
[all …]
Derofs_filesystem_unittest.cc53 unique_ptr<ErofsFilesystem> fs = in TEST_F() local
55 ASSERT_EQ(nullptr, fs.get()); in TEST_F()
57 fs = ErofsFilesystem::CreateFromFile("/path/to/invalid/file"); in TEST_F()
58 ASSERT_EQ(nullptr, fs.get()); in TEST_F()
62 unique_ptr<ErofsFilesystem> fs = ErofsFilesystem::CreateFromFile( in TEST_F() local
65 ASSERT_NE(nullptr, fs); in TEST_F()
66 ASSERT_EQ(kBlockSize, fs->GetBlockSize()); in TEST_F()
69 ASSERT_TRUE(fs->GetFiles(&files)); in TEST_F()
78 auto fs = ErofsFilesystem::CreateFromFile(build_path); in TEST_F() local
79 ASSERT_NE(fs, nullptr); in TEST_F()
[all …]
Dmapfile_filesystem_unittest.cc63 unique_ptr<MapfileFilesystem> fs = MapfileFilesystem::CreateFromFile( in TEST_F() local
65 ASSERT_NE(nullptr, fs.get()); in TEST_F()
67 EXPECT_EQ(0U, fs->GetBlockCount()); in TEST_F()
69 EXPECT_EQ(4096U, fs->GetBlockSize()); in TEST_F()
82 unique_ptr<MapfileFilesystem> fs = MapfileFilesystem::CreateFromFile( in TEST_F() local
84 ASSERT_NE(nullptr, fs.get()); in TEST_F()
87 EXPECT_TRUE(fs->GetFiles(&files)); in TEST_F()
94 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F()
114 unique_ptr<MapfileFilesystem> fs = MapfileFilesystem::CreateFromFile( in TEST_F() local
116 ASSERT_NE(nullptr, fs.get()); in TEST_F()
[all …]
Dext2_filesystem_unittest.cc67 unique_ptr<Ext2Filesystem> fs = in TEST_F() local
69 ASSERT_EQ(nullptr, fs.get()); in TEST_F()
71 fs = Ext2Filesystem::CreateFromFile("/path/to/invalid/file"); in TEST_F()
72 ASSERT_EQ(nullptr, fs.get()); in TEST_F()
76 unique_ptr<Ext2Filesystem> fs = Ext2Filesystem::CreateFromFile( in TEST_F() local
79 ASSERT_NE(nullptr, fs.get()); in TEST_F()
80 EXPECT_EQ(kDefaultFilesystemBlockCount, fs->GetBlockCount()); in TEST_F()
81 EXPECT_EQ(kDefaultFilesystemBlockSize, fs->GetBlockSize()); in TEST_F()
84 EXPECT_TRUE(fs->GetFiles(&files)); in TEST_F()
91 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F()
[all …]
Dboot_img_filesystem_unittest.cc73 unique_ptr<BootImgFilesystem> fs = in TEST_F() local
75 EXPECT_NE(nullptr, fs); in TEST_F()
78 EXPECT_TRUE(fs->GetFiles(&files)); in TEST_F()
98 unique_ptr<BootImgFilesystem> fs = in TEST_F() local
100 EXPECT_NE(nullptr, fs); in TEST_F()
103 EXPECT_TRUE(fs->GetFiles(&files)); in TEST_F()
123 unique_ptr<BootImgFilesystem> fs = in TEST_F() local
125 EXPECT_EQ(nullptr, fs); in TEST_F()
136 unique_ptr<BootImgFilesystem> fs = in TEST_F() local
138 EXPECT_NE(nullptr, fs); in TEST_F()
[all …]
/system/linkerconfig/contents/tests/configuration/
Dvndk_test.cc37 std::string Search(const Namespace& ns, std::string_view soname, fsmap fs) { in Search() argument
40 auto libs = fs[path]; in Search()
65 auto fs = fsmap{ in TEST()
71 EXPECT_EQ(apex_vndk_lib_path, Search(vndk_ns, libvndk, fs)); in TEST()
72 EXPECT_EQ(apex_vndk_lib_path, Search(vndk_ns, libvndksp, fs)); in TEST()
75 fs[vendor_vndk_lib_path] = {libvndk}; in TEST()
76 EXPECT_EQ(vendor_vndk_lib_path, Search(vndk_ns, libvndk, fs)); in TEST()
77 EXPECT_EQ(apex_vndk_lib_path, Search(vndk_ns, libvndksp, fs)); in TEST()
80 fs[vendor_vndksp_lib_path] = {libvndksp}; in TEST()
81 EXPECT_EQ(vendor_vndk_lib_path, Search(vndk_ns, libvndk, fs)); in TEST()
[all …]
/system/extras/checkpoint_gc/
Dcheckpoint_gc.sh41 if [ ! -f /dev/sys/fs/by-name/userdata/gc_urgent ]; then
52 if [ -f /dev/sys/fs/by-name/userdata/unusable ]; then
57 read START < /dev/sys/fs/by-name/userdata/unusable
62 read START < /dev/sys/fs/by-name/userdata/dirty_segments
67 read OLD_SLEEP < /dev/sys/fs/by-name/userdata/gc_urgent_sleep_time || \
70 echo ${GC_SLEEP} > /dev/sys/fs/by-name/userdata/gc_urgent_sleep_time || \
74 echo ${GC_TYPE} > /dev/sys/fs/by-name/userdata/gc_urgent \
78 echo ${GC_TYPE} > /dev/sys/fs/by-name/userdata/gc_urgent || \
79 { echo ${OLD_SLEEP} > /dev/sys/fs/by-name/userdata/gc_urgent_sleep_time; \
98 read CURRENT < /dev/sys/fs/by-name/userdata/unusable
[all …]
/system/update_engine/aosp/
Dmap_file_generator.cc36 const FilesystemInterface* fs, in WriteBlockMap() argument
39 if (!fs->GetFiles(&files)) { in WriteBlockMap()
112 std::unique_ptr<FilesystemInterface> fs; in Main() local
114 fs = SquashfsFilesystem::CreateFromFile(img, true); in Main()
115 if (fs != nullptr) { in Main()
116 return WriteBlockMap(img, fs.get(), output_file); in Main()
118 fs = ErofsFilesystem::CreateFromFile(img); in Main()
119 if (fs != nullptr) { in Main()
120 return WriteBlockMap(img, fs.get(), output_file); in Main()
122 fs = Ext2Filesystem::CreateFromFile(img); in Main()
[all …]
/system/apex/apexd/
Dapex_shim.cpp44 namespace fs = std::filesystem;
50 static constexpr const fs::perms kForbiddenFilePermissions =
51 fs::perms::owner_exec | fs::perms::group_exec | fs::perms::others_exec;
126 auto iter = fs::recursive_directory_iterator(mount_point, ec); in ValidateShimApex()
130 while (iter != fs::end(iter)) { in ValidateShimApex()
133 auto resolved_mount_point = fs::path(mount_point).string(); in ValidateShimApex()
135 fs::file_status status = iter->status(ec); in ValidateShimApex()
137 if (fs::is_symlink(status)) { in ValidateShimApex()
141 } else if (fs::is_regular_file(status)) { in ValidateShimApex()
143 fs::perms::none) { in ValidateShimApex()
[all …]
Dapex_file_repository_test.cpp42 namespace fs = std::filesystem;
63 fs::copy(GetTestFile(name), built_in_dir); in PrepareCompressedApex()
80 fs::copy(GetTestFile("apex.apexd_test.apex"), built_in_dir.path); in TEST()
81 fs::copy(GetTestFile("apex.apexd_test_different_app.apex"), in TEST()
84 fs::copy(GetTestFile("apex.apexd_test.apex"), data_dir.path); in TEST()
85 fs::copy(GetTestFile("apex.apexd_test_different_app.apex"), data_dir.path); in TEST()
133 fs::copy(GetTestFile("apex.apexd_test.apex"), td.path); in TEST()
134 fs::copy(GetTestFile("apex.apexd_test_corrupt_superblock_apex.apex"), in TEST()
144 fs::copy(GetTestFile("com.android.apex.compressed.v1_without_apex.capex"), in TEST()
155 fs::copy(GetTestFile("apex.apexd_test.apex"), td.path); in TEST()
[all …]
Dapexd_utils.h49 namespace fs = std::filesystem; in WalkDir() local
51 auto it = fs::directory_iterator(path, ec); in WalkDir()
52 auto end = fs::directory_iterator(); in WalkDir()
67 namespace fs = std::filesystem; in ReadDir() local
70 auto status = WalkDir(path, [&](const fs::directory_entry& entry) { in ReadDir()
132 namespace fs = std::filesystem; in DeleteDir() local
134 fs::remove_all(path, ec); in DeleteDir()
143 namespace fs = std::filesystem; in PathExists() local
146 if (!fs::exists(fs::path(path), ec)) { in PathExists()
190 namespace fs = std::filesystem; in GetSubdirs() local
[all …]
Dapex_database.cpp46 namespace fs = std::filesystem;
61 const fs::path kDevBlock = "/dev/block";
62 const fs::path kSysBlock = "/sys/block";
67 explicit BlockDevice(const fs::path& path) { name = path.filename(); } in BlockDevice()
75 fs::path SysPath() const { return kSysBlock / name; } in SysPath()
77 fs::path DevPath() const { return kDevBlock / name; } in DevPath()
93 if (fs::is_block_file(dev.DevPath(), ec)) { in GetSlaves()
104 std::pair<fs::path, fs::path> ParseMountInfo(const std::string& mount_info) { in ParseMountInfo()
113 auto package_id = fs::path(mount_point).filename(); in ParseMountPoint()
274 if (fs::path(mount_point).parent_path() != kApexRoot) { in PopulateFromMounts()
Dapexd_rollback_utils.h63 namespace fs = std::filesystem; in ReplaceFiles() local
66 fs::remove_all(to_path, error_code); in ReplaceFiles()
74 fs::remove_all(to_path, error_code); in ReplaceFiles()
/system/extras/tests/kernel.config/
Dnfs_test.cpp23 std::string fs; in TEST() local
24 EXPECT_TRUE(android::base::ReadFileToString("/proc/filesystems", &fs)); in TEST()
25 EXPECT_TRUE(fs.find("\tnfs\n") == std::string::npos); in TEST()
26 EXPECT_TRUE(fs.find("\tnfs4\n") == std::string::npos); in TEST()
27 EXPECT_TRUE(fs.find("\tnfsd\n") == std::string::npos); in TEST()
/system/libziparchive/incfs_support/include/incfs_support/
Dutil.h37 struct statfs fs = {}; in isIncfsFd() local
38 if (::fstatfs(fd, &fs) != 0) { in isIncfsFd()
41 return fs.f_type == static_cast<decltype(fs.f_type)>(INCFS_MAGIC_NUMBER); in isIncfsFd()
/system/apex/tests/native/
Dapex_shared_libraries_test.cpp40 namespace fs = std::filesystem;
104 std::string dev_file = fs::path(entry.blk_device).filename(); in TEST()
109 auto lib = fs::path(entry.mount_point) / LIB; in TEST()
110 if (!fs::is_directory(lib)) { in TEST()
114 for (auto& p : fs::directory_iterator(lib)) { in TEST()
116 if (!fs::is_symlink(p, ec)) { in TEST()
122 auto target = fs::read_symlink(p.path(), ec); in TEST()
130 auto dest = fs::canonical(p.path(), ec); in TEST()
185 auto dest = *static_cast<fs::path*>(data); in TEST()
199 auto libpath = fs::path(dl_info.dli_fname); in TEST()
/system/tools/xsdc/src/test/java/com/android/xsdc/cpp/
DTestCppCodeGenerator.java67 FileSystem fs = new FileSystem(files); in testSimpleTypeRootParser() local
68 gen.print(fs); in testSimpleTypeRootParser()
86 FileSystem fs = new FileSystem(files); in testPrintWithoutEnumOutput() local
87 gen.print(fs); in testPrintWithoutEnumOutput()
106 FileSystem fs = new FileSystem(files); in printWithEnumOutput() local
107 gen.print(fs); in printWithEnumOutput()
145 FileSystem fs = new FileSystem(files); in generateParsersForSpecifiedRoot() local
146 gen.print(fs); in generateParsersForSpecifiedRoot()
/system/unwinding/libunwindstack/utils/
DOfflineUnwindUtils.cpp63 namespace fs = std::filesystem; in DecompressFiles()
64 for (const auto& file : fs::recursive_directory_iterator(directory)) { in DecompressFiles()
65 fs::path src_path = file.path(); in DecompressFiles()
67 fs::path dst_path = fs::path(src_path).replace_extension(); // Remove .gz extension. in DecompressFiles()
68 if (!fs::exists(dst_path) || fs::last_write_time(src_path) > fs::last_write_time(dst_path)) { in DecompressFiles()
71 fs::path tmp_path = fs::path(src_path).replace_extension("." + std::to_string(getpid())); in DecompressFiles()
80 fs::rename(tmp_path, dst_path); in DecompressFiles()
87 namespace fs = std::filesystem; in CreateLinks()
88 for (const auto& file : fs::recursive_directory_iterator(directory)) { in CreateLinks()
89 fs::path src_path = file.path(); in CreateLinks()
[all …]
/system/extras/profcollectd/libprofcollectd/
Dreport.rs21 use std::fs::{self, File, Permissions};
23 use std::os::unix::fs::PermissionsExt;
50 fs::remove_file(&report).ok(); in pack_report()
52 let report_file = fs::OpenOptions::new().create_new(true).write(true).open(&report)?; in pack_report()
56 fs::set_permissions(&report, Permissions::from_mode(0o644))?; in pack_report()
61 fs::read_dir(profile)? in pack_report()
/system/core/fs_mgr/tests/
Dvts_fs_test.cpp53 TEST(fs, ErofsSupported) { in TEST() argument
70 std::string fs; in TEST() local
71 ASSERT_TRUE(android::base::ReadFileToString("/proc/filesystems", &fs)); in TEST()
72 EXPECT_THAT(fs, ::testing::HasSubstr("\terofs\n")); in TEST()
78 TEST(fs, PartitionTypes) { in TEST() argument
145 TEST(fs, NoDtFstab) { in TEST() argument
154 TEST(fs, NoLegacyVerifiedBoot) { in TEST() argument
/system/gsid/tests/
Dboot_tests.cpp121 struct statfs64 fs; in TEST() local
122 ASSERT_GE(statfs64(path.c_str(), &fs), 0) << path; in TEST()
123 ASSERT_TRUE(fs.f_type == F2FS_SUPER_MAGIC || fs.f_type == EXT4_SUPER_MAGIC) in TEST()
124 << "Unexpected filesystem type: " << fs.f_type; in TEST()
/system/update_engine/lz4diff/
Dlz4diff_compress_unittest.cc81 auto fs = ErofsFilesystem::CreateFromFile(build_path); in TEST_F() local
82 ASSERT_NE(fs, nullptr); in TEST_F()
83 ASSERT_EQ(kBlockSize, fs->GetBlockSize()); in TEST_F()
86 ASSERT_TRUE(fs->GetFiles(&files)); in TEST_F()
/system/memory/libmeminfo/libdmabufinfo/
Ddmabufinfo_test.cpp44 namespace fs = std::filesystem;
198 fs::current_path(fs::temp_directory_path()); in SetUp()
199 buffer_stats_path = fs::current_path() / "buffers"; in SetUp()
200 ASSERT_TRUE(fs::create_directory(buffer_stats_path)); in SetUp()
202 virtual void TearDown() { fs::remove_all(buffer_stats_path); } in TearDown()
212 ASSERT_TRUE(fs::create_directories(buffer_path)); in TEST_F()
255 fs::current_path(fs::temp_directory_path()); in SetUp()
256 dmabuf_sysfs_path = fs::current_path() / "buffers"; in SetUp()
257 procfs_path = fs::current_path() / "proc"; in SetUp()
258 ASSERT_TRUE(fs::create_directory(dmabuf_sysfs_path)); in SetUp()
[all …]
/system/security/keystore2/src/
Did_rotation.rs26 use std::fs;
57 match fs::metadata(&self.timestamp_path) { in had_factory_reset_since_id_rotation()
82 fs::File::create(&self.timestamp_path) in had_factory_reset_since_id_rotation()
127 let metadata = fs::metadata(&timestamp_file_path).unwrap(); in test_timestamp_creation()
140 fs::File::create(&timestamp_file_path).unwrap(); in test_existing_timestamp()
/system/security/prng_seeder/src/
Dconditioner.rs15 use std::{fs::File, io::Read};
41 hwrng: tokio::fs::File::from_std(self.hwrng), in build()
49 hwrng: tokio::fs::File,

123456