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

ruby-changes:33598

From: naruse <ko1@a...>
Date: Wed, 23 Apr 2014 11:42:07 +0900 (JST)
Subject: [ruby-changes:33598] naruse:r45679 (trunk): check whther ext4+ or not

naruse	2014-04-23 11:41:54 +0900 (Wed, 23 Apr 2014)

  New Revision: 45679

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

  Log:
    check whther ext4+ or not

  Modified files:
    trunk/test/ruby/test_io.rb
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 45678)
+++ test/ruby/test_io.rb	(revision 45679)
@@ -1672,7 +1672,10 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L1672
       case f.statfs.type
       when 0x9123683E # BTRFS_SUPER_MAGIC
       when 0x7461636f # OCFS2_SUPER_MAGIC
-      when 0xEF53 # EXT4_SUPER_MAGIC
+      when 0xEF53 # EXT2_SUPER_MAGIC EXT3_SUPER_MAGIC EXT4_SUPER_MAGIC
+        # ext3's timestamp resolution is seconds
+        s = f.stat
+        stat.mtime.nsec != 0 || stat.atime.nsec != 0 || stat.ctime.nsec != 0
       when 0x58465342 # XFS_SUPER_MAGIC
       when 0x01021994 # TMPFS_MAGIC
       else
@@ -1682,7 +1685,6 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L1685
     true
   end
 
-
   def test_seek
     make_tempfile {|t|
       open(t.path) { |f|

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

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