summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-02-26Fixed for older versionsNobuyoshi Nakada
Fix up 66d1900423e6fb9774c2fe72dba8c2968b54d7ab, `RubyVM::MJIT` is available since ruby 2.6.
2020-02-25Increase timeout for CSV test with --jit-waitTakashi Kokubun
To prevent CI failures like http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2739995
2020-02-25Prefer dedicated assertion methodNobuyoshi Nakada
2020-02-25should count only string.Koichi Sasada
This code can generate CC objects so we only need to count existing String objects.
2020-02-24Fixed symbol misused as IDNobuyoshi Nakada
`rb_funcallv_public` and `rb_respond_to` require an `ID`, not a `Symbol`. [Bug #16649]
2020-02-23Warn non-nil `$/` [Feature #14240]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2920
2020-02-23Warn non-nil `$\` [Feature #14240]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2920
2020-02-23Warn non-nil `$,` in `IO#print` tooNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2920
2020-02-22Proc from Symbol needs a receiverNobuyoshi Nakada
So its arity should be -2 instead of -1. [Bug #16640] https://bugs.ruby-lang.org/issues/16640#change-84337
2020-02-22test/readline - allow ENV control of test class creationMSP-Greg
In ruby/ruby, the tests run on both readline & reline by creating four test classes: ``` TestReadline TestReadlineHistory TestRelineAsReadline TestRelineAsReadlineHistory ``` Reline inports the test files and uses them in its CI. Adding the ENV control allows it to only run the `TestRelineAsReadline` classes. Notes: Merged: https://github.com/ruby/ruby/pull/2916
2020-02-22* remove trailing spaces. [ci skip]git
2020-02-22Introduce disposable call-cache.Koichi Sasada
This patch contains several ideas: (1) Disposable inline method cache (IMC) for race-free inline method cache * Making call-cache (CC) as a RVALUE (GC target object) and allocate new CC on cache miss. * This technique allows race-free access from parallel processing elements like RCU. (2) Introduce per-Class method cache (pCMC) * Instead of fixed-size global method cache (GMC), pCMC allows flexible cache size. * Caching CCs reduces CC allocation and allow sharing CC's fast-path between same call-info (CI) call-sites. (3) Invalidate an inline method cache by invalidating corresponding method entries (MEs) * Instead of using class serials, we set "invalidated" flag for method entry itself to represent cache invalidation. * Compare with using class serials, the impact of method modification (add/overwrite/delete) is small. * Updating class serials invalidate all method caches of the class and sub-classes. * Proposed approach only invalidate the method cache of only one ME. See [Feature #16614] for more details. Notes: Merged: https://github.com/ruby/ruby/pull/2888
2020-02-22VALUE size packed callinfo (ci).Koichi Sasada
Now, rb_call_info contains how to call the method with tuple of (mid, orig_argc, flags, kwarg). Most of cases, kwarg == NULL and mid+argc+flags only requires 64bits. So this patch packed rb_call_info to VALUE (1 word) on such cases. If we can not represent it in VALUE, then use imemo_callinfo which contains conventional callinfo (rb_callinfo, renamed from rb_call_info). iseq->body->ci_kw_size is removed because all of callinfo is VALUE size (packed ci or a pointer to imemo_callinfo). To access ci information, we need to use these functions: vm_ci_mid(ci), _flag(ci), _argc(ci), _kwarg(ci). struct rb_call_info_kw_arg is renamed to rb_callinfo_kwarg. rb_funcallv_with_cc() and rb_method_basic_definition_p_with_cc() is temporary removed because cd->ci should be marked. Notes: Merged: https://github.com/ruby/ruby/pull/2888
2020-02-22`Proc` made by `Symbol#to_proc` should be a lambda [Bug #16260]Nobuyoshi Nakada
With refinements, too.
2020-02-22`Proc` made by `Symbol#to_proc` should be a lambda [Bug #16260]Nobuyoshi Nakada
2020-02-21[ruby/irb] `yield` outside method definition is a syntax errorNobuyoshi Nakada
https://github.com/ruby/irb/commit/dbc7b059c7
2020-02-21Promote net-http to the default gems.Hiroshi SHIBATA
test/net/http/test_https.rb: rename fixture methods to read_fixture because it conflicts with test-unit gem.
2020-02-20[ruby/rdoc] Removed `RDoc::Context::Section#sequence`Nobuyoshi Nakada
It has been deprecated since 2011. https://github.com/ruby/rdoc/commit/5c2aa0f77d
2020-02-20TestTime#test_memsize: skip when on GC_DEBUG卜部昌平
GC_DEBUG=1 makes this test fail because it changes the size of struct RVALUE. I don't think the test is useful then. Let's just skip.
2020-02-18Avoid jumping to a wrong destinationTakashi Kokubun
when the next insn is already compiled by former branches.
2020-02-19support multi-run test for test_readline.rbS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/2914
2020-02-18Pass keyword arguments to IOs properly [Bug #16639]Nobuyoshi Nakada
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.