summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-08-24test/ruby/test_io.rb (test_recycled_fd_close): use IO#read to avoid ppoll callnormal
IO#sysread calls rb_wait_for_single_fd for compatibility, and perhaps something is amiss with that (unrelated to timer-thread elimination) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23test/readline/test_readline.rb: fix readline testk0kubun
for mingw. test/lib/minitest/unit.rb: Add 'guards' for mingw. Removed still-unused method `mswin?` from original patch. [Fix GH-1941] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23check trace flags at loading [Bug #14702]ko1
* iseq.c (iseq_init_trace): at ISeq loading time, we need to check `ruby_vm_event_enabled_flags` to turn on trace instructions. Seprate this checking code from `finish_iseq_build()` and make new function. `iseq_ibf_load()` calls this funcation after loading. * test/ruby/test_iseq.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22compile.c: remove tracecoverage instruction for line coveragemame
Line coverage was based on special instruction "tracecoverage". Now, instead, it uses the mechanism of trace hook [Feature #14104]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22parse.y: remove coverage-related code fragmentsmame
The code fragments that initializes coverage data were scattered into both parse.y and compile.c. parse.y allocated a coverage data, and compile.c initialize the data. To remove this cross-cutting concern, this change moves the allocation from "coverage" function of parse.y to "rb_iseq_new_top" of iseq.c. For the sake, parse.y just counts the line number of the original source code, and the number is passed via rb_ast_body_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Add more assertions for NotImplementedError of instance methodkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20test/socket/test_socket.rb (timestamp_retry_rw): IO.select before recvmsgnormal
CI failures are still happening from these tests, but try to break out of it earlier instead of holding up the job. [Bug #14898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-19test/ruby/test_io.rb (test_select_leak): quiet unused variable warningnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18Suppress read of ~/.irbrckazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18test/ruby/test_system.rb: suppress prompt and echo on Windowsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18test/lib/zombie_hunter.rb: enable zombie hunter for MJITk0kubun
I think this issue is solved by Eric Wong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18test_function.rb: try running test_nogvl_poll againk0kubun
According to some runs in mjit-test (make test-all RUN_OPTS="--jit-wait"), this test might not be the cause of its failure. So, let me try running this again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17passing non-stdio fds is not supported on Windowsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-16process.c: defaults to close_others falsenormal
Arbitrarily closing file descriptors on exec breaks use cases where a Ruby process sets up a descriptor for non-Ruby children to use. For example, the "rake foo" target may spawn any number of subprocesses (Ruby or not) which depends on parsing the "FOO" environment variable for out_fd:99 and writing to foo.out FOO=out_fd:99 rake foo 99>>foo.out Unfortunately, this introduced one incompatibility in test/lib/test/unit.rb and it now requires explicitly setting IO#close_on_exec=true [ruby-core:88007] [Misc #14907] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-16test/net/imap/test_imap.rb (test_exception_during_idle): kill infinite loopernormal
It is possible for Mutex#sleep (via ConditionVariable#wait) to prematurely wake up under MJIT (because Mutex#sleep can't handle spurious wakeups). This affects @idle_done_cond in Net::IMAP#idle and means the response handler may never set `in_idle' to `true`. In any case, ensure the infinite looping `raiser' thread stops running when the test is done. Will work on reducing the effect of spurious wakeups from MJIT... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15test/ripper/test_parser_events.rb (test_block_variables): bump RLIMIT_AS againnormal
I still seem to need more memory for parallel tests with MJIT... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15test_function.rb: skip running testk0kubun
that times out with test-all w/ --jit-wait. I'm running the following command on Wecker CI everyday: ``` make test-all TESTOPTS="--color=never --job-status=normal" RUN_OPTS="--disable-gems --jit-wait --jit-warnings" RUBY_FORCE_TEST_JIT=1 ``` By running yesterday's all commits, r64354 ran successfully but r64355 didn't. So the test should be fixed to run with --jit-wait at first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15test_readline.rb: skip teardown failurek0kubun
https://ci.appveyor.com/project/ruby/ruby/build/9271/job/e88212s136mr0dgr I'll take a look at MSP-Greg's patch on readline later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15test_env.rb: change mingw branchk0kubun
https://github.com/MSP-Greg/ruby-loco/blob/e287cb739113da289271a017a1e7fa46cbfe47d9/patches/gte20600/test-ruby-test_env.rb_test_huge_value.patch From: MSP-Greg (Greg L) <Greg.mpls@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15skip tests failing on AppVeyor MinGWk0kubun
Let me skip this to make CI green first and take a look later... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-14Revert "test/lib/leakchecker.rb (find_tempfiles): don't warn for missing files"normal
This reverts commit 52102f6ff50eebf8c16667c9b49cef579d2057c1 (r64238). It is no longer necessary if we use Tempfile.create in WEBrick::HTTPAuth::Htgroup#flush (see next commit) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64362 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-14test/fiddle/test_function.rb (test_nogvl_poll): stop timer hacknormal
EINTR seems unavoidable in real programs (or MJIT), so maybe it's not worth dealing with. r64353 relies on POSIX timers to signal. Switching pipes and sockets to non-blocking by default would let us get rid of POSIX timers, timer pthread and this hack: https://bugs.ruby-lang.org/issues/14968 [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13thread_pthread.c: eliminate timer thread by restructuring GVLnormal
This reverts commit 194a6a2c68e9c8a3536b24db18ceac87535a6051 (r64203). Race conditions which caused the original reversion will be fixed in the subsequent commit. [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13Add some tests for *method_defined?usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13Fix test bugkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13Fix problem about notimplemented caseusa
Re-revert r64340, and take care about notimplemented case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13Add test for method_defined?(notimplement)kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13Revert "Support optional inherit argument for Module#method_defined?"kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13Support optional inherit argument for Module#method_defined?usa
Module has many introspection methods for methods and constants that either return an array or return true or false for whether the method or constant is defined. Most of these methods support an optional argument that controls whether to consider inheritance. Currently, the following Module methods support such a argument: * const_defined? * constants * instance_methods * private_instance_methods * protected_instance_methods * public_instance_methods and the following methods do not: * method_defined? * private_method_defined? * protected_method_defined? * public_method_defined? This patch supports such an argument for the *method_defined? methods. While you can currently work around the lack of support via: mod.instance_methods(false).include?(:method_name) This patch allows the simpler and more efficient: mod.method_defined?(:method_name, false) One case where you want to exclude inheritance when checking for a method definition is when you want to replace a method that may already exist. To avoid a verbose warning, you want to remove the method only if it is already defined: remove_method(:foo) if method_defined?(:foo, false) define_method(:foo){} You can't call remove_method without checking for the method definition, as that can raise a NameError, and you don't want to include inheritance because remove_method will still raise a NameError if the method is defined by an ancestor and not by the module itself. [ruby-core:88140] [Feature #14944] From: Jeremy Evans <code@jeremyevans.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13test/rinda/test_rinda.rb: Start keeper only on used testskazu
to reduce sleeping threads on unrelated tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11test_rubyvm_mjit.rb: skip testing MJIT if not supportedk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11test_env.rb: a failure on appveyornobu
* test/ruby/test_env.rb (test_huge_value): Windows 8 seems having a limit on single environment variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11test_rubyvm_mjit.rb: dump output on test_pausek0kubun
failure. It's failing on mswinci but it's hard to know the cause without out/err. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11test_iseq_load.rb: reduce timeout of test_stressful_roundtripk0kubun
We should increase RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE for slow environments, and we configured some CI machines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11hash.c: env block size limit on Windowsnobu
* hash.c (ruby_setenv): do not check environment block size. c.f. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx Starting with Windows Vista and Windows Server 2008, there is no technical limitation on the size of the environment block. [ruby-core:88400] [Bug #14979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11_mjit_compile_pc_and_sp.erb: always move pck0kubun
to fix the wrong line number on #caller_locations or rb_profile_frames. Actually we would be able to move it only when method call (of caller_locations) or C extension invocation (calling rb_profile_frames) can happen. This degrades performance. Optcarrot fps becomes... before: 71.78976052783555 after: 67.65429356624131 I think I can lazily move it and fix the performance issue, even improving the performance for the situation catch table exists. But let me fix this bug first... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10test_iseq_load.rb: increase timeoutk0kubun
It's timed out on CI like this https://gist.github.com/ko1/33df53d78fbec9e4156c017eeae023bb. I'm not sure how long it would take (it finishes immediately on my machine), so I chose 600s because r64271 says it took 635s on mswinci. (probably it's improved by the commit, though.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10Use assert_separately in TestIseqLoad#test_stressful_roundtripnaruse
It takes 635 seconds on mswinci http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180810T061315Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10enumerator.c: fix for non-integral argument for ArithmeticSequence#lastmrkn
This fixes a bug of Enumerator::ArithmeticSequence#last in the case that a non-integral argument is passed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09enumerator.c: undef new and allocate of ArithmeticSequencemrkn
Undefine new and allocate methods of Enumerator::ArithmeticSequence. [ruby-core:82816] [Feature #13904] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09net/http, net/ftp: skip SSL/TLS session resumption testsrhe
Due to a bug in OpenSSL 1.1.0h[1] (it's only in this specific version; it was introduced just before the release and is already fixed in their stable branch), the callback set by SSLContext#session_new_cb= does not get called for clients, making net/http and net/ftp not attempt session resumption. Let's disable the affected test cases for now. Another option would be to fallback to using SSLSocket#session as we did before r64234. But since only a single version is affected and hopefully a new stable version containing the fix will be released in near future, I chose not to add such workaround code to lib/. [1] https://github.com/openssl/openssl/pull/5967 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09mjit.c: add :wait option to RubyVM::MJIT.pausek0kubun
and wait until JIT queue is flushed when wait option is not passed or `wait: true` is passed. vm.c: ditto test/ruby/test_rubyvm_mjit.rb: added test for pause/resume test/lib/jit_support.rb: allow retrying MJIT on JITSupport level test/ruby/test_jit.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09Fix error when Encoding.default_external is Encoding::IBM437kazu
https://ci.appveyor.com/project/ruby/ruby/build/1.0.9151#L4601 ``` 1) Error: TestArgf#test_inplace_nonascii: Encoding::UndefinedConversionError: U+3042 from UTF-8 to IBM437 ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09test/io/console/test_io_console.rb: fix short read failuresnormal
Running with TESTS=--no-retry, I sometimes get short reads leading to failures due to the use of IO#readpartial instead of IO#gets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09test/io/wait/test_io_wait_uncommon.rb (test_tty_wait): increase timeoutnormal
Apparently my tty can't keep up when I run test-all with TESTS='-v --no-retry' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09Skip test_inplace_nonascii if external encoding is us-asciikazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09add 'x' mode character for O_EXCLkazu
[Feature #11258] Patch by cremno (cremno phobia) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09io.c: fix non-ascii filename inplace editnobu
* io.c (argf_next_argv): convert filename to the OS encoding to be dealt with by system calls. [ruby-dev:50607] [Bug #14970] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09test/lib/leakchecker.rb (find_tempfiles): don't warn for missing filesnormal
Quiet a false-positive warning from TestHtgroup#test_htgroup git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e