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:
parent
ab0f2deab1
commit
2a34543e11
2 changed files with 9 additions and 6 deletions
|
@ -24,15 +24,10 @@ describe "Process.clock_getres" do
|
||||||
# The clock should not be less accurate than reported (times should
|
# The clock should not be less accurate than reported (times should
|
||||||
# not all be a multiple of the next precision up, assuming precisions
|
# not all be a multiple of the next precision up, assuming precisions
|
||||||
# are multiples of ten.)
|
# 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
|
times.select { |t| t % (reported * 10) == 0 }.size.should_not == times.size
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
# These are documented
|
# These are documented
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,14 @@ module ProcessSpecs
|
||||||
}
|
}
|
||||||
end
|
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
|
clocks
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue