Граф коммитов

99 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 186fd89086 [ruby/rinda] Use omit instead of skip for test-unit
https://github.com/ruby/rinda/commit/1d3512aa26
2022-01-12 10:59:21 +09:00
Takashi Kokubun 1a63468831
Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
Takashi Kokubun e1fee7f949
Rename RubyVM::MJIT to RubyVM::JIT
because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.

[Feature #17490]
2021-01-13 22:46:51 -08:00
Benoit Daloze b4ec4a41c2 Guard all accesses to RubyVM::MJIT with defined?(RubyVM::MJIT) &&
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
2020-12-04 16:45:54 +01:00
Yusuke Endoh 09dd9d8e5d Revert "test/rinda/test_rinda.rb: try debugging TestRingServer#test_do_reply"
This reverts commit de5e8d0e3b.

Remove the debugging code that is no longer needed
2020-10-17 15:32:40 +09:00
Yusuke Endoh 6a9e09824b Revert "test/rinda/test_rinda.rb: Add more debugging code"
This reverts commit ac803ab55d.

Remove debugging code that is no longer needed
2020-10-17 15:32:19 +09:00
Yusuke Endoh 5c003b4bcd test/rinda/test_rinda.rb: Prevent a callback Proc from being GC'ed
According to the log of ac803ab55d, I
found that a thread terminates silently due to "recycled object" of
id2ref:

```
"/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:366:in `_id2ref'"
"/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:366:in `to_obj'"
"/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:1528:in `to_obj'"
"/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:1847:in `to_obj'"
"/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:1136:in `method_missing'"
"/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/test/rinda/test_rinda.rb:652:in `block in do_reply'"
```
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201017T033002Z.log.html.gz

I believe that this unintentional thread termination has caused
intermittent timeout failure of `TestRingServer#test_do_reply`.

The root cause of the "recycled object" issue is a bug of
`TestRingServer#test_do_reply`.  It creates a callback Proc object but
does not hold the reference to the object:

```
callback = DRb::DRbObject.new callback
```

The original "callback" object is GC'ed unintentionally.
I could consistently reproduce this issue on my machine by adding
`GC.stress = true` at the first of `_test_do_reply` method body.

This change uses another local variable name, "callback_orig", to keep
the original Proc object.
2020-10-17 15:17:55 +09:00
Yusuke Endoh ac803ab55d test/rinda/test_rinda.rb: Add more debugging code
in addition to de5e8d0e3b
2020-10-17 00:07:35 +09:00
Yusuke Endoh de5e8d0e3b test/rinda/test_rinda.rb: try debugging TestRingServer#test_do_reply
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201016T063003Z.fail.html.gz
```
  1) Error:
Rinda::TestRingServer#test_do_reply:
Timeout::Error: timeout
    /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:837:in `sleep'
    /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:837:in `wait_for'
    /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:659:in `_test_do_reply'
    /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:643:in `block in test_do_reply'
    /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:807:in `with_timeout'
    /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:643:in `test_do_reply'
```
2020-10-16 16:51:33 +09:00
Takashi Kokubun 609ac6ee2c
Revert "Try increasing read timeout of rinda tests"
This reverts commit 5c03e4680e.

I gave up stabilizing Rinda::TupleSpaceProxyTest#test_cancel_02. As the
test uses sleep, it's probably not gonna be stable with --jit-wait.

http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3028276
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3028065
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3027857
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3027441
2020-06-26 22:43:59 -07:00
Takashi Kokubun 5c03e4680e
Try increasing read timeout of rinda tests
To prevent random failure with --jit-wait like
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3026615
2020-06-25 22:11:56 -07:00
Hiroshi SHIBATA 7473b4c106
Explicitly loading with envutil.rb 2020-05-28 14:41:08 +09:00
Yusuke Endoh b4711a0fa0 test/rinda/test_rinda.rb: Increase the timeout
Attempts to fix a occational failure on Solaris with sunc

https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20200124T160008Z.fail.html.gz
```
  1) Error:
Rinda::TestRingServer#test_do_reply:
Timeout::Error: timeout
```
2020-01-25 14:14:05 +09:00
Kazuhiro NISHIYAMA 8b07c122b7
Stop pool threads in test/rinda too 2019-12-09 13:46:23 +09:00
Kazuhiro NISHIYAMA 14eede6e53
Fix `Leaked thread`
Sometimes `Leaked thread: Rinda::TestRingServer#test_ring_server_ipv6_multicast` happens
because `Rinda::TupleSpace#start_keeper` runs after stopping `@keeper`.
2019-07-31 17:45:43 +09:00
k0kubun 575735664b Add debug message for test_rinda crash
We often see test-all worker crash on test_rinda, but for now we even
can't know which test is unstable from this output:
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1926481

Let me print `caller` on the timeout failure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-07 08:18:09 +00:00
k0kubun e7477a949c [bug:8215] seems to be still broken on mswin
This test fails on AppVeyor mswin so often:
https://ci.appveyor.com/project/ruby/ruby/builds/23427134/job/rowv0dohwni0xa37
https://ci.appveyor.com/project/ruby/ruby/builds/22970385/job/qdkqus13bhnyyfxf
https://ci.appveyor.com/project/ruby/ruby/builds/22970385/job/o4k8keg95ltcryoe

Maybe it's related to https://bugs.ruby-lang.org/issues/15569.
As this test is harmful for mswin CI reliability, let me skip this at
least until somebody fixes the above issue.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-28 15:37:45 +00:00
naruse 0deeb1aeb6 Call DRb.start_service with setup/teardown
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 08:47:42 +00:00
k0kubun 8ca727d80f test_rinda.rb: give up stabilizing this test
on --jit-wait. It's randomly failing and it's unlikely to be detecting
any MJIT's bug.

https://app.wercker.com/ruby/ruby/runs/mjit-test2/5c5c2339940b5200f01a0822?step=5c5c2b9fcfa0fc000741d940

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-07 13:57:27 +00:00
k0kubun 173ad5202b test_rinda.rb: extend timeout of wait_for as well
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5c5961adb18ed400951edeeb?step=5c596fd563e946000717df91

see also: r67003

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-05 11:45:52 +00:00
k0kubun 190a61e3a5 test_rinda.rb: increase timeout for --jit-wait CI
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5c57dbb6b18ed400951e3c74?step=5c57e8b963e94600070a5d61

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-04 08:20:05 +00:00
seki 3dd0b61624 fix: https://twitter.com/_ko1/status/1086167481922646016
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-02 06:17:34 +00:00
nobu c49559f1c1 Skip EHOSTUNREACH by host issues
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 12:55:05 +00:00
kazu 50e41f4a4f test/rinda/test_rinda.rb: Start keeper only on used tests
to reduce sleeping threads on unrelated tests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13 12:22:43 +00:00
eregon 15689ed778 Fix test-all tests to avoid creating report_on_exception warnings
* The warnings are shown by Thread.report_on_exception defaulting to
  true. [Feature #14143] [ruby-core:83979]
* Improves tests by narrowing down the scope where an exception
  is expected.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 18:44:49 +00:00
eregon 967eab83e3 Remove extra assert_nil in Rinda tests
* They are never executed since thread_join() raises.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 18:44:33 +00:00
eregon 2dfbc64fab Rescue expected Interrupt in TupleSpaceTestModule#test_take_bug_8215
* test/rinda/test_rinda.rb (test_take_bug_8215): add rescue for
  expected exception, which removes the warning by
  Thread.report_on_exception [Feature #14143].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 18:44:07 +00:00
mame a4d6fb5584 Stop a global server of Rinda test
This server seemed to cause "leaked file descriptor" warnings.
Moved it into the setup/teardown framework.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 15:14:21 +00:00
normal d9421e1376 test/rinda/test_rinda: skip multicast tests for unsupported systems
This allows "test-all" to pass on systems without multicast
support.  I leave CONFIG_IP_MULTICAST unset in my Linux kernel
.config, nowadays.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 23:53:05 +00:00
nobu c83f23ad52 test_rinda.rb: ipv6_mc
* test/rinda/test_rinda.rb (RingIPv6#ipv6_mc): extract IPv6
  multicast setup and cleanup, and ignore ENETDOWN.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 02:00:02 +00:00
shugo 8a2bd2b7f0 * test/rinda/test_rinda.rb (test_make_socket_ipv6_multicast,
test_make_socket_ipv6_multicast_hops): skip if IPv6 multicast
  address is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-06 03:04:33 +00:00
odaira 1874524d42 Sat Mar 5 09:17:54 2016 Rei Odaira <Rei.Odaira@gmail.com>
* test/rinda/test_rinda.rb (test_make_socket_ipv4_multicast):
  The fifth argument to getsockopt(2) should be modified to
  indicate the actual size of the value on return,
  but not in AIX. This is a know bug. Skip related tests.
* test/rinda/test_rinda.rb (test_ring_server_ipv4_multicast):
  ditto.
* test/rinda/test_rinda.rb (test_make_socket_unicast): ditto.
* test/socket/test_basicsocket.rb (test_getsockopt): ditto.
* test/socket/test_sockopt.rb (test_bool): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-05 00:29:39 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
seki 0e84f98d0d * test/drb/test_drb.rb: Run Rinda/DRb tests on localhost. [Fix GH-1027]
patch by voxik.

	* test/rinda/test_rinda.rb: ditto



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-21 19:28:14 +00:00
ngoto 6f8d3709da * test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6): prevent to use
IPv6 loopback interface for
  Rinda::TestRingFinger#test_make_socket_ipv6_multicast and
  Rinda::TestRingFinger#test_make_socket_ipv6_multicast_hops.
  The tests are skipped if there are no IPv6 devices other than the
  loopback device. [Bug #11394] [ruby-dev:49199]

* test/rinda/test_rinda.rb (test_make_socket_ipv6_multicast): ditto
  for Rinda::TestRingServer#test_make_socket_ipv6_multicast.
   
* test/rinda/test_rinda.rb (test_ring_server_ipv6_multicast): ditto
  for Rinda::TestRingServer#test_ring_server_ipv6_multicast.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-24 11:29:49 +00:00
akr fb2008a73a * test/lib/envutil.rb: Moved from test/ruby/.
* test/lib/find_executable.rb: Ditto.

* test/lib/memory_status.rb: Ditto.

* test/lib/test/unit.rb: require envutil.

* test/: Don't require envutil in test files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 16:05:37 +00:00
hsbt f587cf7906 * test/rinda/test_rinda.rb: removed useless assignment variables.
* test/rss/rss-assertions.rb: ditto.
* test/rss/test_maker_itunes.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 08:37:39 +00:00
akr fcdec9bfbb Stop DRb service.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-01 14:08:35 +00:00
akr be4b37dfae Finish threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-01 13:47:04 +00:00
akr f64541d7bd Close FDs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-01 01:21:18 +00:00
nobu 25ccc4686c test_rinda.rb: revert stop_service
* test/rinda/test_rinda.rb (test_take_bug_8215): revert
  `stop_service` for the time being.  need to reset
  `current_server` to let test/drb work, probably.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-26 12:59:18 +00:00
nobu 6112d54151 test_rinda.rb: fix leaked threads
* test/rinda/test_rinda.rb: join work threads not to leak threads.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-26 08:40:37 +00:00
nobu aef778b4e7 test_rinda.rb: hungup investigation
* test/rinda/test_rinda.rb (with_timeout, wait_for): extract to
  investigate test_do_reply_local too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18 09:38:22 +00:00
nobu 43d52687ba test_rinda.rb: hungup investigation
* test/rinda/test_rinda.rb (test_do_reply): abort on exception to
  investigate sporadic hungups on rubyci.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18 02:38:40 +00:00
nobu e9bb3b9d30 test_rinda.rb: timeout all thread
* test/rinda/test_rinda.rb (test_do_reply): stop all threads and
  show backtraces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-16 05:54:33 +00:00
nobu 460f55945a test_rinda.rb: timeout
* test/rinda/test_rinda.rb (test_do_reply): stop if blocking
  including TupleSpace#write and RingServer#do_reply.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 23:18:59 +00:00
nobu 2e8cb7e5d3 test_rinda.rb: sleep to timeout
* test/rinda/test_rinda.rb (test_do_reply): sleep instead of busy loop.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 23:18:58 +00:00
naruse 251de3209b add timeout to test_do_reply
http://fb64b.rubyci.org/~chkbuild/ruby-trunk/log/20140115T073301Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 08:26:52 +00:00
drbrain 9c8f03fac9 * lib/rinda/ring.rb: Announce RingServer for the same process.
[ruby-trunk - Bug #9163]
	* test/rinda/test_rinda.rb:  Tests for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 05:50:21 +00:00
naruse 0f12658995 fix missing assignment in r42174
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 00:06:45 +00:00