aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/process/fixtures/clocks.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-04-28 23:16:03 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-04-28 23:17:42 +0200
commitbbb93608a385242da93bc5256a90a6376981d86f (patch)
treec96873475c53ba8312e50047a7c1658ced019397 /spec/ruby/core/process/fixtures/clocks.rb
parentdfc0eeb0cfb22efde6369f275d3a28c29144d9a6 (diff)
downloadruby-bbb93608a385242da93bc5256a90a6376981d86f.tar.gz
Move the check for CentOS CLOCK_MONOTONIC_RAW next to others
* Fixes "No behavior expectation was found in the example" * https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-trunk/log/20190428T093004Z.fail.html.gz
Diffstat (limited to 'spec/ruby/core/process/fixtures/clocks.rb')
-rw-r--r--spec/ruby/core/process/fixtures/clocks.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/ruby/core/process/fixtures/clocks.rb b/spec/ruby/core/process/fixtures/clocks.rb
index c04ae7785f..f8ec0f0a20 100644
--- a/spec/ruby/core/process/fixtures/clocks.rb
+++ b/spec/ruby/core/process/fixtures/clocks.rb
@@ -40,6 +40,13 @@ module ProcessSpecs
}
end
+ # CentOS seems to report a negative resolution for CLOCK_MONOTONIC_RAW
+ platform_is :linux do
+ clocks = clocks.reject { |clock, value|
+ clock == :CLOCK_MONOTONIC_RAW and Process.clock_getres(value, :nanosecond) < 0
+ }
+ end
+
clocks
end
end