aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/process/clock_gettime_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/process/clock_gettime_spec.rb')
-rw-r--r--spec/ruby/core/process/clock_gettime_spec.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/ruby/core/process/clock_gettime_spec.rb b/spec/ruby/core/process/clock_gettime_spec.rb
index 70ec2c4bb5..a7b6bd2b02 100644
--- a/spec/ruby/core/process/clock_gettime_spec.rb
+++ b/spec/ruby/core/process/clock_gettime_spec.rb
@@ -1,11 +1,14 @@
require_relative '../../spec_helper'
describe "Process.clock_gettime" do
- # This does not succeed with some platforms:
- # RHEL: https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel_zlinux/ruby-trunk/log/20181229T063303Z.fail.html.gz
- # Solaris: https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181229T002409Z.fail.html.gz
platform_is_not :windows, :solaris do
- Process.constants.select { |c| c.to_s.start_with?('CLOCK_') }.each do |c|
+ Process.constants.select { |c|
+ c.to_s.start_with?('CLOCK_') &&
+ # These require CAP_WAKE_ALARM and are not documented in clock_gettime(),
+ # they return EINVAL if the permission is not granted.
+ c != :CLOCK_BOOTTIME_ALARM &&
+ c != :CLOCK_REALTIME_ALARM
+ }.each do |c|
it "can be called with Process::#{c}" do
value = Process.const_get(c)
Process.clock_gettime(value).should be_an_instance_of(Float)