From 77a403971da8d6d210f7b3cf10d44056c08f4485 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Wed, 27 Jan 2016 16:20:53 -0500 Subject: [PATCH] librgw_file_nfsns: create readf_out_name, if needed Signed-off-by: Matt Benjamin --- src/test/librgw_file_nfsns.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/test/librgw_file_nfsns.cc b/src/test/librgw_file_nfsns.cc index ff42aa269f721..c00ad86a40cb9 100644 --- a/src/test/librgw_file_nfsns.cc +++ b/src/test/librgw_file_nfsns.cc @@ -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) { -- 2.39.5