ruby-changes:55821
From: Benoit <ko1@a...>
Date: Fri, 24 May 2019 21:44:22 +0900 (JST)
Subject: [ruby-changes:55821] Benoit Daloze: 4541d2effe (trunk): Only exclude the failing clocks for Process.clock_getres specs on AIX
https://git.ruby-lang.org/ruby.git/commit/?id=4541d2effe From 4541d2effe1f32e74d27602b44aff12cbf6937aa Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Fri, 24 May 2019 14:29:47 +0200 Subject: Only exclude the failing clocks for Process.clock_getres specs on AIX * https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20190522T103301Z.fail.html.gz diff --git a/spec/ruby/core/process/clock_getres_spec.rb b/spec/ruby/core/process/clock_getres_spec.rb index 119e6ed..0fc2a95 100644 --- a/spec/ruby/core/process/clock_getres_spec.rb +++ b/spec/ruby/core/process/clock_getres_spec.rb @@ -2,7 +2,7 @@ require_relative '../../spec_helper' https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/process/clock_getres_spec.rb#L2 require_relative 'fixtures/clocks' describe "Process.clock_getres" do - platform_is_not :freebsd, :aix do # clock_getres() seems incorrect on FreeBSD and AIX? + platform_is_not :freebsd do # clock_getres() seems incorrect on FreeBSD ProcessSpecs.clock_constants_for_resolution_checks.each do |name, value| it "matches the clock in practice for Process::#{name}" do times = [] diff --git a/spec/ruby/core/process/fixtures/clocks.rb b/spec/ruby/core/process/fixtures/clocks.rb index 6e8a65f..7acc8fb 100644 --- a/spec/ruby/core/process/fixtures/clocks.rb +++ b/spec/ruby/core/process/fixtures/clocks.rb @@ -40,6 +40,13 @@ module ProcessSpecs https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/process/fixtures/clocks.rb#L40 } end + # These clocks in practice on AIX seem to be more precise than their reported resolution. + platform_is :aix do + clocks = clocks.reject { |clock, value| + [:CLOCK_REALTIME, :CLOCK_MONOTONIC].include?(clock) + } + end + # On a Hyper-V Linux guest machine, these clocks in practice # seem to be less precise than advertised by clock_getres platform_is :linux do -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/