summaryrefslogtreecommitdiff
path: root/bootstraptest
AgeCommit message (Collapse)Author
2019-01-17merge revision(s) 66832: [Backport #15536]naruse
st.c (rb_hash_bulk_insert_into_st_table): avoid out-of-bounds write "hash_bulk_insert" first expands the table, but the target size was wrong: it was calculated by "num_entries + (size to buld insert)", but it was wrong when "num_entries < entries_bound", i.e., it has a deleted entry. "hash_bulk_insert" adds the given entries from entries_bound, which led to out-of-bounds write access. [Bug #15536] As a simple fix, this commit changes the calculation to "entries_bound + size". I'm afraid if this might be inefficient, but I think it is safe anyway. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@66853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12bootstraptest/runner.rb: increase timeout for --jit-waitk0kubun
because test_io.rb:33 randomly fails http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1519055 checking MJIT.enabled? on driver might not make sense for target, but as long as the CI is -DMJIT_FORCE_ENABLE, I believe it works for now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Simply treat IO::WaitReadable just like Errno::EAGAINusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20revert r65820 and retry assert_finishk0kubun
From: MSP-Greg <greg.mpls@gmail.com> https://github.com/ruby/ruby/commit/5187ea768f57315e61486122d688f1992d4cb21f git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20test_thread.rb: skip test_thread.rb broken for Windowsk0kubun
msys2. https://ci.appveyor.com/project/ruby/ruby/builds/20419607/job/fuvrfcmrhxr1r1cr https://ci.appveyor.com/project/ruby/ruby/builds/20395349/job/2nqewb06b5eanwea https://ci.appveyor.com/project/ruby/ruby/builds/20382452/job/658pvl1cqolyrixm git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-27bootstraptest/test_insns.rb: test newhashfromarraykazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-26fallback env encoding to ASCII-8BITnobu
* hash.c (env_enc_str_new): as no locale/filesystem encoding is available in miniruby on Windows, fallback the encoding to ASCII-8BIT so it is valid encoding when the conversion failed. [ruby-core:89177] [Bug #15164] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-04bootstraptest update test_io.rb [Bug #15060] [Fix GH-1495]nobu
From: MSP-Greg <greg.mpls@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-30bootstraptest/runner.rb: speed up assert_finish with IO.select (take #2)normal
Resurrect r63754 in a 1.8-compatible way. While we're at it, add a note to maintain 1.8 compatibility (cf. r63757). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06Fix a bug of peephole optimizationmame
``` if L1 L0: jump L2 L1: ... L2: ``` was wrongly optimized to: ``` unless L2 L0: L1: ... L2: ``` To make it conservative, this optimization is now disabled when there is any label between `if` and `jump` instructions. Fixes [Bug #14897]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29improve C0 coverage of insns.defshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29rethrow the caught exception as-isnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27tests: increase timeouts and speedup some slow testsnormal
I'm still using the computer from 2005, so enabling MJIT makes some tests take longer. For test_deadlock_by_signal_at_forking I got it down to 135s to 89s by disabling RubyGems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Revert "bootstraptest/runner: speed up assert_finish by avoiding sleep"mame
This reverts commit r63754. Many CI servers still use old ruby as base ruby which does not support read_nonblock. https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180627T013100Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-26bootstraptest/runner: speed up assert_finish by avoiding sleepnormal
We may use IO.select to watch for process exit. This speeds up "make test" by 2 seconds for me. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20error.c: bypass Exception.newnobu
* error.c (rb_exc_new, rb_exc_new_str): instantiate exception object directly without Exception.new method call. Redefinition of class method `new` is an outdated style, and internal exceptions should not be affected by it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09bootstraptest/test_fork.rb: Stop too restrict NPROC test temporarilymame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28`$SAFE` as a process global state. [Feature #14250]ko1
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state. * vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc` objects don't need to keep `$SAFE` at the creation. Also make `is_from_method` and `is_lambda` as 1 bit fields. * cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation. * eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access `vm->safe_level_` directly. * eval_jump.c: End procs `END{}` doesn't keep `$SAFE`. * proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c. * safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes. * safe.c (safe_setter): use `rb_set_safe_level()`. * thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`. It should be obsolete. * transcode.c (load_transcoder_entry): `rb_safe_level()` only returns 0 or 1 so that this check is not needed. * vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc. * vm.c (rb_proc_create): renamed to `proc_create`. * vm.c (rb_proc_dup): moved from proc.c. * vm.c (vm_invoke_proc): do not need to set and restore `$SAFE` for `Proc#call`. * vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer meaning. * lib/drb/drb.rb: restore `$SAFE`. * lib/erb.rb: restore `$SAFE`, too. * test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests. * test/rubygems/test_gem.rb: do not set `$SAFE = 1`. * bootstraptest/test_proc.rb: catch up this change. * spec/ruby/optional/capi/string_spec.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. * test/fiddle/test_func.rb: ditto. * test/fiddle/test_handle.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. * test/pathname/test_pathname.rb: ditto. * test/readline/test_readline.rb: ditto. * test/ruby/test_file.rb: ditto. * test/ruby/test_optimization.rb: ditto. * test/ruby/test_proc.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_thread.rb: ditto. * test/rubygems/test_gem_specification.rb: ditto. * test/test_tempfile.rb: ditto. * test/test_tmpdir.rb: ditto. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-06show the location at intterruptedko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23Drop to support NaCl platform.hsbt
Because NaCl and PNaCl are already sunset status. see https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160 configure.ac: Patch for this file was provided by @nobu. [Feature #14041][ruby-core:83497][fix GH-1726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-21bootstraptest/runner.rb: keyword argumentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-27bootstraptest/test_insns.rb: Fix typok0kubun
on test message. "torexp" insn does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-06Rename RbConfig::Limits as RbConfig::LIMITSnobu
* template/limits.c.tmpl (Init_limits): rename RbConfig::Limits as RbConfig::LIMITS, constants other than class or module are all uppercase with underscores by convention. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-28fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-28Update assertion message [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-10compile.c: apply opt_str_freeze to String#-@ (uminus)normal
The same optimization used for "literal string".freeze can easily apply to uminus without introducing any compatibility problems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30make FIXNUM_MAX visible from Rubyshyouhei
Because our tests now have several places where FIXNUM_MAX is needed, we decided to provide it along with several other constants. * template/limits.c.tmpl: new file, defining RbConfig::Limits * ext/rbconfig/sizeof/depend (limits.c): rule to generate limits.c * test/-ext-/num2int/test_num2int.rb: use RbConfig::Limits * bootstraptest/test_insns.rb: ditto. * .gitignore: ignore new generated file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23improve C0 coverage of insns.def from 65.9% to 96.1%shyouhei
While I was developing my private topic branch I found that the VM itself is not tested very much in `make test` tests. Of course `make test-all` covers vast majority of the VM but running that task is not an immediately possible thing when we are touching the VM. In order to boost development in a rapid cycle I decided to add some tests to the bootstraptest. Here it is. * test_insns.rb: new test that covers insns.def. * runner.rb (#assert_equal): pass extra options to the target so that we can test frozen_string_literal: true situation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-11`\s` includes `\t`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-11bootstraptest/runner.rb: first line in the sourcenobu
* bootstraptest/runner.rb (pretty): remove empty line at the beginning only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30Use qualified namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-07suppress warningsnobu
* basictest/runner.rb, bootstraptest/runner.rb: disable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28bootstraptest/runner.rb may run on older rubynobu
* bootstraptest/runner.rb: do not use safe navigation operator. this runner may run on older ruby. partially revert r53110 (GH-1142 patched by @mlarraz). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17Use Integer instead of Fixnum and Bignum.akr
* object.c, numeric.c, enum.c, ext/-test-/bignum/mul.c, lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rexml/xpath_parser.rb, lib/rubygems/specification.rb, lib/uri/generic.rb, bootstraptest/test_eval.rb, basictest/test.rb, test/-ext-/bignum/test_big2str.rb, test/-ext-/bignum/test_div.rb, test/-ext-/bignum/test_mul.rb, test/-ext-/bignum/test_str2big.rb, test/csv/test_data_converters.rb, test/date/test_date.rb, test/json/test_json_generate.rb, test/minitest/test_minitest_mock.rb, test/openssl/test_cipher.rb, test/rexml/test_jaxen.rb, test/ruby/test_array.rb, test/ruby/test_basicinstructions.rb, test/ruby/test_bignum.rb, test/ruby/test_case.rb, test/ruby/test_class.rb, test/ruby/test_complex.rb, test/ruby/test_enum.rb, test/ruby/test_eval.rb, test/ruby/test_iseq.rb, test/ruby/test_literal.rb, test/ruby/test_math.rb, test/ruby/test_module.rb, test/ruby/test_numeric.rb, test/ruby/test_range.rb, test/ruby/test_rational.rb, test/ruby/test_refinement.rb, test/ruby/test_rubyvm.rb, test/ruby/test_struct.rb, test/ruby/test_variable.rb, test/rubygems/test_gem_specification.rb, test/thread/test_queue.rb: Use Integer instead of Fixnum and Bignum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17fix alignmentkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17[Feature #12005] Unify Fixnum and Bignum into Integerakr
* [Feature #12005] Unify Fixnum and Bignum into Integer * include/ruby/ruby.h (rb_class_of): Return rb_cInteger for fixnums. * insns.def (INTEGER_REDEFINED_OP_FLAG): Unified from FIXNUM_REDEFINED_OP_FLAG and BIGNUM_REDEFINED_OP_FLAG. * vm_core.h: Ditto. * vm_insnhelper.c (opt_eq_func): Use INTEGER_REDEFINED_OP_FLAG instead of FIXNUM_REDEFINED_OP_FLAG. * vm.c (vm_redefinition_check_flag): Use rb_cInteger instead of rb_cFixnum and rb_cBignum. (C): Use Integer instead of Fixnum and Bignum. * numeric.c (fix_succ): Removed. (Init_Numeric): Define Fixnum as Integer. * bignum.c (bignew): Use rb_cInteger instead of Rb_cBignum. (rb_int_coerce): replaced from rb_big_coerce and return fixnums as-is. (Init_Bignum): Define Bignum as Integer. Don't define ===. * error.c (builtin_class_name): Return "Integer" for fixnums. * sprintf.c (ruby__sfvextra): Use rb_cInteger instead of rb_cFixnum. * ext/-test-/testutil: New directory to test. Currently it provides utilities for fixnum and bignum. * ext/json/generator/generator.c: Define mInteger_to_json. * lib/mathn.rb (Fixnum#/): Redefinition removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-06btest: resource limitnobu
* bootstraptest/test_thread.rb: rescue resource limitation errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-14* bootstraptest/runner.rb: use safe navigation operator.hsbt
[fix GH-1142] Patch by @mlarraz * test/openssl/test_pair.rb: ditto. * test/ruby/test_econv.rb: ditto. * test/ruby/test_settracefunc.rb: ditto. * test/thread/test_queue.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10* bootstraptest/test_fork.rb ([ruby-dev:37934]): :NPROC (RLIMIT_NPROC)ngoto
is not supported on some platforms (e.g. Solaris 10). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-24relax error message formatnobu
* bootstraptest/test_method.rb: relax error message format. * test/ruby/test_arity.rb (err_mess): ditto. [Feature #9025], [ruby-core:71178] [Bug #11617] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18* bootstraptest/test_method.rb: remove a test because $SAFE=2 wasko1
obsolete. Please check btest, too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-17* include/ruby/ruby.h: $SAFE=3 is now obsolete.hsbt
* ext/socket/init.c, ext/socket/socket.c, ext/socket/tcpsocket.c ext/socket/udpsocket.c, gc.c, object.c, re.c, safe.c: removed code for $SAFE=3 * bootstraptest/test_method.rb, test/erb/test_erb.rb, test/ruby/test_dir.rb test/ruby/test_file.rb, test/ruby/test_method.rb, test/ruby/test_regexp.rb test/ruby/test_thread.rb: remove tests for $SAFE=3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17default colorsnobu
* bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: shared the default colors from test/colors file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17reset colorsnobu
* bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: reset for each colors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13* string.c (str_discard): does not free for STR_NOFREE string.mame
[Bug #10853][ruby-core:68110] * bootstraptest/test_string.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-29parse.y: condition nodenobu
* parse.y (logop_gen): keep non-null condition node. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-23vm_insnhelper.c: break from nested rescuenobu
* vm_insnhelper.c (vm_throw_start): search the target to break from a block with nested rescue, from the nested blocks. [ruby-core:67765] [Bug #10775] [Fix GH-820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07normalize reference to Timeout::Errornormal
From: John Bachir <j@jjb.cc> * bootstraptest/test_io.rb (assert_finish): normalize rescue for Timeout::Error * lib/net/ftp.rb (Net#read_timeout): ditto for doc * lib/resolv.rb (Resolv::ResolvTimeout): ditto for subclass * lib/webrick/httprequest.rb (_read_data): ditto for rescue * sample/timeout.rb (p timeout): ditto for call * test/drb/drbtest.rb (test_06_timeout): ditto * test/ruby/test_readpartial.rb (test_open_pipe): ditto * test/thread/test_queue.rb (test_queue_thread_raise): ditto * thread.c (rb_thread_s_handle_interrupt): ditto for doc [ruby-core:65481] [misc #10339] TimeoutError is a legacy constant, Timeout::Error is the canonical constant. This patch normalizes all code and comments to reference Timeout::Error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-21wait until the thread is stopped.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28test_fork.rb: wait signalsnobu
* bootstraptest/test_fork.rb: wait until receiving both singals, upto 0.1sec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e