]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw_file_nfsns: create readf_out_name, if needed
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 27 Jan 2016 21:20:53 +0000 (16:20 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:08:17 +0000 (12:08 -0500)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/test/librgw_file_nfsns.cc

index ff42aa269f72145f461b2361ddc8b297fb1a60b6..c00ad86a40cb95b50e3e481beb3c7dba82a40918 100644 (file)
@@ -543,6 +543,26 @@ TEST(LibRGW, READ_DIRS1)
   }
 }
 
+TEST(LibRGW, READF_SETUP1)
+{
+  struct stat st;
+  if (do_dirs1) {
+    if (do_create) {
+      if ((! stat(readf_out_name.c_str(), &st)) &&
+         (S_ISREG(st.st_mode)) &&
+         (st.st_size == 6291456))
+       return;
+      ofstream of;
+      of.open(readf_out_name, ios::out|ios::app|ios::binary);
+      for (int ix1 = 0; ix1 < 6; ++ix1) {
+       for (int ix2 = 0; ix2 < 1024*1024; ++ix2) {
+         of << ix1;
+       }
+      }
+    }
+  }
+}
+
 TEST(LibRGW, READF_DIRS1) {
   if (do_dirs1) {
     if (do_readf) {