summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-10-20add disabling MJIT features option.ko1
* configure.ac: introduce new configure option `--enable-mjit` and `--disable-mjit`. Default is "enable". `--disable-mjit` disables all of MJIT features so that `ruby --jit` can't enable MJIT. This option affect a macro `USE_MJIT`. This change remove `--enable/disable-install-mjit-header` option. * Makefile.in: introduce the `ENABLE_MJIT` variable. * common.mk: use `ENABLE_MJIT` option. * internal.h: respect `USE_MJIT`. Same as other *.c, *.h. * test/ruby/test_jit.rb: check `ENABLE_MJIT` key of rbconfg.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20ext/coverage/: add the oneshot modemame
This patch introduces "oneshot_lines" mode for `Coverage.start`, which checks "whether each line was executed at least once or not", instead of "how many times each line was executed". A hook for each line is fired at most once, and after it is fired, the hook flag was removed; it runs with zero overhead. See [Feature #15022] in detail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Merge Pysch-3.1.0.pre2 from ruby/psych.hsbt
* Added deprecated warnings for the new interface of keyword argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20complex.c: small optimization of Complex#**nobu
* complex.c (rb_complex_pow): calculate power of a Fixnum without allocating intermediate Complex objects, and avoid unexpected NaNs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20try to use System Monitor Controlsuke
* test/win32ole/test_win32ole_type_event.rb: try to use System Monitor Control to test. ADO is not available in AppVeyor(Mingw only?) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20test_win32ole_event.rb: fire message_loop on retryk0kubun
because it's failing even after sleeping 31s in total. https://ci.appveyor.com/project/ruby/ruby/builds/19642619/job/pkaj5svr8glk8twt https://ci.appveyor.com/project/ruby/ruby/builds/19641381/job/spdvrptpaq1d5778 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19mjit.c: don't let MJIT.pause hang on full active unitsk0kubun
test/ruby/test_rubyvm_mjit.rb: add reproductive test [Bug #15071] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19test/lib/jit_support.rb: continue to skip test_jitk0kubun
for icc since it's not supported yet but running on rubyci. This reverts some part of r65175, r65176 and r65177. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19test_rubyoptions.rb: don't use obsoleted methodk0kubun
It was removed on r65175. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19test_rubyvm_mjit.rb: don't use obsoleted methodk0kubun
It was removed on r65175. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19test/lib/jit_support.rb: fire test_jit everywherek0kubun
That was a workaround to make rubyci green for a short term after the MJIT merge. As we've done many portability fixes for MJIT, let's try running test_jit on all rubyci platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-18openssl: sync with upstream repositoryrhe
Import current master (01b23fa8eee2) of ruby/openssl.git. ---------------------------------------------------------------- Kazuki Yamaguchi (3): x509name: fix OpenSSL::X509::Name#{cmp,<=>} Ruby/OpenSSL 2.0.9 Ruby/OpenSSL 2.1.2 nobu (2): needs openssl/opensslv.h Remove -Wno-parentheses flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-17infect taint flag on Array#pack and String#unpacknagachika
with the directives "B", "b", "H" and "h". * pack.c (pack_pack, pack_unpack_internal): infect taint flag. * test/ruby/test_pack.rb: add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-17Merge rdoc-6.1.0.beta2aycabta
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-15regparse.c: Suppress duplicated range warning by mere \Xnobu
* regparse.c (node_extended_grapheme_cluster): as Unicode 10 has added Grapheme_Cluster_Break properties to some characters, remove duplicated ranges for Unicode 9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-14_mjit_compile_getivar.erb: optimize IC-hit getivark0kubun
by inlining index (and serial to invalidate that) and simplifying the branch by using JIT cancellation. mjit_compile.inc.erb: use the above file mjit_compile.c: copy USE_IC_FOR_IVAR definition. will move this to another shared file later. common.mk: add new dependency test/ruby/test_jit.rb: cover this case === Optcarrot benchmark === ``` $ benchmark-driver benchmark.yml --rbenv '2.0.0::2.0.0-p648;before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24 2.0.0: ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux] before: ruby 2.6.0dev (2018-10-14 trunk 65072) [x86_64-linux] before+JIT: ruby 2.6.0dev (2018-10-14 trunk 65072) +JIT [x86_64-linux] after: ruby 2.6.0dev (2018-10-14 trunk 65072) [x86_64-linux] last_commit=_mjit_compile_getivar.erb: optimize IC-hit getivar after+JIT: ruby 2.6.0dev (2018-10-14 trunk 65072) +JIT [x86_64-linux] last_commit=_mjit_compile_getivar.erb: optimize IC-hit getivar Calculating ------------------------------------- 2.0.0 before before+JIT after after+JIT Optcarrot Lan_Master.nes 36.065 53.896 71.565 53.856 84.747 fps Comparison: Optcarrot Lan_Master.nes after+JIT: 84.7 fps before+JIT: 71.6 fps - 1.18x slower before: 53.9 fps - 1.57x slower after: 53.9 fps - 1.57x slower 2.0.0: 36.1 fps - 2.35x slower ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13tests: support Linux kernels with CONFIG_IPV6=nnormal
Detecting the presence of constants in C headers is insufficient, as a Linux kernel can be built with CONFIG_IPV6=n git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13use ADODB.Connection instead of Microsoft Internet Controls.suke
* test/win32ole/test_win32ole_type.rb: remove test using Microsoft Internet Controls. * test/win32ole/test_win32ole_type_event.rb: some test uses ADODB.Connection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13remove Microsoft Internet Controlsuke
* test/win32ole/test_win32ole_param: remove Microsoft Internet Control. * test/win32ole/test_win32ole_param_event: use ADODB instead of Microsoft Internet Control for test_input?, test_output? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12use assert_equal instead of assertsuke
* test/win32ole/test_win32ole_param.rb (test_input?, test_output, test_optional, test_retval?): use assert_equal instead of assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12remove duplicate assertionsuke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12test/win32ole/test_win32ole_event.rb: wait longerk0kubun
for unstable spec. I added r64963 but it couldn't rescue: https://ci.appveyor.com/project/ruby/ruby/builds/19451743/job/hg0tyoxbacrrlnsr Since #test_on_event is especially unstable, https://ci.appveyor.com/project/ruby/ruby/builds/19337514/job/0wp2oe9dkr9gt1bi https://ci.appveyor.com/project/ruby/ruby/builds/19451743/job/hg0tyoxbacrrlnsr this commit lets it sleep longer as needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12use ADODB.connection instead of Microsoft Internet Controlssuke
* test/win32ole/test_win32ole_method.rb: remove test using Microsoft Internet Controls. * test/win32ole/test_win32ole_method_event.rb: add test using ADODB.connection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12Load as FIXOFF mode if zone is presentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-09Add tests for another timezonenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-09Time.parse based from non-Time objectnobu
* lib/time.rb (Time.make_time): as the document states, the second argument of `Time.parse` may be a non-`Time` object which does not have `getlocal` method, assume it is in the local time in the case. based on the patch by nkmrya (Yasuhiro Nakamura) at [ruby-core:68775]. [ruby-core:68775] [Bug #11037] Co-authored-by: nkmrya (Yasuhiro Nakamura) <yasuhiro6194@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-09ext/objspace/objspace_dump.c: print addresses consistentlynobu
The format addresses are printed in are different if you use `ObjectSpace.dump_all(output: :stdout)` vs. `ObjectSpace.dump_all(output: :string)` (or `ObjectSpace.dump`) due to differences in the underlying `vfprintf` implementation. Use `"%#"PRIxVALUE` to format `VALUE`. Co-authored-by: Ashe Connor <ashe@kivikakk.ee> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-09Revert "ext/objspace/objspace_dump.c: print addresses consistently"naruse
This reverts commit r64970. Visual C++ 12.0 doesn't have PRIxPTR. Anyway we have our own vfprintf implementation BSD_vfprintf(). If you want to have portable vfprintf, replace it with BSD_vfprintf like vsnprintf or just use BSD_vfprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08ext/objspace/objspace_dump.c: print addresses consistentlytenderlove
The format addresses are printed in are different if you use `ObjectSpace.dump_all(output: :stdout)` vs. `ObjectSpace.dump_all(output: :string)` (or `ObjectSpace.dump`) due to differences in the underlying `vfprintf` implementation. Use %"PRIxPTR" instead to be consistent across both. Co-authored-by: Ashe Connor <ashe@kivikakk.ee> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08include/ruby/ruby.h: import external symbolsk0kubun
properly on MinGW MJIT. test_jit.rb: all MJIT tests are now passing on MinGW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08test_win32ole_event.rb: sleep longerk0kubun
to increase the possibility of TestWIN32OLE_EVENT_SWbemSink#test_on_event success. It seems to randomly fail https://ci.appveyor.com/project/ruby/ruby/builds/19337514/job/0wp2oe9dkr9gt1bi git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08Add test for marshalnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08Removed redundant suffix `_with_timezone`nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08Timezone at Time#+ and Time#-nobu
* time.c (time_add): support for Timezone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08Timezone support by Time [Feature #14850]nobu
* strftime.c (rb_strftime): support timezone object by `%z`. * time.c (time_init_1, time_new_timew, time_getlocaltime): accept timezone object as `off`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08test_jit.rb: skip to test tempdir emptinessk0kubun
on AppVeyor mswin. It's somehow failing and not reproductive on my environment. We're suspecting maybe somebody is still holding module handle, even while FreeLibrary is finished successfully. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07appveyor.yml: completely separate win32ole testsk0kubun
because r64938 was not enough and another win32ole test file (`test_win32ole_type.rb`) crashed worker. https://ci.appveyor.com/project/ruby/ruby/builds/19321161/job/ue1qrphi5j1xxgu6 Let's run whole win32ole test suite separately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07mjit_worker.c: clean up all unnecessary files on mswink0kubun
test_jit.rb: passed all MJIT tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07appveyor.yml: give up running TestThreadQueue#test_queue_with_trapk0kubun
for mswin. We tried to increase timeout and execute separately but both didn't work. Let me skip this until somebody starts to work on fixing this behavior, since this makes AppVeyor almost impossible to be used as CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07mjit.h: introduce MJIT_STATIC for full mswin JIT supportk0kubun
This change resolves most of major remaining MJIT bugs on mswin. Since Visual Studio doesn't support generating pre-processed code preserving macros, we can't use transform_mjit_header approach for mswin. So we need to transform MJIT header using macro like this. vm.c: use MJIT_STATIC for non-static functions that exist on MJIT header and cause conflict on link. vm_insnhelper.c: ditto test_jit.rb: remove many skips for mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07appveyor.yml: separately execute unstable testsk0kubun
without -j option. Those 2 tests are too unstable on AppVeyor. test/excludes/TestThreadQueue.rb: The most unstable test ever. That even fails on my machine too. This may be possibly because recent SIGCHLD-related changes. https://ci.appveyor.com/project/ruby/ruby/build/9795/job/l9t4w9ks7arsldb1 test/excludes/TestWin32OLE.rb: I saw that win32ole crashes test-all several times. https://ci.appveyor.com/project/ruby/ruby/build/9811/job/ra5uxf2cg6v7ohag git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07test_jit.rb: skip some testsk0kubun
that don't succeed on MinGW after r64929 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-05Use binread because webrick also uses binreadnaruse
Reported-by: MSP-Greg [Bug #15203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-05Add difference method to Arraynobu
I introduce a `difference` method equivalent to the `-` operator, but which accept more than array as argument. This improved readability, and it is also coherent with the `+` operator, which has a similar `concat` method. The method doesn't modify the original object and return a new object instead. I plan to introduce a `difference!` method as well. Tests and documentation are included. It solves partially https://bugs.ruby-lang.org/issues/14097 From: Ana María Martínez Gómez <ammartinez@suse.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-02Just a shebang is valid codenobu
[ruby-core:89240] [Bug #15190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-02Fix Rational of Floatnobu
[ruby-core:89239] [Bug #15189] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-01Removed Windows version conditionnobu
Seems all MSVC runtimes fails with EINVAL, regardless Windows version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-29rational.c: may be floatnobu
* rational.c (f_muldiv): Integer#** can return Rational with Float right now. [ruby-core:89212] [Bug #15175] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-28range.c: Add Range#%mrkn
[Feature #14697] [ruby-core:86588] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-26* ext/win32ole/lib/win32ole.rb (methods): COM method elements should besuke
symbol in return value of methods. * test/win32ole/test_win32ole.rb ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e