diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-06-06 21:10:21 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-06-06 21:16:28 -0700 |
commit | 119ca4343cceed031f017ce2e0d2a1e709344a0f (patch) | |
tree | 0bb7ff9f03226ca3959ef039ae72cb86c6f329fe /spec/ruby/core/process/clock_getres_spec.rb | |
parent | c55de95ff1c4ea6313c2863037703a0e5f0d0f4f (diff) |
Make specs pass on OpenBSD
Skip Process clockres specs that don't work on either FreeBSD or
Solaris/AIX in addition to OpenBSD.
Run most current String#crypt specs on non-OpenBSD, and add a new
set of crypt specs for OpenBSD, which support bcrypt but not DES
in crypt(3).
Use @server.connect_address instead of @server.getsockname in some
socket tests, as OpenBSD does not treat connection to all zero
IPv4 or IPv6 addresses as connection to localhost.
When trying to connect using UDP on an unsupported address family,
allow Errno::EPROTONOSUPPORT in addition to Errno::EAFNOSUPPORT,
as OpenBSD raises the former.
Diffstat (limited to 'spec/ruby/core/process/clock_getres_spec.rb')
-rw-r--r-- | spec/ruby/core/process/clock_getres_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/process/clock_getres_spec.rb b/spec/ruby/core/process/clock_getres_spec.rb index cadb5b7e8c..7112b0520a 100644 --- a/spec/ruby/core/process/clock_getres_spec.rb +++ b/spec/ruby/core/process/clock_getres_spec.rb @@ -4,7 +4,7 @@ require_relative 'fixtures/clocks' describe "Process.clock_getres" do # clock_getres() seems completely buggy on FreeBSD: # https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20190428T093003Z.fail.html.gz - platform_is_not :freebsd do + platform_is_not :freebsd, :openbsd do # NOTE: Look at fixtures/clocks.rb for clock and OS-specific exclusions ProcessSpecs.clock_constants_for_resolution_checks.each do |name, value| it "matches the clock in practice for Process::#{name}" do @@ -50,13 +50,13 @@ describe "Process.clock_getres" do # These are observed - platform_is_not :solaris, :aix do + platform_is_not :solaris, :aix, :openbsd do it "with Process::CLOCK_REALTIME reports at least 1 microsecond" do Process.clock_getres(Process::CLOCK_REALTIME, :nanosecond).should <= 1_000 end end - platform_is_not :aix do + platform_is_not :aix, :openbsd do it "with Process::CLOCK_MONOTONIC reports at least 1 microsecond" do Process.clock_getres(Process::CLOCK_MONOTONIC, :nanosecond).should <= 1_000 end |