Home
last modified time | relevance | path

Searched full:fs (Results 1 – 25 of 579) sorted by relevance

12345678910>>...24

/system/core/libprocessgroup/util/tests/
Dutil.cpp50 EXPECT_EQ(GetCgroupDepth("///sys/fs/cgroup", "/sys/fs/cgroup/a/b/c"), 3); in TEST()
51 EXPECT_EQ(GetCgroupDepth("/sys///fs/cgroup", "/sys/fs/cgroup/a/b/c"), 3); in TEST()
52 EXPECT_EQ(GetCgroupDepth("/sys/fs///cgroup", "/sys/fs/cgroup/a/b/c"), 3); in TEST()
54 EXPECT_EQ(GetCgroupDepth("/sys/fs/cgroup", "///sys/fs/cgroup/a/b/c"), 3); in TEST()
55 EXPECT_EQ(GetCgroupDepth("/sys/fs/cgroup", "/sys///fs/cgroup/a/b/c"), 3); in TEST()
56 EXPECT_EQ(GetCgroupDepth("/sys/fs/cgroup", "/sys/fs///cgroup/a/b/c"), 3); in TEST()
57 EXPECT_EQ(GetCgroupDepth("/sys/fs/cgroup", "/sys/fs/cgroup///a/b/c"), 3); in TEST()
58 EXPECT_EQ(GetCgroupDepth("/sys/fs/cgroup", "/sys/fs/cgroup/a///b/c"), 3); in TEST()
59 EXPECT_EQ(GetCgroupDepth("/sys/fs/cgroup", "/sys/fs/cgroup/a/b///c"), 3); in TEST()
63 EXPECT_EQ(GetCgroupDepth("/sys/fs/cgroup/", "/sys/fs/cgroup/a/b"), 2); in TEST()
[all …]
/system/apex/tools/apex-ls/
Dext4.cpp36 namespace fs = std::filesystem;
41 Result<ext2_ino_t> PathToIno(ext2_filsys fs, const fs::path& path) { in PathToIno() argument
43 auto err = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, in PathToIno()
52 Result<std::string> GetXattr(ext2_filsys fs, ext2_ino_t ino, in GetXattr() argument
56 auto err = ext2fs_xattrs_open(fs, ino, &h); in GetXattr()
81 fs::path dir;
105 Result<std::vector<std::string>> ReadDir(ext2_filsys fs, const fs::path& path) { in ReadDir() argument
106 ext2_ino_t ino = OR_RETURN(PathToIno(fs, path)); in ReadDir()
109 auto err = ext2fs_dir_iterate2(fs, ino, /*flag*/ 0, in ReadDir()
119 Result<Entry> ReadEntry(ext2_filsys fs, const fs::path& path) { in ReadEntry() argument
[all …]
/system/update_engine/payload_generator/
Dsquashfs_filesystem_unittest.cc74 void CheckSquashfs(const unique_ptr<SquashfsFilesystem>& fs) { in CheckSquashfs() argument
75 ASSERT_TRUE(fs); in CheckSquashfs()
76 EXPECT_EQ(kTestBlockSize, fs->GetBlockSize()); in CheckSquashfs()
79 ASSERT_TRUE(fs->GetFiles(&files)); in CheckSquashfs()
86 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in CheckSquashfs()
113 unique_ptr<SquashfsFilesystem> fs = SquashfsFilesystem::CreateFromFile( in TEST_F() local
115 CheckSquashfs(fs); in TEST_F()
118 EXPECT_EQ(4096 / kTestBlockSize, fs->GetBlockCount()); in TEST_F()
121 ASSERT_TRUE(fs->GetFiles(&files)); in TEST_F()
134 unique_ptr<SquashfsFilesystem> fs = SquashfsFilesystem::CreateFromFile( in TEST_F() local
[all …]
Dmapfile_filesystem_unittest.cc62 unique_ptr<MapfileFilesystem> fs = MapfileFilesystem::CreateFromFile( in TEST_F() local
64 ASSERT_NE(nullptr, fs.get()); in TEST_F()
66 EXPECT_EQ(0U, fs->GetBlockCount()); in TEST_F()
68 EXPECT_EQ(4096U, fs->GetBlockSize()); in TEST_F()
81 unique_ptr<MapfileFilesystem> fs = MapfileFilesystem::CreateFromFile( in TEST_F() local
83 ASSERT_NE(nullptr, fs.get()); in TEST_F()
86 EXPECT_TRUE(fs->GetFiles(&files)); in TEST_F()
93 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F()
113 unique_ptr<MapfileFilesystem> fs = MapfileFilesystem::CreateFromFile( in TEST_F() local
115 ASSERT_NE(nullptr, fs.get()); in TEST_F()
[all …]
Derofs_filesystem_unittest.cc52 unique_ptr<ErofsFilesystem> fs = in TEST_F() local
54 ASSERT_EQ(nullptr, fs.get()); in TEST_F()
56 fs = ErofsFilesystem::CreateFromFile("/path/to/invalid/file"); in TEST_F()
57 ASSERT_EQ(nullptr, fs.get()); in TEST_F()
61 unique_ptr<ErofsFilesystem> fs = ErofsFilesystem::CreateFromFile( in TEST_F() local
64 ASSERT_NE(nullptr, fs); in TEST_F()
65 ASSERT_EQ(kBlockSize, fs->GetBlockSize()); in TEST_F()
68 ASSERT_TRUE(fs->GetFiles(&files)); in TEST_F()
77 auto fs = ErofsFilesystem::CreateFromFile(build_path); in TEST_F() local
78 ASSERT_NE(fs, nullptr); in TEST_F()
[all …]
Dext2_filesystem_unittest.cc66 unique_ptr<Ext2Filesystem> fs = in TEST_F() local
68 ASSERT_EQ(nullptr, fs.get()); in TEST_F()
70 fs = Ext2Filesystem::CreateFromFile("/path/to/invalid/file"); in TEST_F()
71 ASSERT_EQ(nullptr, fs.get()); in TEST_F()
75 unique_ptr<Ext2Filesystem> fs = Ext2Filesystem::CreateFromFile( in TEST_F() local
78 ASSERT_NE(nullptr, fs.get()); in TEST_F()
79 EXPECT_EQ(kDefaultFilesystemBlockCount, fs->GetBlockCount()); in TEST_F()
80 EXPECT_EQ(kDefaultFilesystemBlockSize, fs->GetBlockSize()); in TEST_F()
83 EXPECT_TRUE(fs->GetFiles(&files)); in TEST_F()
90 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/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/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/memory/libmeminfo/libmemevents/include/memevents/
Dbpf_types.h40 #define MEM_EVENTS_AMS_RB "/sys/fs/bpf/memevents/map_bpfMemEvents_ams_rb"
41 #define MEM_EVENTS_LMKD_RB "/sys/fs/bpf/memevents/map_bpfMemEvents_lmkd_rb"
42 #define MEM_EVENTS_TEST_RB "/sys/fs/bpf/memevents/map_bpfMemEventsTest_rb"
46 "/sys/fs/bpf/memevents/prog_bpfMemEvents_tracepoint_oom_mark_victim_ams"
48 "/sys/fs/bpf/memevents/" \
51 "/sys/fs/bpf/memevents/prog_bpfMemEvents_tracepoint_vmscan_mm_vmscan_direct_reclaim_end_lmkd"
53 "/sys/fs/bpf/memevents/prog_bpfMemEvents_tracepoint_vmscan_mm_vmscan_kswapd_wake_lmkd"
55 "/sys/fs/bpf/memevents/prog_bpfMemEvents_tracepoint_vmscan_mm_vmscan_kswapd_sleep_lmkd"
57 "/sys/fs/bpf/memevents/" \
60 "/sys/fs/bpf/memevents/prog_bpfMemEvents_tracepoint_kmem_mm_calculate_totalreserve_pages_lmkd"
[all …]
Dmemevents_test.h25 #define MEM_EVENTS_TEST_OOM_KILL_TP "/sys/fs/bpf/memevents/prog_bpfMemEventsTest_skfilter_oom_kill"
27 "/sys/fs/bpf/memevents/prog_bpfMemEventsTest_skfilter_direct_reclaim_begin"
29 "/sys/fs/bpf/memevents/prog_bpfMemEventsTest_skfilter_direct_reclaim_end"
31 "/sys/fs/bpf/memevents/prog_bpfMemEventsTest_skfilter_kswapd_wake"
33 "/sys/fs/bpf/memevents/prog_bpfMemEventsTest_skfilter_kswapd_sleep"
35 "/sys/fs/bpf/memevents/prog_bpfMemEventsTest_skfilter_android_trigger_vendor_lmk_kill"
37 "/sys/fs/bpf/memevents/prog_bpfMemEventsTest_skfilter_calculate_totalreserve_pages"
/system/memory/mmd/src/
Dzram.rs96 std::fs::read_to_string(ZRAM_DISKSIZE_PATH) in read_disksize()
100 std::fs::write(ZRAM_DISKSIZE_PATH, contents) in write_disksize()
104 std::fs::read_to_string(ZRAM_MM_STAT_PATH) in read_mm_stat()
108 std::fs::write(ZRAM_IDLE_PATH, contents) in set_idle()
112 std::fs::read_to_string(ZRAM_BACKING_DEV_PATH) in read_backing_dev()
116 std::fs::write(ZRAM_BACKING_DEV_PATH, contents) in write_backing_dev()
120 std::fs::write(ZRAM_WRITEBACK_PATH, contents) in writeback()
124 std::fs::write(ZRAM_WRITEBACK_LIMIT_PATH, contents) in write_writeback_limit()
128 std::fs::write(ZRAM_WRITEBACK_LIMIT_ENABLE_PATH, contents) in write_writeback_limit_enable()
132 std::fs::read_to_string(ZRAM_WRITEBACK_LIMIT_PATH) in read_writeback_limit()
[all …]
Dblock_dev.rs17 use std::fs;
18 use std::os::unix::fs::MetadataExt;
47 fs::write(format!("/sys/block/{device_name}/queue/scheduler"), "none") in clear_block_device_scheduler()
68 fs::read_to_string(format!("{sysfs_path}/class/block/{file_backing_device}/mq/0/nr_tags"))?; in configure_block_device_queue_depth_with_sysfs()
71 fs::write( in configure_block_device_queue_depth_with_sysfs()
97 fs::metadata(file_path).map_err(BlockDeviceError::InputFileMetadata)?.dev() as libc::dev_t; in get_block_device_name()
101 let device_path = std::fs::canonicalize(format!("{sysfs_path}/dev/block/{major}:{minor}"))?; in get_block_device_name()
131 for entry in fs::read_dir(format!("{sysfs_path}/block/{device_name}/slaves"))? { in get_parent_block_device()
149 for entry in fs::read_dir(format!("{sysfs_path}/class/block"))? { in partition_parent()
157 if fs::exists(format!("{sysfs_path}/class/block/{name}/{device_name}"))? { in partition_parent()
[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_file_repository_test.cpp48 namespace fs = std::filesystem;
64 fs::copy(GetTestFile(name), built_in_dir); in PrepareCompressedApex()
81 fs::copy(GetTestFile("apex.apexd_test.apex"), built_in_dir.path); in TEST()
82 fs::copy(GetTestFile("apex.apexd_test_different_app.apex"), in TEST()
86 fs::copy(GetTestFile("apex.apexd_test.apex"), data_dir.path); in TEST()
87 fs::copy(GetTestFile("apex.apexd_test_different_app.apex"), data_dir.path); in TEST()
136 fs::copy(GetTestFile("apex.apexd_test.apex"), built_in_dir.path); in TEST()
137 fs::copy(GetTestFile("apex.apexd_test_different_app.apex"), in TEST()
159 fs::copy(GetTestFile("apex.apexd_test.apex"), td.path); in TEST()
160 fs::copy(GetTestFile("apex.apexd_test_corrupt_superblock_apex.apex"), in TEST()
[all …]
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()
127 // Unfortunately fs::recursive_directory_iterator::operator++ can throw an 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()
[all …]
Dapexd_brand_new_verifier_test.cpp36 namespace fs = std::filesystem;
47 fs::copy(GetTestFile("apexd_testdata/com.android.apex.brand.new.avbpubkey"), in TEST()
67 fs::copy(GetTestFile("apexd_testdata/com.android.apex.brand.new.avbpubkey"), in TEST()
69 fs::copy(GetTestFile("apexd_testdata/blocklist.json"), config_dir.path); in TEST()
87 fs::copy(GetTestFile("apexd_testdata/com.android.apex.brand.new.avbpubkey"), in TEST()
89 fs::copy(GetTestFile("com.android.apex.brand.new.apex"), data_dir.path); in TEST()
107 fs::copy(GetTestFile("apex.apexd_test.apex"), built_in_dir.path); in TEST()
137 fs::copy(GetTestFile("apexd_testdata/com.android.apex.brand.new.avbpubkey"), in TEST()
173 fs::copy(GetTestFile("apexd_testdata/com.android.apex.brand.new.avbpubkey"), in TEST()
175 fs::copy(GetTestFile("apexd_testdata/blocklist.json"), config_dir.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 …]
/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()
Dpstore_test.cpp22 EXPECT_EQ(0, access("/sys/fs/pstore", F_OK)); in TEST()
26 EXPECT_TRUE(!access("/sys/fs/pstore/console-ramoops-0", F_OK) ^ in TEST()
27 !access("/sys/fs/pstore/console-ramoops", F_OK)); in TEST()
32 EXPECT_EQ(0, access("/sys/fs/pstore/pmsg-ramoops-0", F_OK)); in TEST()
/system/incremental_delivery/incfs/tests/
DMountRegistry_test.cpp114 …/MT_data_app_vmdl703/mount rw,nosuid,nodev,noatime shared:46 - incremental-fs /data/incremental/MT… in TEST_F()
115 …/MT_data_app_vmdl703/mount rw,nosuid,nodev,noatime shared:46 - incremental-fs /data/incremental/MT… in TEST_F()
135 …/MT_data_app_vmdl703/mount rw,nosuid,nodev,noatime shared:46 - incremental-fs /data/incremental/MT… in TEST_F()
136 …/MT_data_app_vmdl703/mount rw,nosuid,nodev,noatime shared:46 - incremental-fs /data/incremental/MT… in TEST_F()
152 …R"(9465 93 0:281 // /data/incremental1 shared:56 - incremental-fs /data/incremental2 rw,seclabel,r… in TEST_F()
153 …ata/app/vmdl1998506227.tmp rw,nosuid,nodev,noatime shared:56 - incremental-fs /data/incremental/MT… in TEST_F()
154 …ata/app/vmdl2034419270.tmp rw,nosuid,nodev,noatime shared:57 - incremental-fs /data/incremental/MT… in TEST_F()
155 …/MT_data_app_vmdl154/mount rw,nosuid,nodev,noatime shared:58 - incremental-fs /data/incremental/MT… in TEST_F()
156 …ata/app/vmdl1545425783.tmp rw,nosuid,nodev,noatime shared:58 - incremental-fs /data/incremental/MT… in TEST_F()
157 …/MT_data_app_vmdl209/mount rw,nosuid,nodev,noatime shared:59 - incremental-fs /data/incremental/MT… in TEST_F()
[all …]
/system/security/keystore2/src/legacy_blob/
Dtests.rs159 std::fs::create_dir(&*temp_dir.build().push("user_0")).expect("Failed to create user_0."); in test_is_empty()
163 std::fs::create_dir(&*temp_dir.build().push("user_10")).expect("Failed to create user_10."); in test_is_empty()
167 std::fs::remove_dir_all(&*temp_dir.build().push("user_0")).expect("Failed to remove user_0."); in test_is_empty()
171 std::fs::remove_dir_all(&*temp_dir.build().push("user_10")).expect("Failed to remove user_10."); in test_is_empty()
179 std::fs::create_dir(&*temp_dir.build().push("user_0")).unwrap(); in test_legacy_blobs()
181 std::fs::write(&*temp_dir.build().push("user_0").push(".masterkey"), SUPERKEY).unwrap(); in test_legacy_blobs()
183 std::fs::write( in test_legacy_blobs()
188 std::fs::write( in test_legacy_blobs()
193 std::fs::write( in test_legacy_blobs()
198 std::fs::write( in test_legacy_blobs()
[all …]
/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/core/fs_mgr/tests/
Dfs_mgr_test.cpp17 #include <linux/fs.h>
354 std::string fstab_contents = R"fs( in TEST()
370 )fs"; in TEST()
440 std::string fstab_contents = R"fs( in TEST()
445 source none4 swap defaults checkpoint=fs in TEST()
447 )fs"; in TEST()
515 std::string fstab_contents = R"fs( in TEST()
520 )fs"; in TEST()
575 std::string fstab_contents = R"fs( in TEST()
577 )fs"; in TEST()
[all …]
/system/extras/boottime_tools/bootanalyze/
Dconfig.yaml23 fs: processing action \(fs\)
24 post-fs: processing action \(post-fs\)
25 late-fs: processing action \(late-fs\)
26 post-fs-data: processing action \(post-fs-data\)

12345678910>>...24