summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-15 10:35:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-15 10:35:13 +0000
commitcb2a2c2737be0e965ef3adde46e1eeb80e278fff (patch)
tree0fc994439ba03a755f93891c7b5c3c0ebbef93f2
parentd31d66314baaf76b263fdfa6388748f05d14f687 (diff)
gettimeofday is obsolete
* test/ruby/test_process.rb gettimeofday is obsolete in SUSv4, and may not be available in the future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_process.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 59f699931b..a9052b4706 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -2046,7 +2046,11 @@ EOS
def test_clock_gettime_GETTIMEOFDAY_BASED_CLOCK_REALTIME
n = :GETTIMEOFDAY_BASED_CLOCK_REALTIME
- t = Process.clock_gettime(n)
+ begin
+ t = Process.clock_gettime(n)
+ rescue Errno::EINVAL
+ return
+ end
assert_kind_of(Float, t, "Process.clock_gettime(:#{n})")
end
@@ -2124,7 +2128,11 @@ EOS
def test_clock_getres_GETTIMEOFDAY_BASED_CLOCK_REALTIME
n = :GETTIMEOFDAY_BASED_CLOCK_REALTIME
- t = Process.clock_getres(n)
+ begin
+ t = Process.clock_getres(n)
+ rescue Errno::EINVAL
+ return
+ end
assert_kind_of(Float, t, "Process.clock_getres(:#{n})")
assert_equal(1000, Process.clock_getres(n, :nanosecond))
end