|
| sparseWrite2 () |
|
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 511 of file fileOpsTests.cpp.
◆ sparseWrite2()
sparseWrite2::sparseWrite2 |
( |
| ) |
|
|
inline |
Definition at line 513 of file fileOpsTests.cpp.
514 "create a sparse file, hole (data hole){blocks}", {
515 {
"file",
"path to file"
◆ execute()
void sparseWrite2::execute |
( |
const std::vector< std::string > & |
remainingOptions | ) |
|
|
inlineoverridevirtual |
Implements baseTest.
Definition at line 518 of file fileOpsTests.cpp.
519 auto file = remainingOptions.at(0);
520 auto fd =
throwcall::badval(open(file.c_str(), O_CREAT | O_WRONLY, 0744), -1,
"open ", file);
522 "lseek in ", file,
" for ",
content.size(),
" bytes");
523 for (
unsigned i = 0; i <
blocks; i++) {
527 "lseek in ", file,
" for ",
content.size(),
" bytes");
References throwcall::badval(), baseTest::blocks, baseTest::content, baseTest::createdFiles, baseTest::ensuredWrite(), and throwcall::good0().
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