1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Move exclusion for Hyper-V next to other skipped constants

This commit is contained in:
Benoit Daloze 2019-05-20 10:40:34 +02:00
parent ab0f2deab1
commit 2a34543e11
2 changed files with 9 additions and 6 deletions

View file

@ -24,12 +24,7 @@ describe "Process.clock_getres" do
# The clock should not be less accurate than reported (times should
# not all be a multiple of the next precision up, assuming precisions
# are multiples of ten.)
if name != :CLOCK_MONOTONIC_RAW
# On a Hyper-V Linux guest machine, CLOCK_MONOTONIC_RAW can violate
# this assertion. So skipping this test for CLOCK_MONOTONIC_RAW.
times.select { |t| t % (reported * 10) == 0 }.size.should_not == times.size
end
times.select { |t| t % (reported * 10) == 0 }.size.should_not == times.size
end
end
end

View file

@ -47,6 +47,14 @@ module ProcessSpecs
}
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
clocks = clocks.reject { |clock, value|
clock == :CLOCK_MONOTONIC_RAW
}
end
clocks
end
end