Searched refs:snapshot_fd (Results 1 – 2 of 2) sorted by relevance
/system/core/fs_mgr/libdm/ |
D | dm_test.cpp | 378 unique_fd snapshot_fd(open(harness.snapshot_dev().c_str(), O_RDWR | O_CLOEXEC | O_SYNC)); in TEST_F() local 379 ASSERT_GE(snapshot_fd, 0); in TEST_F() 383 ASSERT_TRUE(android::base::WriteFully(snapshot_fd, data.data(), data.size())); in TEST_F() 384 ASSERT_EQ(lseek(snapshot_fd, 0, SEEK_SET), 0); in TEST_F() 388 ASSERT_TRUE(android::base::ReadFully(snapshot_fd, read.data(), read.size())); in TEST_F() 394 ASSERT_EQ(lseek(snapshot_fd, 0, SEEK_SET), 0); in TEST_F() 420 unique_fd snapshot_fd(open(harness.snapshot_dev().c_str(), O_RDWR | O_CLOEXEC)); in TEST_F() local 421 ASSERT_GE(snapshot_fd, 0); in TEST_F() 428 if (!android::base::WriteFully(snapshot_fd, data.data(), data.size())) { in TEST_F() 438 ASSERT_EQ(fsync(snapshot_fd), -1); in TEST_F()
|
/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/ |
D | snapuserd_test.cpp | 453 unique_fd snapshot_fd(open(dmuser_dev_->GetPath().c_str(), O_RDONLY | O_DIRECT | O_SYNC)); in ReadSnapshotAndValidateOverlappingBlocks() local 454 ASSERT_GE(snapshot_fd, 0); in ReadSnapshotAndValidateOverlappingBlocks() 467 ASSERT_EQ(ReadFullyAtOffset(snapshot_fd, snapshot_buffer.get(), size_, 0), true); in ReadSnapshotAndValidateOverlappingBlocks()
|