about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-11-08 01:07:24 +0000
committerEric Wong <normalperson@yhbt.net>2011-11-08 01:07:24 +0000
commit088d88332564a5d09cf8a57695a53453ab59f686 (patch)
tree0d5c8edcaf2e2ca064311c8494e6d0153331cef0
parente814b15f1386e2ea53bc018aaa92aecb147400ae (diff)
downloadmogilefs-client-088d88332564a5d09cf8a57695a53453ab59f686.tar.gz
It's conceivable we'd need it.
-rw-r--r--test/test_mogilefs_integration_large_pipe.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_mogilefs_integration_large_pipe.rb b/test/test_mogilefs_integration_large_pipe.rb
index 0ddffb2..afc62e5 100644
--- a/test/test_mogilefs_integration_large_pipe.rb
+++ b/test/test_mogilefs_integration_large_pipe.rb
@@ -33,6 +33,21 @@ class TestMogileFSLargePipe< TestMogIntegration
     b = b.value
     assert_equal a, b
     assert_equal sha1, a
+
+    # We should be able to open FIFOs
+    tmp = tmpfile("fifo")
+    tmp_path = tmp.path
+    File.unlink(tmp_path)
+    x!("mkfifo", tmp_path)
+    th = Thread.new do
+      File.open(tmp_path, "wb") do |w|
+        nr.times { w.write(junk) }
+      end
+    end
+    assert_equal(nr * junk.size, @client.store_file("fifo", nil, tmp_path))
+    th.join
+    fifo_sha1 = @client.get_file_data("fifo") { |rd| sha1read(rd) }
+    assert_equal sha1, fifo_sha1
   end
 
   def sha1read(rd)