summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-04-09test/ruby/test_gc_compact.rb: Use assert_separately for debuggingYusuke Endoh
... the following timeout failure. http://rubyci.s3.amazonaws.com/rhel_zlinux/ruby-master/log/20210408T213303Z.fail.html.gz ``` [ 8871/21204] TestGCCompact#test_ast_compactstimeout: output interval exceeds 600.0 seconds. timeout: the process group 28416 is alive. PSOUT PGID PID ELAPSED %CPU VSZ COMMAND COMMAND PSOUT 28416 28416 12:46 0.0 108120 gmake gmake TESTS=--hide-skip -v RUBYOPT=-w test-all PSOUT 28416 28423 12:46 88.2 1446124 ruby ./test/runner.rb: TestGCCompact#test_ast_compacts timeout: INT signal sent. timeout: INT signal sent. timeout: TERM signal sent. timeout: TERM signal sent. timeout: KILL signal sent. ``` This error repeatedly occurs on RHEL s390x. This change sends SEGV when timeout occurs so that it should dump the backtrace.
2021-04-08[ruby/reline] Separate keystrokes each editing modeaycabta
https://github.com/ruby/reline/commit/ee23e6f3f8
2021-04-08test/zlib/test_zlib.rb: Set binmode to test output fileYusuke Endoh
Seems like the test `TestZlibGzipFile#test_gzip_reader_zcat` fails when the timestamp has `\n\n`. https://ci.appveyor.com/project/ruby/ruby/builds/38597932 ``` 1) Error: TestZlibGzipFile#test_gzip_reader_zcat: Zlib::DataError: invalid distance too far back C:/projects/ruby/test/zlib/test_zlib.rb:522:in `initialize' C:/projects/ruby/test/zlib/test_zlib.rb:522:in `new' C:/projects/ruby/test/zlib/test_zlib.rb:522:in `zcat' C:/projects/ruby/test/zlib/test_zlib.rb:522:in `block (2 levels) in test_gzip_reader_zcat' C:/projects/ruby/test/zlib/test_zlib.rb:521:in `open' C:/projects/ruby/test/zlib/test_zlib.rb:521:in `block in test_gzip_reader_zcat' C:/projects/ruby/lib/tempfile.rb:358:in `create' C:/projects/ruby/test/zlib/test_zlib.rb:510:in `test_gzip_reader_zcat' ``` The test time is around 2021-04-08 04:40 +0900. Maybe the following time should trigger the bug. ``` irb(main):001:0> Time.at(1617824266) => 2021-04-08 04:37:46 +0900 irb(main):002:0> [1617824266].pack("V") => "\n\nn`" ```
2021-04-07[Bug #17780] Fix Method#super_method for module aliasPeter Zhu
Method#super_method crashes for aliased module methods because they are not defined on a class. This bug was introduced in c60aaed1856b2b6f90de0992c34771830019e021 as part of bug #17130. Notes: Merged: https://github.com/ruby/ruby/pull/4364
2021-04-07test/drb/test_drb.rb: Specify the host of DRbServerYusuke Endoh
to try fixing the following error. http://rubyci.s3.amazonaws.com/opensuseleap/ruby-master/log/20210407T063004Z.log.html.gz ``` [ 605/21105] DRbTests::TestDRbSSLAry#test_06_next/home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/lib/drb/drb.rb:1138:in `method_missing': undefined method `regist' for [1, 2, "III", 4, "five", 6]:Array (NoMethodError) from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/lib/drb/extserv.rb:21:in `block in initialize' from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/.ext/common/monitor.rb:202:in `synchronize' from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/.ext/common/monitor.rb:202:in `mon_synchronize' from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/lib/drb/extserv.rb:20:in `initialize' from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/test/drb/ut_array_drbssl.rb:35:in `new' from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/test/drb/ut_array_drbssl.rb:35:in `<main>' = 100.05 s ``` Here is my analysis: The test of drb used both `druby://:0` and `druby://localhost:0` for DRbServer. However, the former listens on IPv4, and the latter does on IPv6, depending on environments. The port 0 is automatically assigned, but sometimes the same port is used to both because they are different protocols (IPv4 and IPv6). In this case, their URIs are resolved to the completely same one (`druby://localhost:port`), which confuses the method `DRb.here?` which determines the DRbObject is remote or local. This changeset uses `druby://localhost:0` consistently.
2021-04-06Try to fix Leaked file descriptorKazuhiro NISHIYAMA
https://github.com/ruby/ruby/runs/2274767991?check_suite_focus=true#step:15:118 ``` Leaked file descriptor: DRbTests::TestDRbTCP#test_immediate_close: 7 : #<TCPServer:fd 7, AF_INET, 0.0.0.0, 42451> Leaked file descriptor: DRbTests::TestDRbTCP#test_immediate_close: 9 : #<IO:fd 9> Leaked file descriptor: DRbTests::TestDRbTCP#test_immediate_close: 10 : #<IO:fd 10> ```
2021-04-05Get rid of multibyte prefix to tmpdirNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4354
2021-04-05[ruby/tmpdir] Make usable chars more strictNobuyoshi Nakada
Remove other than alphanumeric and some punctuations considered filesystem-safe, instead of removing some unsafe chars only. https://hackerone.com/reports/1131465 https://github.com/ruby/tmpdir/commit/adf294bc2d
2021-04-05[ruby/irb] Suppress verbose messages in the parallel testNobuyoshi Nakada
`:VERBOSE` flag needs to be set prior to `IRB::Irb.new`. https://github.com/ruby/irb/commit/0dbe292979
2021-04-04test/ruby/test_lambda.rb: Remove "warning: assigned but unused variable"Yusuke Endoh
2021-04-03[ruby/rdoc] Links to document texts without "rdoc-ref:" prefixNobuyoshi Nakada
While links to generated HTML from RDoc file needs to be prefixed by "rdoc-ref:" currently, in case of explicit references this seems just redundant. Also GitHub RDoc support does not work with this prefix. This patch lets links to such document texts (".rb", ".rdoc" and ".md" now) refer URLs generated by `RDoc::TopLevel#http_url` without the prefix. https://github.com/ruby/rdoc/commit/f18b27b69d
2021-04-03[ruby/rdoc] Clarify that dots in URL are replacedNobuyoshi Nakada
The dots in all path components from the document root are replaced with underscores, not only in the basename. https://github.com/ruby/rdoc/commit/7a3417ea4c
2021-04-03[ruby/rdoc] Treat emphasis tags as excluding other notationsaycabta
And exclusive notations don't exclude other exclusive notations. https://github.com/ruby/rdoc/commit/b8baa9a435
2021-04-03[ruby/rdoc] Treat other tags as word boundariesaycabta
https://github.com/ruby/rdoc/commit/8222f85a17
2021-04-03[ruby/rdoc] Disable other notations in <code> tagsaycabta
https://github.com/ruby/rdoc/commit/0cd3b55210
2021-04-03[ruby/irb] Evaluate each toplevel statementaycabta
https://github.com/ruby/irb/commit/bc1b1d8bc3
2021-04-03[ruby/irb] Add test for multiline pasteaycabta
https://github.com/ruby/irb/commit/e93c9cb54d
2021-04-03[ruby/irb] Add yamatanooroti test exampleaycabta
https://github.com/ruby/irb/commit/279155fcee
2021-04-02[ruby/reline] Reset @rest_height when clear screenaycabta
https://github.com/ruby/reline/commit/3a7019b0d5
2021-04-02[ruby/irb] Add show_source commandTakashi Kokubun
https://github.com/ruby/irb/commit/108cb04352
2021-04-02[ruby/irb] Colorize `__END__` as keywordNobuyoshi Nakada
https://github.com/ruby/irb/commit/9b84018311
2021-04-02fix return from orphan Proc in lambdaKoichi Sasada
A "return" statement in a Proc in a lambda like: `lambda{ proc{ return }.call }` should return outer lambda block. However, the inner Proc can become orphan Proc from the lambda block. This "return" escape outer-scope like method, but this behavior was decieded as a bug. [Bug #17105] This patch raises LocalJumpError by checking the proc is orphan or not from lambda blocks before escaping by "return". Most of tests are written by Jeremy Evans https://github.com/ruby/ruby/pull/4223 Notes: Merged: https://github.com/ruby/ruby/pull/4347
2021-04-02[ruby/irb] SIGINT should raise Interrupt after IRB sessionKoichi Sasada
https://github.com/ruby/irb/commit/5832cfe75b
2021-04-02[ruby/irb] Suppress verbose messages in the parallel testNobuyoshi Nakada
`:VERBOSE` flag needs to be set prior to `IRB::Irb.new`. https://github.com/ruby/irb/commit/78604682d9
2021-03-31Use EnvUtil.under_gc_stressNobuyoshi Nakada
2021-03-31skip marking for uninitialized imemo_env.Koichi Sasada
RUBY_INTERNAL_EVENT_NEWOBJ can expose uninitialized imemo_env objects and marking it will cause critical error. This patch skips marking on uninitialized imemo_env. See: http://rubyci.s3.amazonaws.com/centos7/ruby-master/log/20210329T183003Z.fail.html.gz Shortest repro-code is provided by mame-san. Notes: Merged: https://github.com/ruby/ruby/pull/4342
2021-03-31[ruby/openssl] pkcs7: keep private key when duplicating PKCS7_SIGNER_INFOKazuki Yamaguchi
ASN1_dup() will not copy the 'pkey' field of a PKCS7_SIGNER_INFO object by design; it is a temporary field kept until the PKCS7 structure is finalized. Let's bump reference counter of the pkey in the original object and use it in the new object, too. This commit also removes PKCS7#add_signer's routine to add the content-type attribute as a signed attribute automatically. This behavior was not documented or tested. This change should not break any working user code since the method was completely useless without the change above. https://github.com/ruby/openssl/commit/20ca7a27a8
2021-03-30mkmf: fixed install directories of header files in extension libraries [Bug ↵Nobuyoshi Nakada
#17761] When installing an extension library which provides a header, that header should be installed under site_ruby (or vendor_ruby when "--vendor" option was given to extconf.rb). However, currently this file is about to be installed in the core include directory. Notes: Merged: https://github.com/ruby/ruby/pull/4339 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-30Test incorrect behaviour of `rb_io_wait_readable/writable`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4338
2021-03-30Fix handling of timeout accessing scheduler outside of non-blocking context.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Improve timeout tests.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Update method name and add documentation.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Add hook for `Timeout.timeout`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-29Add more tests for defined? with method callsJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/4213
2021-03-29[ruby/optparse] Fixed error message of unparsed non-optionNobuyoshi Nakada
Close https://github.com/ruby/optparse/issues/3 https://github.com/ruby/optparse/commit/94c5cf4032
2021-03-29[ruby/optparse] Add OptionParser#require_exact accessorJeremy Evans
This allows you to disable allowing abbreviations of long options and using short options for long options. Implements Ruby Feature #11523 https://github.com/ruby/optparse/commit/dfefb2d2e2
2021-03-29[ruby/irb] Always add input method when calling Irb.new in testsaycabta
When passes input method as nil to Context.new through Irb.new, ReidlineInputMethod.new is executed and the global internal state of Reline is rewritten, therefore other tests are failed in the Ruby repository. This commit changes to use TestInputMethod. https://github.com/ruby/irb/commit/010dce9210
2021-03-28[ruby/pathname] Fix segfault of Pathname#splitKenichi Kamiya
Fix segmentation fault of Pathname#split when File.split returns non array value [Bug #17755] https://github.com/ruby/pathname/commit/e29b49e3b1 https://github.com/ruby/pathname/commit/1db7479a74
2021-03-28[ruby/pathname] Support Ruby 3.0Hiroshi SHIBATA
Update test/pathname/test_pathname.rb https://github.com/ruby/pathname/commit/29645187e0 https://github.com/ruby/pathname/commit/78584864de Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-03-28Keep non evaluated keys in `Hash#transform_keys!` [Bug #17735]Kenichi Kamiya
Notes: Merged: https://github.com/ruby/ruby/pull/4294 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-28Fix segmentation fault when `Module#name` returns non string value [Bug #17754]Kenichi Kamiya
* Add test for NoMethodError#to_s does not segfault * Ensure no segfault even if Module#name is overridden Notes: Merged: https://github.com/ruby/ruby/pull/4328 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-27Fix Enumerable#tally with some arguments pattern [Feature #17744]Kenichi Kamiya
* Add test cases for Enumerable#tally with hash argument * Add ruby/spec for Enumerable#tally with hash argument * Fix Enumerable#tally does not update given frozen hash * Add test cases for Enumerable#tally with hash convertible arguments * Fix SEGV when Enumerable#tally takes non Hash convertible * FIx cosmetic damage enum.c Notes: Merged: https://github.com/ruby/ruby/pull/4327 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-27No codesign in testsNobuyoshi Nakada
2021-03-26Enumerable#tally with the resulting hash [Feature #17744]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4318 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-25[ruby/irb] Cache completion files to requireaycabta
https://github.com/ruby/irb/commit/612ebcb311
2021-03-24Change heap walking to be safe for object allocationPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/4263
2021-03-24Ensure that caller respects the start argumentJeremy Evans
Previously, if there were ignored frames (iseq without pc), we could go beyond the requested start frame. This has two changes: 1) Ensure that we don't look beyond the start frame by using last_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(last_cfp) until the desired start frame is reached. 2) To fix the failures caused by change 1), which occur when a limited number of frames is requested, scan the VM stack before allocating backtrace frames, looking for ignored frames. This is complicated if there are ignored frames before and after the start, in which case we need to scan until the start frame, and then scan backwards, decrementing the start value until we get to the point where start will result in the number of requested frames. This fixes a Rails test failure. Jean Boussier was able to to produce a failing test case outside of Rails. Co-authored-by: Jean Boussier <jean.boussier@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4237
2021-03-24[ruby/irb] fix completion test when out-of-place buildNobuyoshi Nakada
2021-03-24[ruby/reline] Suppress crashing when completer_{quote,word_break}_characters ↵aycabta
is empty https://github.com/ruby/reline/commit/c6f1164942
2021-03-24[ruby/reline] Support preposing and postposing for Reline.completion_procaycabta
https://github.com/ruby/reline/commit/1f469de90c