summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2018-08-18Revert r64441eregon
* This reverts commit 647fc1227a4146ecbfeb0d59358abc8d99cd8ae6: "thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex" * Let's try to preserve the semantics of always being locked inside Mutex#synchronize, even if an exception interrupts ConditionVariable#wait. * As discussed on [Bug #14999]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutexnormal
If an exception is raised inside Mutex#sleep (via ConditionVariable#wait), we cannot guarantee we can own the mutex in the ensure callback. However, who owns the mutex at that point does not matter. What matters is the Mutex is usable after an exception occurs. * thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex * spec/ruby/library/conditionvariable/wait_spec.rb: only test lock usability after thread kill. Who owns the lock at any particular moment is an implementation detail which we cannot easily guarantee. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Guard spec failing on Solariseregon
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180817T182406Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Add guard for Solaris in Socket#connect_nonblock speceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Guard connect_nonblock spec on FreeBSDeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Guard with a :pktinfo feature specs relying on PKTINFOeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Re-add specseregon
* This reverts commit 325fd389018897bd156837639675517ef3b7dea5. * Platform guards in the next commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Add a note how to run specs under older Ruby versionseregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Fix typo in version guarderegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Add version guards for Enumerator::ArithmeticSequenceeregon
* And keep specs for older versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17spec/README.md: add a note about version guardseregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17Integrate new specs for ConditionVariable#wait to prevent regressionseregon
* See [Bug #14999]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-16skip examples failing on solarisnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-16apply r64239 to macOS toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15spec/ruby/optional/capi/ext/io_spec.c: guard unreachable codenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15spec/ruby/optional/capi/ext/io_spec.c: guard unreachable codenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15-Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readablenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-14spec/ruby/optional/capi/io_spec.rb: fix fragile spec from unpredictable errnonormal
rb_io_wait_readable and rb_io_wait_writable depend on the TSD errno value. Due to the recent changes in r64352-r64353 to restructure GVL, errno could be set to EAGAIN from the signal self-pipe and cause the rb_io_wait_readable spec to block unexpectedly. This should fix rubyspec timeouts on Solaris: http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz * spec/ruby/optional/capi/ext/io_spec.c: add errno= setter method * spec/ruby/optional/capi/io_spec.rb: set errno to appropriate values for tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-14non-symbol keys in kwargsnobu
* class.c (separate_symbol): [EXPERIMENTAL] non-symbol key in keyword arguments hash causes an exception now. c.f. https://twitter.com/yukihiro_matz/status/1022287578995646464 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-12skip non-IP interfacesnobu
* spec/ruby/library/socket/socket/getifaddrs_spec.rb: VirtualBox host only adapter seems something different than ordinary interfaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11fix r64296naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11Solaris 10 doesn't have getifaddrsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11Solaris raises EAI_SERVICE if hints.ai_socktype=0naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10Remove failing specsnaruse
https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T183001Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10Remove failing spec filesnaruse
Re-commit after specs are fixed. http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T063001Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180809T191808Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180809T192406Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20180809T151911Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180809T192507Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10process.c: fix rubyspec of Process.groupsmrkn
getgroups(2) may return a GID list that includes duplicated GIDs. The behavior is totaly depends on what OS is used. This commit fixes the example of Process.groups so that the example is independent of this OS-dependent features. Additonaly, this commit adds the description of such system-dependent characteristics of Process.groups. [ruby-dev:50603] [Bug #14969] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10another test needs IO.selectnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09Don't run the spec on Solarisnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09apply r64239 to macOS toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09apply r64239 to macOS toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09Don't run specs on Solarisnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09spec/ruby/library/socket/*: more FreeBSD fixesnormal
FreeBSD portability notes: Loopback connections are not instantaneous (unlike Linux), so non-blocking read-after-write MUST check for readability via IO.select or IO#wait_readable before attempting non-blocking recv/read operations. IPv6 seems favored, so we'll get "::" instead of "0.0.0.0" Some constants are different or obsolete, so that should be self-explanatory. There are still other failures I or somebody else needs to get to when we have time and feel like dealing with spec DSL: http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08fix MSG_OOB specnaruse
* OOBINLINE should be set for accepted socket * When OOBINLINE is set, MSG_OOB shouldn't be passed to recv Merge spec/ruby's commit 5b418374f8006318434ee9a2366382d004f585df git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08Add colon to avoid chkbuild's alertnaruse
https://github.com/ruby/chkbuild/blob/c0448670a9a5cb85f283bc639806ba09b294557f/chkbuild/ruby.rb#L847 Merge ruby/spec's commit 5a6ac7dbef3d59fe279303bf3346d92f1e620f12 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08Some environments do not have IPv6 address of localhost in /etc/hostskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08skip hanging-up tests on macOSnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08spec/ruby/library/socket/*: fix hanging on FreeBSD 11.1normal
There are still other test failures which need fixing on FreeBSD. Keep an eye on: http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06enumerator.c: Introduce Enumerator::ArithmeticSequencemrkn
This commit introduces new core class Enumerator::ArithmeticSequence. Enumerator::ArithmeticSequence is a subclass of Enumerator, and represents a number generator of an arithmetic sequence. After this commit, Numeric#step and Range#step without blocks returned an ArithmeticSequence object instead of an Enumerator. This class introduces the following incompatibilities: - You can create a zero-step ArithmeticSequence, and its size is not ArgumentError, but Infinity. - You can create a negative-step ArithmeticSequence from a range. [ruby-core:82816] [Feature #13904] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03spec/ruby/library/socket/socket/getaddrinfo_spec.rb: avoid nonsensical lookupnormal
"http" is a TCP service, so /etc/services on typical GNU/Linux systems only specify a TCP port for it. Use "discard" since it seems used for other specs and is specified as both TCP and UDP. This caused many CI failures like the following: git clone https://gist.github.com/812a9b747e4c4cb2e844d4be7991cd2d git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Update to ruby/spec@9be7c7eeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Update to ruby/mspec@072849eeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (rb_enc_get_index): return -1 for non-encoding capable objectseregon
* Clarify logic and add spec. * Now passes test-all with the JSON fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Revert "encoding.c (rb_enc_get_index): return -1 for non-encoding capable ↵eregon
objects" * This reverts commit fb253d2032e51f333e6577aa4fcf0c03f9c6fc02. * The CI is failing, this seems a bug in the JSON C extension. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (rb_enc_get_index): return -1 for non-encoding capable objectseregon
* Clarify logic and add spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (enc_set_index): raise instead of rb_bug() for non-encoding ↵eregon
capable objects * Add spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11spec/ruby/security/cve_2018_6914_spec.rb: get rid of leftover filesnormal
I ran out of inodes in $TMPDIR :< git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07process.c (rb_f_exec): pause MJIT before replacing processnormal
Non-parallel "make test-spec" caused spec/ruby/core/process/wait2_spec.rb failures because mspec uses "exec" in single-process mode, so there's no chance the post-exec state could know about the MJIT child process from its pre-exec state. [ruby-core:87846] [Bug #14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07wait2_spec.rb: skip leak checker for nowk0kubun
This is not working with cppflags="-DMJIT_FORCE_ENABLE" on my machine. ``` $ make test-spec $ /home/k0kubun/src/github.com/ruby/ruby-svn/.ruby-force/miniruby -I/home/k0kubun/src/github.com/ruby/ruby-svn/lib /home/k0kubun/src/github.com/ruby/ruby-svn/tool/runruby.rb --archdir=/home/k0kubun/src/github.com/ruby/ruby-svn/.ruby-force --extout=.ext -- /home/k0kubun/src/github.com/ruby/ruby-svn/spec/mspec/bin/mspec-run -B ../spec/default.mspec ruby 2.6.0dev (2018-07-07 trunk 63874) +JIT [x86_64-linux] [| | ================ 40% | 00:02:03] 0F 0E leaked before wait2 specs: [[31406, #<Process::Status: pid 31406 exit 0>]] 1) An exception occurred during: before :all FAILED Expected [[31406, #<Process::Status: pid 31406 exit 0>]] to be empty /home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:18:in `block (3 levels) in <top (required)>' /home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:16:in `block (2 levels) in <top (required)>' /home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:3:in `<top (required)>' [- | ==================100%================== | 00:00:00] 1F 0E Finished in 103.288794 seconds 3607 files, 28545 examples, 208272 expectations, 1 failure, 0 errors, 0 tagged uncommon.mk:777: recipe for target 'yes-test-spec' failed make: *** [yes-test-spec] Error 1 ``` Let me skip this for now and enable MJIT CI again. Related to Bug#14867 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06const_missing on private constantsnobu
* variable.c (rb_const_search): call #const_missing method on private constants, as well as uninitialized constants. [Feature #14328] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05unrevert r63852 but keep SIGCHLD path disabled for win32normal
Reading win32/win32.c waitpid implementation, maybe waitpid(-1, ...) on that platform will never conflict with mjit use of waitpid. In any case, I've added WAITPID_USE_SIGCHLD macro to vm_core.h so it can be easy for Linux/BSD users to test (hopefully!) win32-compatible code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e