cmogstored dev/user discussion/issues/patches/etc
 help / color / mirror / code / Atom feed
* [PATCH] test/pwrite_wrap: reduce space overhead required
@ 2016-05-29 11:21 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-05-29 11:21 UTC (permalink / raw)
  To: cmogstored-public

It's probably overkill to use 100G of space, even
if its sparse.
---
 test/pwrite_wrap.rb | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/test/pwrite_wrap.rb b/test/pwrite_wrap.rb
index e7356c6..744f2be 100644
--- a/test/pwrite_wrap.rb
+++ b/test/pwrite_wrap.rb
@@ -72,19 +72,20 @@ class TestPwriteWrap < Test::Unit::TestCase
   end
 
   def __test_pwrite_slow(chunked)
-    Process.kill(:VTALRM, @pid)
-    t_yield
-    Process.kill(:TTIN, @pid)
-    wait_for(5, "enable slow knob") do
-      File.readlines(@err.path).grep(/knob set: slow/)[0] &&
-                       File.readlines(@err.path).grep(/flag set: slow/)[0]
+    Process.kill(:VTALRM, @pid) # move knob to PWRITE_WRAP_SLOW
+    wait_for(5, 'move to slow knob', 0.01) do
+      File.readlines(@err.path).grep(/knob set: slow/)[0]
+    end
+    Process.kill(:TTIN, @pid) # turn on the switch for where the knob is
+    wait_for(5, 'enable slow knob', 0.01) do
+      File.readlines(@err.path).grep(/flag set: slow/)[0]
     end
 
     client_2 = get_client
 
     thr = Thread.new do
       begin
-        size = 1024 * 1024 * 1024 * 10
+        size = 100 * 1024 * 1024
         if chunked
           @client.write("PUT /dev666/foo.fid HTTP/1.1\r\n" \
                         "Host: example.com\r\n" \

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-29 11:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-29 11:21 [PATCH] test/pwrite_wrap: reduce space overhead required Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/cmogstored.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).