|
| sparseWrite () |
|
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 489 of file fileOpsTests.cpp.
◆ sparseWrite()
sparseWrite::sparseWrite |
( |
| ) |
|
|
inline |
Definition at line 491 of file fileOpsTests.cpp.
492 "create a sparse file, data (hole data){blocks}", {
493 {
"file",
"path to file"
◆ execute()
void sparseWrite::execute |
( |
const std::vector< std::string > & |
remainingOptions | ) |
|
|
inlineoverridevirtual |
Implements baseTest.
Definition at line 496 of file fileOpsTests.cpp.
497 auto file = remainingOptions.at(0);
498 auto fd =
throwcall::badval(open(file.c_str(), O_CREAT | O_WRONLY, 0744), -1,
"open ", file);
500 for (
unsigned i = 0; i <
blocks; i++) {
502 "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