From cb2a2c2737be0e965ef3adde46e1eeb80e278fff Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 15 Jun 2018 10:35:13 +0000 Subject: [PATCH] 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 --- test/ruby/test_process.rb | 12 ++++++++++-- 1 file 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