| 
|   | mmapWrite () | 
|   | 
| 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 462 of file fileOpsTests.cpp.
 
◆ mmapWrite()
Definition at line 464 of file fileOpsTests.cpp.
  465                               "create a file, mmap() it and write into it", {
 
  466         {
"file", 
"path to file" 
 
 
 
◆ execute()
  
  
      
        
          | void mmapWrite::execute  | 
          ( | 
          const std::vector< std::string > &  | 
          remainingOptions | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Implements baseTest.
Definition at line 469 of file fileOpsTests.cpp.
  470         auto file = remainingOptions.at(0);
 
  471         auto fd = 
throwcall::badval(open(file.c_str(), O_CREAT | O_RDWR, 0744), -1, 
"open ", file);
 
  473         throwcall::good0(ftruncate(fd, mapSize), 
"truncate to ", mapSize, 
" bytes");
 
  475                                           PROT_WRITE, MAP_SHARED,
 
  478                                      "mmap ", 
content.size(), 
" bytes from ", file);
 
  479         for (
unsigned i = 0; i < 
blocks; i++) {
 
 
References throwcall::badval(), baseTest::blocks, baseTest::content, baseTest::createdFiles, 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