summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-02-17Partially revert "test/openssl/test_ssl.rb: skip ↵Yusuke Endoh
OpenSSL::TestSSL#test_fallback_scsv" A skip guard for test_fallback_scsv has been added in upstream repository.
2020-02-17[ruby/openssl] test/openssl/test_ssl: skip test_fallback_scsv if necessaryKazuki Yamaguchi
Run the test case only when the OpenSSL supports both TLS 1.1 and TLS 1.2. Note that the fallback SCSV mechanism is for TLS 1.2 or older and not for 1.3. Fixes: https://github.com/ruby/openssl/issues/336 https://github.com/ruby/openssl/commit/6f2e6d7cf7
2020-02-17[ruby/openssl] ts: simplify OpenSSL::Timestamp::Request#algorithmKazuki Yamaguchi
Stop the special treatment of invalid hashAlgorithm of the message imprint. Those invalid values can only appear after the object is instantiated, before the user sets an actual message digest algorithm. OpenSSL::Timestamp::TokenInfo#algorithm already does the same. Also, remove the test case "test_create_request" since it does not make much sense. Those fields are to be set by the user after creation of the object and checking the initial value is pointless. Fixes: https://github.com/ruby/openssl/issues/335 https://github.com/ruby/openssl/commit/890a6476fa
2020-02-17test/openssl/test_ssl.rb: skip OpenSSL::TestSSL#test_fallback_scsvYusuke Endoh
on OpenSSL 1.1.1d or later. https://github.com/ruby/openssl/issues/336
2020-02-16Revert "test/openssl/test_ts.rb: tentatively skip a failing test on CentOS 6.9"Yusuke Endoh
This reverts commit a6d007c70b3aa5b55c9ca774446130356bd36eac. Unfortunately, the test fails on armv7l https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20200216T091708Z.fail.html.gz
2020-02-16test/openssl/test_ts.rb: tentatively skip a failing test on CentOS 6.9Yusuke Endoh
CentOS 6.9 will be EOL at Nov. Ruby 3.0 (or 2.8) release version will not support CentOS 6.9, so I'll remove the environment after it become green.
2020-02-16test/openssl/test_ssl.rb: skip a test on OpenSSL 1.1.d or laterYusuke Endoh
It fails due to "error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small". This is a tentative measurement to avoid the failure. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20200216T093010Z.fail.html.gz test/openssl/fixture/chain/server.key should be longer. It should be documented how to create the files. BTW, it would be a good idea to dynamically create a key during test instead of fixed files.
2020-02-16Make OpenSSL::OSSL#test_memcmp_timing robustYusuke Endoh
The test was too fragile. Actually, it fails on one of our CIs immediately after it was merged to ruby/ruby. https://gist.github.com/ko1/7ea4a5826641f79e2f9e041d83e45dba#file-brlog-trunk_clang_40-20200216-101730-L532-L535 https://gist.github.com/ko1/1c657746092b871359d8bf9e0ad28921#file-brlog-trunk-test4-20200216-104518-L473-L476 * Two measurements, a-b and a-c, must be interative instead of sequential; the execution time will be easily affected by disturbance (say, cron job or some external process invoked during measurement) * The comparison of the two results must be relative instead of absolute; slow machine may take several tens of seconds for each execution, and one delta second is too small. The test cases of a, b, and c are very extreme, so if the target method has a bug, the two execution times would be very different. So I think it is enough to check if the difference is less than 10 times. This change is the same as https://github.com/ruby/openssl/pull/332
2020-02-16Guard for OpenSSL::PKey::EC::Group::Error with unsupported platformsHiroshi SHIBATA
2020-02-16Import openssl-2.2.0 (#2693)Hiroshi SHIBATA
Import the master branch of ruby/openssl for preparing to release openssl-2.2.0 Notes: Merged-By: hsbt <hsbt@ruby-lang.org>
2020-02-15[ruby/irb] fix reserved words and completion for themNobuhiro IMAI
https://github.com/ruby/irb/commit/6184b227ad
2020-02-15lib/drb/drb.rb: Use ruby2_keywords for keyword separationYusuke Endoh
[Bug #16634]
2020-02-14test/irb/test_completion.rb: suppress a warning: unused literal ignoredYusuke Endoh
2020-02-13Get rid of warnings/exceptions at cleanupNobuyoshi Nakada
After the encoding index instance variable is removed when all instance variables are removed in `obj_free`, then `rb_str_free` causes uninitialized instance variable warning and nil-to-integer conversion exception. Both cases result in object allocation during GC, and crashes.
2020-02-13support multi-run test for test/did_you_mean/test_verbose_formatter.rbS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/2894
2020-02-13Fix remove warning & support multi-run test for ↵S-H-GAMELINKS
test/psych/visitors/test_to_ruby.rb Notes: Merged: https://github.com/ruby/ruby/pull/2893
2020-02-13support multi-run test for test/webrick/test_filehandler.rbS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/2896
2020-02-13test/rubygems/test_gem_commands_setup_command.rb: Allow /bin/envYusuke Endoh
Follow up of 65201c054a90c8e7beb8fe1e6d0006541ac33449
2020-02-13skip SEGV test if RUBY_ON_BUG is specifiedKoichi Sasada
2020-02-13should be compared with called_idKoichi Sasada
me->called_id and me->def->original_id can be different sometimes so we should compare with called_id, which is mtbl's key. (fix GH-PR #2869)
2020-02-13Use inline cache for super callsJohn Hawthorn
Notes: Merged: https://github.com/ruby/ruby/pull/2869
2020-02-12Copy non-inlined encoding indexNobuyoshi Nakada
2020-02-12Make temporary lock string encoding freeNobuyoshi Nakada
As a temporary lock string is hidden, it can not have instance variables, including non-inlined encoding index.
2020-02-12Add test_complete_symbolaycabta
The previous version of the test method used a symbol, ":abcdefg" to complete but longer symbols that can be completed are defined by other test methods of other libs.
2020-02-12test/rubygems: Try not only /usr/bin/env but also /bin/envYusuke Endoh
RubyGems chooses available one from the two https://github.com/rubygems/rubygems/blob/20b0d609484df2b514954ba9ef890a7cbdd01d18/lib/rubygems/installer.rb#L38 So, it is good not to hard-code /usr/bin/env in tests.
2020-02-12test/etc/test_etc.rb: skip some tests on AndroidYusuke Endoh
Android user management seems different from normal Unix system.
2020-02-12Workaround of instance variable on hidden objectNobuyoshi Nakada
Since 9d9aea7fe50f6340829faa105d9ffe08ebaee658, generic instance variables need `iv_index_tbl` in the object's class. As hidden objects, however, have no class, access to the variables causes a segfault. Get rid of that segfault by raising an exception, for the time being.
2020-02-12Isolate the test for Encoding#replicateNobuyoshi Nakada
It has global side effect which cannot be reverted.
2020-02-12Revert "[ruby/irb] Add test_complete_symbol"Hiroshi SHIBATA
This reverts commit 3af3431c2c145134996e66f3d8d9ade8ad81bde0.
2020-02-12[ruby/irb] Fix auto indent with closed braceaycabta
A closed brace in auto-indent shouldn't affect the next brace in the same line, but it behaves like below: p() { } It's a bug. https://github.com/ruby/irb/commit/fbe59e344f
2020-02-12[ruby/irb] Check doc namespace correctlyaycabta
IRB::InputCompletor::PerfectMatchedProc crashes when doc not found because a variable name was incorrect. https://github.com/ruby/irb/commit/889fd4928f
2020-02-12[ruby/irb] Add test_complete_symbolaycabta
https://github.com/ruby/irb/commit/dbbf086c1f
2020-02-11Make yield in singleton class definitions in methods a SyntaxErrorJeremy Evans
This behavior was deprecated in 2.7 and scheduled to be removed in 3.0. Calling yield in a class definition outside a method is now a SyntaxError instead of a LocalJumpError, as well. Notes: Merged: https://github.com/ruby/ruby/pull/2901
2020-02-11Restart timer thread even after preparation failedNobuyoshi Nakada
If the timer thread is left stopped, memory crash or segfault can happen.
2020-02-10Fixed duplicated warningNobuyoshi Nakada
As `command_rhs` is always a "value expression", `command_asgn` does not need the same check. Notes: Merged: https://github.com/ruby/ruby/pull/2897
2020-02-09test/ruby/test_thread_queue.rb: add a wait to yield a threadYusuke Endoh
On Arch, sending a signal in a loop seems hardly to yield the execution. ``` 1) Error: TestThreadQueue#test_queue_with_trap: Timeout::Error: execution of assert_in_out_err expired timeout (10 sec) ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-master/log/20200209T120002Z.fail.html.gz This change allows the test to pass.
2020-02-09[ruby/readline-ext] Use require check instead of DONT_RUN_RELINE_TEST envaycabta
https://github.com/ruby/readline-ext/commit/1df99d1481
2020-02-09[ruby/readline-ext] Check TestRelineAsReadline existanceaycabta
https://github.com/ruby/readline-ext/commit/c0a6303168
2020-02-09Check if bindable against the refined target [Bug #16617]Nobuyoshi Nakada
2020-02-09Disable GC until VM objects get initialized [Bug #16616]Nobuyoshi Nakada
2020-02-07support multi-run test for ↵S-H-GAMELINKS
test/did_you_mean/spell_checking/test_class_name_check.rb Notes: Merged: https://github.com/ruby/ruby/pull/2880
2020-02-07remove warning & support multi-run test for test/psych_test_yaml.rb (#2887)S.H
Notes: Merged-By: nurse <naruse@airemix.jp>
2020-02-07remove warning & support multi-run test for ↵S.H
test/psych/visitors/test_to_ruby.rb (#2881) Notes: Merged-By: nurse <naruse@airemix.jp>
2020-02-07Show unmatched sequence on failureNobuyoshi Nakada
2020-02-07Made a test more robustNobuyoshi Nakada
Against changes of the `assert_separately` prologue code.
2020-02-07Removed useless empty linesNobuyoshi Nakada
2020-02-06Revert "[rubygems/rubygems] Fix require issue with file extension priority"Hiroshi SHIBATA
This reverts commit d767da428c28b7b9fec56b383bb32f6f76c6ad26. It fails with spec/ruby/core/kernel/require_spec.rb:5
2020-02-06Revert to remove the query command of rubygems.Hiroshi SHIBATA
The original commit was https://github.com/rubygems/rubygems/pull/3119
2020-02-06[rubygems/rubygems] Fix require issue with file extension priorityDavid Rodríguez
If `require "a"` is run when two folders have been specified in the -I option including a "a.rb" file and a "a.so" file respectively, the ruby spec says that the ".rb" file should always be preferred. However, the logic we added in https://github.com/rubygems/rubygems/commit/6b81076d9 to make the -I option always beat default gems does not respect this spec, creating a difference from the original ruby-core's require. [the ruby spec says]: https://github.com/ruby/spec/blob/d80a6e2b221d4f17a8cadcac75ef950c59cba901/core/kernel/shared/require.rb#L234-L246 https://github.com/rubygems/rubygems/commit/b3944384f4
2020-02-06[rubygems/rubygems] Make non "test_" method privateDavid Rodríguez
https://github.com/rubygems/rubygems/commit/912d141a35