310 Commits

Author SHA1 Message Date
Yusuke Endoh
847e25975c Skip JIT tests on riscv64 due to SEGV of cc1 2020-04-20 22:48:10 +09:00
Takashi Kokubun
2832ba80d6
The pdb header error is printed at stdout
https://ci.appveyor.com/project/ruby/ruby/builds/32278754/job/90jmky2jq2k0wjv8
2020-04-18 18:40:01 -07:00
Takashi Kokubun
f8b79ef567
Compilation error does not impact exit status
We failed to ignore
https://ci.appveyor.com/project/ruby/ruby/builds/32245902/job/xcfxw67uexxysvni
2020-04-17 10:11:47 -07:00
Takashi Kokubun
f888626552
Fix logic to detect vs120
MJIT_CC seems not defined
https://ci.appveyor.com/project/ruby/ruby/builds/32161572/job/u5sw8yn4in87heki
2020-04-13 23:48:40 -07:00
Takashi Kokubun
e667750364
Add missing call in 70b7304f03 2020-04-13 23:11:51 -07:00
Takashi Kokubun
70b7304f03
Ignore AppVeyor vs120's pdb corruption
We tried to fix this like https://github.com/ruby/ruby/pull/3029, but it
didn't work. The failure has never been helpful for developing MJIT, and
currently it's not prioritized to be fixed. Until we try to figure out
the root cause on AppVeyor vs120, let's optionally disable testing when
the random corruption happens.
2020-04-13 23:08:25 -07:00
Takashi Kokubun
b736ea63bd
Optimize exivar access on JIT-ed getivar
JIT support of dd723771c11.

$ benchmark-driver -v --rbenv 'before;before --jit;after --jit' benchmark/mjit_exivar.yml --repeat-count=4
before: ruby 2.8.0dev (2020-03-30T12:32:26Z master e5db3da9d3) [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-03-30T12:32:26Z master e5db3da9d3) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-03-31T05:57:24Z mjit-exivar 128625baec) +JIT [x86_64-linux]
Calculating -------------------------------------
                         before  before --jit  after --jit
         mjit_exivar    57.944M       53.579M      54.471M i/s -    200.000M times in 3.451588s 3.732772s 3.671687s

Comparison:
                      mjit_exivar
              before:  57944345.1 i/s
         after --jit:  54470876.7 i/s - 1.06x  slower
        before --jit:  53579483.4 i/s - 1.08x  slower
2020-03-30 23:16:35 -07:00
Takashi Kokubun
9745e90197
Propagate JIT skip to all tests 2020-03-06 20:19:56 -08:00
Yusuke Endoh
16415fefc1 test/lib/jit_support.rb: The path to icc was changed 2020-03-04 12:31:55 +09:00
Yusuke Endoh
6477d98e49 test/lib/jit_support.rb: Update the regexp for icc
MJIT_CC is always an absolute path.
2019-12-05 23:46:42 +09:00
Takashi Kokubun
5fbb4555b4
Prefer using MJIT_CC for JIT support check
because Solaris might have CC=cc and we'd like to check full path
MJIT_CC=/opt/developerstudio12.5/bin/cc instead.
2019-12-04 22:16:08 -08:00
Takashi Kokubun
b3ea0980db
Check MJIT support in one place
to fix test failure on trunk-no-mjit
https://gist.github.com/ko1/32ab982ffd7555988818773c08f97123
2019-12-01 10:53:59 -08:00
Takashi Kokubun
4ccb49bad3
Enforce --jit-debug test by another way 2019-10-15 22:47:20 -07:00
Takashi Kokubun
5d8f112505
RubyVM::MJIT.pause(wait: true) should wait
for all compilations and compaction.

Prior to this commit, the last-compiled code has not been used because
MJIT worker is stopped before setting the code, and compaction has also
been skipped.

But it was not intentional and `wait: true` pause should wait until
those two things by its feature.
2019-09-26 16:28:34 +09:00
Takashi Kokubun
cda5745c1b
Automatically detect missing symbols
which are usually optimized away by -O3.

This CI can detect missing exports like
ea84a680755b5a7fa700618cbe78e3b2fc7be01d which was needed for
761346a9604ca2c79777d1d67fb5dcc3c30dbf69.
2019-09-01 16:31:15 +09:00
Hiroshi SHIBATA
9f275f7971
Restore support library for only test files that are digest and csv. 2019-07-09 21:16:49 +09:00
Hiroshi SHIBATA
f9a2440866
Restore support library for only test files. 2019-07-09 21:04:07 +09:00
Hiroshi SHIBATA
c3c0e3f5c9 Move to tool/lib from test/lib. 2019-07-02 07:59:54 +09:00
Nobuyoshi Nakada
f13fb814e0
Return the result of the block given to assert_warning/assert_no_warning 2019-07-01 00:22:39 +09:00
Nobuyoshi Nakada
41012f2e2b
Add parentheses to suppress warnings 2019-06-30 11:41:10 +09:00
Nobuyoshi Nakada
f5e2904471
Use EXEEXT
* test/lib/minitest/unit.rb (MiniTest::Assertions.diff): use
  `EXEEXT` configured value instead of switching by hard coded
  `host_os`.
2019-06-22 23:48:21 +09:00
Nobuyoshi Nakada
bad66f3e36
Show timed out threads
* test/lib/test/unit/assertions.rb (assert_join_threads): kill and
  show timed out threads.
2019-06-22 18:39:06 +09:00
Nobuyoshi Nakada
4d650bc257
Fix over-expansion
* test/lib/minitest/unit.rb (MiniTest::Assertions#mu_pp_for_diff):
  do not expand escaped backslash followed by 'n'.
2019-06-22 09:29:33 +09:00
Nobuyoshi Nakada
50bb8b6052
Use Exception#full_message for traceback 2019-06-14 08:46:22 +09:00
Yusuke Endoh
e75c278183 test/lib/test/unit/assertions.rb (assert_cpu_usage_low): tweak the wait
It still fails randomly.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/amazon2/ruby-master/log/20190613T093003Z.fail.html.gz
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20190613T051547Z.fail.html.gz
2019-06-13 22:44:01 +09:00
Nobuyoshi Nakada
c4cbaef216
assert_cpu_usage_low with timeout scale
* test/lib/test/unit/assertions.rb (assert_cpu_usage_low): apply
  the timeout scale to measuring period.  this assertion is very
  runtime environment dependent.
2019-06-11 23:15:46 +09:00
Nobuyoshi Nakada
42f0a8fd6f
MIN_HZ and MIN_MEASURABLE constants
* test/lib/test/unit/assertions.rb (Test::Unit::Assertions):
  promoted MIN_HZ and MIN_MEASURABLE as constants, which should be
  constant through the process.
2019-06-11 23:15:46 +09:00
Nobuyoshi Nakada
eb016d8353
Generalize timeout_scale
* test/lib/test/unit.rb (Test::Unit::TimeoutOption): renamed
  SubprocessOption.

* test/lib/test/unit.rb (Test::Unit::TimeoutOption#setup_options):
  prefer `--timeout-scale` option.

* test/lib/test/unit.rb (Test::Unit::TimeoutOption#non_options):
  prefer `ENV["RUBY_TEST_TIMEOUT_SCALE"]`.
2019-06-11 23:15:46 +09:00
Yusuke Endoh
4adc6f07ef test/lib/test/unit/assertions.rb (assert_cpu_usage_low): Relax the limit
CPU usage 1% causes occesional test failure.  Try to use 5%.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-master/log/20190604T153002Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-master/log/20190610T153002Z.fail.html.gz
2019-06-11 07:17:59 +09:00
Nobuyoshi Nakada
ffaefcadd8
Report a sudden death of workers 2019-06-07 23:49:13 +09:00
Nobuyoshi Nakada
51d27d25d7
test/lib/test/unit.rb: use colorize.rb 2019-06-04 18:51:49 +09:00
Yusuke Endoh
4668a3a9da test/lib/envutil.rb (EnvUtil.timeout): added.
It is a wrapper for Timeout.timeout with the scale factor applied.
2019-05-26 17:23:14 +09:00
Nobuyoshi Nakada
23375c8b81
Make only mesg can be assigned with default fname 2019-04-29 13:42:50 +09:00
nobu
3ee0648dc7 io.c: warn non-nil $,
* array.c (rb_ary_join_m): warn use of non-nil $,.

* io.c (rb_output_fs_setter): warn when set to non-nil value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-18 21:56:55 +00:00
nobu
15f8fb34fa Show the code in syntax assertions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-30 11:58:07 +00:00
nobu
bdc36b360e Ensure to terminate the child
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-11 01:18:59 +00:00
k0kubun
d31cbd4ff9 test_jit.rb: change format of test error output
to avoid breaking redmine quote like
https://bugs.ruby-lang.org/issues/15522

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 14:55:24 +00:00
k0kubun
fa3fda1c62 jit_support.rb: deal with -std=c99 flag
CC is changed from "icc" to "icc -std=c99" by r66605.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181228T130003Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28 14:12:42 +00:00
k0kubun
e1930666c7 test/mkmf/test_flags.rb: try to suppress random CI failure
on AIX ppc
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20181226T113305Z.fail.html.gz

test/lib/test/unit/assertions.rb: ditto, for TestIO#test_copy_stream_no_busy_wait

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27 16:24:46 +00:00
k0kubun
45918161a8 jit_support.rb: skip testing MJIT on oracle developer studio
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27 14:53:02 +00:00
normal
05da6568c2 test/lib/test/unit.rb: do not propagate MAKEFLAGS to children
Propagating MAKEFLAGS to children running test/unit caused stuck
tests with GNU make when "-jN" is passed in both the make(1)
command-line and the "TESTS=" variable; because the forked child
process would see MAKEFLAGS and try to use jobserver on its own.

This is regression caused by r64399
(commit b53fadfd5f200dbd6fe9f4b2a91ebb68618e59bb,
"process.c: defaults to close_others false");
but that change also fixed a regression when close-on-exec
became the default in 2.0 :<

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-15 04:40:14 +00:00
nobu
f837601cdb mjit_build_dir: separate MJIT_BUILD_DIR
* Makefile.in (mjit_build_dir.so): separate MJIT_BUILD_DIR to
  eliminate the feature for test-all after installation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07 02:49:26 +00:00
nobu
b11b804f8f Revert "mjit_build_dir: separate MJIT_BUILD_DIR"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06 05:14:36 +00:00
nobu
a39080f59c mjit_build_dir: separate MJIT_BUILD_DIR
* Makefile.in (mjit_build_dir.so): separate MJIT_BUILD_DIR to
  eliminate the feature for test-all after installation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06 04:13:48 +00:00
mame
c9d720b873 parse.y: remove "shadowing outer local variable" warning
You can now write the following without warning.

    user = User.all.find {|user| cond(user) }

Fixes [Feature #12490].
A patch from Soutaro Matsumoto <matsumoto@soutaro.com>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26 03:10:02 +00:00
mame
b171d92046 Revert "parse.y: remove "shadowing outer local variable" warning"
I forgot to add the copyright of the patch...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26 03:08:10 +00:00
mame
7f69d4e41f parse.y: remove "shadowing outer local variable" warning
You can now write the following without warning.

  user = User.all.find {|user| cond(user) }

Fixes [Feature #12490].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26 02:54:01 +00:00
nobu
95256bcf97 test/unit.rb: glob w/o prefix/suffix
* test/lib/test/unit.rb (Test::Unit::GlobOption#non_options): glob
  the given pattern as-is under the TESTSDIR without the prefix
  nor the suffix, when it has separator(s) but does not end with a
  separator nor is not a directory.  e.g.:

      make test-all TESTS='ruby/test_time*'

  runs `ruby/test_time.rb` and `ruby/test_time_tz.rb` only, like
  as the following:

      make test-all TESTS='$(TESTSDIR)/ruby/test_time*'

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23 14:26:23 +00:00
nobu
f7add52f8f test/unit.rb: fixed wrong method name
* test/lib/test/unit.rb (Test::Unit::Parallel#deal): fixed wrong
  method name at r36388.

* test/testunit/test_parallel.rb (TestParallel::TestParallel#test_separate):
  refine the pattern to process IDs but not backtrace lines, and
  add a better message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23 14:17:16 +00:00
k0kubun
1d6c1e27d4 test/lib/test/unit/assertions.rb: skip memory leak check
for all test cases on MJIT. In addition to those 2 tests,
TestAutoload#test_no_leak newly failed and most of assert_no_memory_leak
usages are likely to randomly fail.

Let me just skip all of them but let's revisit this to check it properly later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23 01:13:38 +00:00