[前][次][番号順一覧][スレッド一覧]

ruby-changes:38133

From: akr <ko1@a...>
Date: Fri, 10 Apr 2015 20:52:50 +0900 (JST)
Subject: [ruby-changes:38133] akr:r50214 (trunk): Use shorter filenames to avoid sockaddr_un size limitation.

akr	2015-04-10 20:52:29 +0900 (Fri, 10 Apr 2015)

  New Revision: 50214

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50214

  Log:
    Use shorter filenames to avoid sockaddr_un size limitation.

  Modified files:
    trunk/test/ruby/test_file_exhaustive.rb
Index: test/ruby/test_file_exhaustive.rb
===================================================================
--- test/ruby/test_file_exhaustive.rb	(revision 50213)
+++ test/ruby/test_file_exhaustive.rb	(revision 50214)
@@ -54,7 +54,7 @@ class TestFileExhaustive < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L54
   end
 
   def make_tmp_filename(prefix)
-    "#{@dir}/#{prefix}#{File.basename(__FILE__)}.#{$$}.test"
+    "#{@dir}/#{prefix}.#{$$}.test"
   end
 
   def test_path
@@ -173,7 +173,7 @@ class TestFileExhaustive < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L173
     assert_file.not_socket?(@file)
     assert_file.not_socket?(@nofile)
     if defined? UNIXServer
-      socket = make_tmp_filename("socket")
+      socket = make_tmp_filename("s")
       UNIXServer.open(socket) {|sock|
         assert_file.socket?(socket)
       }
@@ -1003,7 +1003,7 @@ class TestFileExhaustive < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L1003
       make_fifo fifo
     end
     if defined? UNIXServer
-      socket = make_tmp_filename("socket")
+      socket = make_tmp_filename("s")
       UNIXServer.open(socket).close
     end
     [@dir, @file, @zerofile, @symlinkfile, @hardlinkfile, fifo, socket].compact.each do |f|
@@ -1129,7 +1129,7 @@ class TestFileExhaustive < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L1129
     assert(!(File::Stat.new(@dir).socket?))
     assert(!(File::Stat.new(@file).socket?))
     if defined? UNIXServer
-      socket = make_tmp_filename("socket")
+      socket = make_tmp_filename("s")
       UNIXServer.open(socket) {|sock|
         assert(File::Stat.new(socket).socket?)
       }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]