|
| cpWrite () |
|
void | execute (const std::vector< std::string > &remainingOptions) override |
|
| baseTest (const std::string &aName, const std::string &aDescription, const decltype(parameters)&aParameters, const decltype(options)&aOptions={}) |
|
void | ensuredWrite (int fd, const std::string &data) |
|
void | ensuredRead (int fd, std::string &data) |
|
void | Execute (const std::vector< std::string > &remainingOptions) |
|
Definition at line 406 of file fileOpsTests.cpp.
◆ cpWrite()
Definition at line 408 of file fileOpsTests.cpp.
409 "create a file and write into it like cp does", {
410 {
"file",
"path to file"
413 {{
time,
"wait this long between writes"}}) {};
◆ execute()
void cpWrite::execute |
( |
const std::vector< std::string > & |
remainingOptions | ) |
|
|
inlineoverridevirtual |
Implements baseTest.
Definition at line 414 of file fileOpsTests.cpp.
415 auto file = remainingOptions.at(0);
416 auto fd =
throwcall::badval(open(file.c_str(), O_CREAT | O_WRONLY | O_EXCL, 0700), -1,
"open ", file);
417 for (
unsigned i = 0; i <
blocks; i++) {
419 std::this_thread::sleep_for(
time);
References throwcall::badval(), baseTest::blocks, baseTest::content, baseTest::createdFiles, baseTest::ensuredWrite(), throwcall::good0(), and baseTest::time.
The documentation for this class was generated from the following file:
T badval(T call, t badvalue, const Args &... args)
template function to wrap system calls that return a special bad value on failure