aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Use space inside block braces everywhereDavid Rodríguez2020-06-1534-239/+239
| | | | To make rubygems code style consistent with bundler.
* Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""David Rodríguez2020-06-1510-4/+28
| | | | This reverts commit ac2c07e98373bb62be618001c897fa9d5809d8a4.
* Revert "Revert "[rubygems/rubygems] Remove unneeded teardown""David Rodríguez2020-06-151-6/+0
| | | | This reverts commit ceacb06311cf150cd3682b277bbe6cf7e7bbbc30.
* Try using longer read_timeout for --jit-waitTakashi Kokubun2020-06-141-7/+4
| | | | | | | | failure on TestFTP. When we skip a test, the place to hang (long wait for compilation) just moves to another test and it doesn't seem to finish. http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3003055
* Introduce find pattern [Feature #16828]Kazuki Tsujimoto2020-06-143-0/+100
|
* Skip test_getbinaryfile_command_injection on --jit-waitTakashi Kokubun2020-06-131-0/+2
| | | | | | | | | | Timeout-based test often fails with --jit-wait as a false positive. Like other tests in the TestFTP, let me skip this as well. http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3001181 http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3000134 http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2999923 http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2998857
* Revert "[ruby/fileutils] Make verbose output go to stdout instead of stderr"Nobuyoshi Nakada2020-06-121-5/+5
| | | | | | This reverts commit 7cddb844e6d51f954c6669341b9cc656bd7d3492, because the test of rake 13.0.1 is depending on the previous behavior.
* [ruby/fileutils] Fix #install with "X" mode optionNobuyoshi Nakada2020-06-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `FileUtils#install` methed raises an unexpected `TypeError`, when called with `mode:` option which has `"X"`. ``` $ ruby -rfileutils -e 'FileUtils.install("tmp/a", "tmp/b", mode: "o+X")' /opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `directory?': no implicit conversion of File::Stat into String (TypeError) from /opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `block (3 levels) in symbolic_modes_to_i' from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each_char' from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each' from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `inject' from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `block (2 levels) in symbolic_modes_to_i' from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each' from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each_slice' from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `block in symbolic_modes_to_i' from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `each' from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `inject' from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `symbolic_modes_to_i' from /opt/local/lib/ruby/2.7.0/fileutils.rb:973:in `fu_mode' from /opt/local/lib/ruby/2.7.0/fileutils.rb:883:in `block in install' from /opt/local/lib/ruby/2.7.0/fileutils.rb:1588:in `block in fu_each_src_dest' from /opt/local/lib/ruby/2.7.0/fileutils.rb:1604:in `fu_each_src_dest0' from /opt/local/lib/ruby/2.7.0/fileutils.rb:1586:in `fu_each_src_dest' from /opt/local/lib/ruby/2.7.0/fileutils.rb:877:in `install' from -e:1:in `<main>' ``` In spite of that `symbolic_modes_to_i` considers the `File::Stat` `path` case at the beginning, in `"X"` case, `path` is passed to `FileTest.directory?` method which requires a `String`. In such case, the mode in `path` should be examined instead. https://github.com/ruby/fileutils/commit/af675af6b2
* [ruby/fileutils] Make verbose output go to stdout instead of stderrJeremy Evans2020-06-121-5/+5
| | | | | | | | | Verbose output is not error output, and should be sent to stdout and not stderr. Fixes Ruby bug 4436 https://github.com/ruby/fileutils/commit/563a383025
* prevent memory allocation for GC testsKoichi Sasada2020-06-121-3/+7
| | | | | | | | We observed test failures on test_latest_gc_info with random order CI. http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/2998078l0ll To solve it, use a pre-allocated hash object and rehearsal.
* Make mutating the result of SortedSet#to_a not affect the setJeremy Evans2020-06-111-0/+3
| | | | Fixes [Bug #15834]
* Prohibit setting class variable on frozen module through inheritanceAlan Wu2020-06-111-0/+10
| | | | | | | | Setting class varibles goes through the ancestor list which can contain iclasses. Iclasses share a lot of information with the module they are made from, but not the frozen status. Check the frozen status of the module instead of the iclass.
* Warn when passing a non-literal block to Kernel#lambdaJeremy Evans2020-06-112-2/+7
| | | | Implements [Feature #15973]
* Fix error in `remove_entry`Kazuhiro NISHIYAMA2020-06-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | When `LANG=C`, dir is `UTF-8` and `base` is 'ASCII-8BIT` in `FileUtils::Entry_#join`. So `Encoding::CompatibilityError` occurred and files are not removed. https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-master/log/20200611T060002Z.fail.html.gz ``` 1) Error: WEBrick::TestFileHandler#test_cjk_in_path: Errno::ENOTEMPTY: Directory not empty @ dir_s_rmdir - /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/tmp/???20200611-1887828-3nn72a /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1460:in `rmdir' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1460:in `block in remove_dir1' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1471:in `platform_support' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1459:in `remove_dir1' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1452:in `remove' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:780:in `block in remove_entry' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1509:in `ensure in postorder_traverse' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1509:in `postorder_traverse' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:778:in `remove_entry' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/tmpdir.rb:97:in `mktmpdir' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/test/webrick/test_filehandler.rb:292:in `test_cjk_in_path' ```
* [ruby/logger] Let Logger#reopen not raise on nil log devicesLourens Naudé2020-06-111-0/+7
| | | | https://github.com/ruby/logger/commit/da7bf844e5
* [ruby/logger] Let File::NULL ("/dev/null", "NUL" etc.) be considered a nil ↵Lourens Naudé2020-06-111-0/+5
| | | | | | log device https://github.com/ruby/logger/commit/b42a1b99aa
* [ruby/webrick] Fix httpd error in CJK directoryKazuhiro NISHIYAMA2020-06-111-0/+13
| | | | | | [Bug #16753] https://github.com/ruby/webrick/commit/83cf440858
* Make proc/Proc.new without block an error instead of warningJeremy Evans2020-06-101-14/+2
| | | | The warning for these was added in 2.7.
* ENV.delete should return the result of block on non-existing keyNobuyoshi Nakada2020-06-101-0/+1
| | | | | | | Fixes [Bug #16173] Co-Authored-By: Burdette Lamar <burdettelamar@yahoo.com> Co-Authored-By: Jeremy Evans <code@jeremyevans.net>
* [rubygems/rubygems] Use parenthesis for clarity for ternary conditionBenoit Daloze2020-06-101-1/+1
| | | | https://github.com/rubygems/rubygems/commit/d1247472b9
* [rubygems/rubygems] Increase timeouts in test_gem_stream_ui.rbBenoit Daloze2020-06-101-1/+3
| | | | | * 0.1s is really short and fails in CI: #3622 https://github.com/rubygems/rubygems/commit/d8495ae1c1
* Work around infinite loop when overriding method visibility in prepended ↵Jeremy Evans2020-06-091-0/+21
| | | | | | | module (#3201) For ZSUPER methods with no defined class for the method entry, start the next lookup at the superclass of the origin class of the method owner, instead of the superclass of the method owner. Fixes [Bug #16942]
* Improved assertionsNobuyoshi Nakada2020-06-091-2/+2
|
* [ruby/gdbm] Workaround for GitHub ActionsHiroshi SHIBATA2020-06-091-1/+1
| | | | https://github.com/ruby/gdbm/commit/f42103fe93
* Return seconds slept after Thread.scheduler wait_sleepnicholas a. evans2020-06-091-1/+18
| | | | | | Kernel#sleep should still return seconds slept, even when using a Thread.scheduler. The return value of Scheduler#wait_sleep can be ignored.
* disable GC on a testKoichi Sasada2020-06-091-1/+1
| | | | CI fails with GC while `foo{}`, so that disable GC for this script.
* Differentiate `...` in lambda argumentsNobuyoshi Nakada2020-06-071-2/+3
|
* Add leading arguments support to arguments forwardingJeremy Evans2020-06-062-3/+124
| | | | | | | | The idFWD_KWREST sections may be wrong. However, the existing idFWD_KWREST sections for ... without leading arguments are already broken. Implements [Feature #16378]
* Make test for no method error more reliableYuki Nishijima2020-06-061-8/+12
| | | | This test should not depend on the bahaviour of the did_you_mean gem.
* Sync did_you_meanYuki Nishijima2020-06-065-130/+147
|
* [ruby/psych] Fixing compatibility with libyaml 0.2.5Aaron Patterson2020-06-053-24/+21
| | | | | | | | | The main issue is that commas aren't allowed in local tags. libyaml was updated to follow the spec, and our tests were out of date. See: https://github.com/yaml/libyaml/issues/196 https://github.com/ruby/psych/commit/3f5e520fd3
* [ruby/psych] Fix ArgumentError with leading and trailing underscores in ↵Mark Thorn2020-06-051-0/+3
| | | | | | number strings. https://github.com/ruby/psych/commit/ac2d2c9b1b
* [ruby/psych] Implement `freeze` option for Pysch.loadJean Boussier2020-06-051-0/+16
| | | | https://github.com/ruby/psych/commit/7dae24894d
* `local_address` may raise IOError in debug printKazuhiro NISHIYAMA2020-06-051-1/+1
| | | | | | | | | | | | | | | https://rubyci.org/logs/rubyci.s3.amazonaws.com/wsl2/ruby-master/log/20200605T020004Z.fail.html.gz ``` [ 984/20282] IMAPTest#test_connection_closed_without_greeting#<Thread:0x000055b6e9589d28 /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:133 run> terminated with exception (report_on_exception is true): /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `local_address': closed stream (IOError) from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `connect_address' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block (2 levels) in test_connection_closed_without_greeting' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each_object' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `map' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block in test_connection_closed_without_greeting' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:134:in `block in start_server' ```
* Add sockets to debug printKazuhiro NISHIYAMA2020-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debug print does not include `in_tcp_socket_2`, so I think other socket connected to server socket. Add sockets to debug print, and check other socket is in same process or not. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20200604T160009Z.fail.html.gz ``` 1) Failure: IMAPTest#test_connection_closed_without_greeting [/export/home/chkbuild/chkbuild-gcc/tmp/build/20200604T160009Z/ruby/test/net/imap/test_imap.rb:523]: [Net::IMAP::Error] exception expected, not #<RuntimeError: {:server=>#<TCPServer:(closed)>, :port=>35490, :server_created=> {:server=>"#<TCPServer:fd 10, AF_INET6, ::1, 35490>", :t=>45917010.30510591}, :in_start_server_before_accept=>{:t=>45917010.305154555}, :in_tcp_socket=> {:host=>"::1", :port=>35490, :server=>"#<TCPServer:fd 10, AF_INET6, ::1, 35490>", :t=>45917010.40560127}, :in_start_server=> {:sock_addr=>["AF_INET6", 35490, "::1", "::1"], :sock_peeraddr=>["AF_INET6", 51584, "::1", "::1"], :t=>45917010.40767231}, :in_start_server_sock_closed=>{:t=>45917010.40770047}, :in_rescue=> {:e=>#<Errno::EINVAL: Invalid argument - connect(2) for [::1]:35490>, :server_addr=>"::1", :t=>45917010.40867455}} >. ```
* Skip tests which do not work until installed when load-relativeNobuyoshi Nakada2020-06-051-0/+3
|
* Show better failure messagesNobuyoshi Nakada2020-06-051-4/+9
|
* Enable `Style/MethodCallWithoutArgsParentheses` in rubygemsDavid Rodríguez2020-06-051-1/+1
|
* [rubygems/rubygems] Use LoadError#path to figure out the argument passed to ↵Yuki Nishijima2020-06-051-0/+27
| | | | | | 'require' https://github.com/rubygems/rubygems/commit/5995394ec4
* [rubygems/rubygems] Modify `RakeFileUtils.verbose_flag` only when neededDavid Rodríguez2020-06-051-18/+3
| | | | https://github.com/rubygems/rubygems/commit/d490309d75
* [rubygems/rubygems] Fix test warningsDavid Rodríguez2020-06-051-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `rake package` started printing to stdout by default, we get these warnings printed when running rubygems tests: ``` $ rake Run options: --seed 6097 # Running: ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................mkdir -p pkg mkdir -p pkg/pkgr-1.2.3 rm -f pkg/pkgr-1.2.3/x ln x pkg/pkgr-1.2.3/x rm -f pkg/pkgr-1.2.3/y ln y pkg/pkgr-1.2.3/y cd pkg/pkgr-1.2.3 cd - .... Finished in 50.578889s, 43.0812 runs/s, 134.8191 assertions/s. 2179 runs, 6819 assertions, 0 failures, 0 errors, 0 skips Coverage report generated for Unit Tests to /home/deivid/Code/rubygems/coverage. 8080 / 8978 LOC (90.0%) covered. ``` The reason is that, although these tests wrap the `Rake.application["package"].invoke` with a `capture_io` block, the rake application initialization happens outside of this block, and a copy of `$stdout` is saved in there, and that's where the task prints. So the `capture_io` `$stdout` and `$stderr` dance is not effective. To fix, we move the `Rake` application initialization inside the `capture_io` block. https://github.com/rubygems/rubygems/commit/7f6e2398a5
* [rubygems/rubygems] Only run optional validations in packaging contextsDavid Rodríguez2020-06-051-0/+11
| | | | https://github.com/rubygems/rubygems/commit/f4fe949dfa
* [rubygems/rubygems] Respect files loaded from default gems before rubygemsDavid Rodríguez2020-06-051-0/+18
| | | | https://github.com/rubygems/rubygems/commit/f3da3c1190
* [rubygems/rubygems] Use a real file to run the testBenoit Daloze2020-06-051-2/+5
| | | | | | * JRuby doesn't support multi-line -e. https://github.com/rubygems/rubygems/commit/1fb6657a7d
* [rubygems/rubygems] Add a more comprehensive and reliable test for upgraded ↵Benoit Daloze2020-06-051-0/+22
| | | | | | | | | default gems * Test that the correct version is loaded and that the default gem is not loaded at all. https://github.com/rubygems/rubygems/commit/ee08508b2a
* [rubygems/rubygems] Relax test to still check we're calling the expected RubyBenoit Daloze2020-06-051-5/+1
| | | | | | | | | | | | | | * But not enforce that error looks like /full/path/to/ruby/bin/ruby: No such file or directory but instead allow truffleruby: No such file or directory A typical output for gem_make.out looks like: current directory: /.../rubygems/tmp/test_rubygems_112388/gemhome/gems/a-2 /.../ruby-2.6.6/bin/ruby -I /.../rubygems/lib -r ./siteconf20200422-112388-nyrcy0.rb extconf.rb '' /.../ruby-2.6.6/bin/ruby: No such file or directory -- extconf.rb (LoadError) https://github.com/rubygems/rubygems/commit/e6e08882cc
* [rubygems/rubygems] Fix check for testing in the ruby repositoryBenoit Daloze2020-06-051-4/+11
| | | | | | | | * When testing in the rubygems/rubygems repository, the previous code would move the lib/ dir at the end of $LOAD_PATH, which would cause to load a mix of lib/ RubyGems and in-stdlib-dir RubyGems, which blows up. https://github.com/rubygems/rubygems/commit/f6f6f00ed1
* [rubygems/rubygems] Clarify what ↵Benoit Daloze2020-06-051-3/+16
| | | | | | | | test_activate_via_require_respects_loaded_files does and tests * Clearly require the benchmark stdlib instead of far away in test_case.rb https://github.com/rubygems/rubygems/commit/d74b9ca04c
* [rubygems/rubygems] Simplify #warn test to not rely on the effect of -C on -IBenoit Daloze2020-06-051-2/+2
| | | | https://github.com/rubygems/rubygems/commit/382642a0d4
* [rubygems/rubygems] Fix `$LOADED_FEATURES` cache sometimes not respectedDavid Rodríguez2020-06-051-0/+29
| | | | | | | | | | | In the cases where the initial manually `-I` path resolution succeeded, we were passing a full path to the original require effectively skipping the `$LOADED_FEATURES` cache. With this change, we _only_ do the resolution when a matching requirable path is found in a default gem. In that case, we skip activation of the default gem if we detect that the required file will be picked up for a `-I` path. https://github.com/rubygems/rubygems/commit/22ad5717c3