mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Only exclude the failing clocks for Process.clock_getres specs on AIX
* 20190522
T103301Z.fail.html.gz
This commit is contained in:
parent
706c816ad2
commit
4541d2effe
2 changed files with 8 additions and 1 deletions
|
@ -2,7 +2,7 @@ require_relative '../../spec_helper'
|
||||||
require_relative 'fixtures/clocks'
|
require_relative 'fixtures/clocks'
|
||||||
|
|
||||||
describe "Process.clock_getres" do
|
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|
|
ProcessSpecs.clock_constants_for_resolution_checks.each do |name, value|
|
||||||
it "matches the clock in practice for Process::#{name}" do
|
it "matches the clock in practice for Process::#{name}" do
|
||||||
times = []
|
times = []
|
||||||
|
|
|
@ -40,6 +40,13 @@ module ProcessSpecs
|
||||||
}
|
}
|
||||||
end
|
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
|
# On a Hyper-V Linux guest machine, these clocks in practice
|
||||||
# seem to be less precise than advertised by clock_getres
|
# seem to be less precise than advertised by clock_getres
|
||||||
platform_is :linux do
|
platform_is :linux do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue