From eb807d42eca121df22f72b95465bba52a4e7fefa Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 7 Mar 2011 08:39:39 +0000 Subject: * gc.c (rb_gc_set_params): allow GC parameter configuration by environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'test/ruby/test_io.rb') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 6b8e6b58ce..6cc2897f5f 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1776,37 +1776,4 @@ End end end end - - def test_fcntl_lock - return if /x86_64-linux/ !~ RUBY_PLATFORM # A binary form of struct flock depend on platform - - pad=0 - Tempfile.open(self.class.name) do |f| - r, w = IO.pipe - pid = fork do - r.close - lock = [Fcntl::F_WRLCK, IO::SEEK_SET, pad, 12, 34, 0].pack("s!s!i!L!L!i!") - f.fcntl Fcntl::F_SETLKW, lock - w.syswrite "." - sleep - end - w.close - assert_equal ".", r.read(1) - r.close - pad = 0 - getlock = [Fcntl::F_WRLCK, 0, pad, 0, 0, 0].pack("s!s!i!L!L!i!") - f.fcntl Fcntl::F_GETLK, getlock - - ptype, whence, pad, start, len, lockpid = getlock.unpack("s!s!i!L!L!i!") - - assert_equal(ptype, Fcntl::F_WRLCK) - assert_equal(whence, IO::SEEK_SET) - assert_equal(start, 12) - assert_equal(len, 34) - assert_equal(pid, lockpid) - - Process.kill :TERM, pid - Process.waitpid2(pid) - end - end end -- cgit v1.2.3