• Home
  • Raw
  • Download

Lines Matching refs:std

68 template <void (*Prepare)(std::string)>
79 loop_device_ = std::string("/dev/block/loop") + std::to_string(i); in SetUp()
96 const static std::string loop_file_;
101 std::string loop_device_;
104 template <void (*Prepare)(std::string)>
105 const std::string LoopbackTestFixture<Prepare>::loop_file_ =
108 void PrepareBowDefault(std::string) {} in PrepareBowDefault()
110 template <void (*PrepareLoop)(std::string),
111 void (*PrepareBow)(std::string) = PrepareBowDefault>
113 std::string GetTableStatus() { in GetTableStatus()
114 std::vector<DeviceMapper::TargetInfo> targets; in GetTableStatus()
133 table.AddTarget(std::make_unique<DmTargetBow>(0, loop_size_ / 512, in SetUp()
161 std::string state_file = "/sys" + bow_device_.substr(4) + "/bow/state"; in SetState()
162 std::ofstream(state_file) << i; in SetState()
165 std::ifstream(state_file) >> j; in SetState()
189 std::vector<TableEntry> GetTable() { in GetTable()
190 std::string status = GetTableStatus(); in GetTable()
191 std::istringstream i(status); in GetTable()
192 std::vector<TableEntry> table; in GetTable()
195 std::string s; in GetTable()
226 std::string bow_device_;
229 void PrepareFile(std::string loop_file) { in PrepareFile()
275 void FindChanged(std::vector<TableEntry> const& free, int expected_changed) { in FindChanged()
303 std::string expected = "Sector " + std::to_string(i); in FindChanged()
315 std::cout << std::hex << std::setw(2) << std::setfill('0') in DumpSector0()
318 std::cout << std::endl; in DumpSector0()
320 std::cout << " "; in DumpSector0()
345 system(std::string("vdc checkpoint restoreCheckpoint " + loop_device_) in WriteRestore()
358 std::vector<TableEntry> table = { in TEST_F()
431 void PrepareFileSystem(std::string loop_file) { in PrepareFileSystem()
433 system((std::string("dd if=/dev/zero bs=512 count=4096 of=") + loop_file) in PrepareFileSystem()
440 void SetupFileSystem(std::string loop_device) { in SetupFileSystem()
441 EXPECT_EQ(system((std::string("mke2fs ") + loop_device).c_str()), 0); in SetupFileSystem()
444 system((std::string("mount ") + loop_device + " " MOUNT_POINT).c_str()), in SetupFileSystem()
466 system((std::string("mount ") + bow_device_ + " " MOUNT_POINT).c_str()), in TEST_F()
475 system((std::string("mount ") + loop_device_ + " " MOUNT_POINT).c_str()), in TEST_F()
477 std::string contents; in TEST_F()
478 std::ifstream(MOUNT_POINT "/file") >> contents; in TEST_F()
479 EXPECT_EQ(contents, std::string("Changed")); in TEST_F()
488 system((std::string("mount ") + bow_device_ + " " MOUNT_POINT).c_str()), in TEST_F()
495 system((std::string("vdc checkpoint restoreCheckpoint ") + loop_device_) in TEST_F()
498 system((std::string("mount ") + loop_device_ + " " MOUNT_POINT).c_str()), in TEST_F()
500 std::string contents; in TEST_F()
501 std::ifstream(MOUNT_POINT "/file") >> contents; in TEST_F()
502 EXPECT_EQ(contents, std::string("Original")); in TEST_F()