Actions
Bug #11697
closedtest/dtrace failure on Solaris 10
Description
test/dtrace fails on Solaris 10 as follows.
Ruby (64-bit) compiled by using Oracle Solaris Studio 12.3 cc with "-xO3" optimization:
$ SUDO=sudo ruby test/runner.rb test/dtrace
Run options:
# Running tests:
[26/26] DTrace::TestStringProbes#test_object_create_start_string_lit = 1.5
1) Failure:
DTrace::TestStringProbes#test_object_create_start_string_lit [/XXXXX-52420/test/dtrace/test_string.rb:10]:
<["String"]> expected but was
<[]>.
Finished tests in 33.513504s, 0.7758 tests/s, 6.2960 assertions/s.
26 tests, 211 assertions, 1 failures, 0 errors, 0 skips
ruby -v: ruby 2.3.0dev (2015-11-01) [sparc64-solaris2.10]
Ruby (64-bit) compiled by using Solaris Studio 12.3 cc without optimization (with "-xO0") :
$ SUDO=sudo ruby test/runner.rb test/dtrace
Run options:
# Running tests:
[ 3/26] DTrace::TestCMethod#test_entry = 1.77 s
1) Failure:
DTrace::TestCMethod#test_entry [/XXXXX-52250/test/dtrace/test_cmethod.rb:18]:
<1> expected but was
<0>.
Finished tests in 40.703063s, 0.6388 tests/s, 5.2330 assertions/s.
26 tests, 213 assertions, 1 failures, 0 errors, 0 skips
ruby -v: ruby 2.3.0dev (2015-10-24) [sparc64-solaris2.10]
It seems that the failure is due to overflowing of dtrace's trace buffer.
On Solaris, the default buffer size is 4MB.
The failure does not happen when increasing the buffer size to 8MB (calling dtrace with "-b 8m" option)
--- test/dtrace/helper.rb.ORIG~ 2014-11-19 23:15:23.909272000 +0900
+++ test/dtrace/helper.rb 2015-11-16 21:03:35.411936000 +0900
@@ -26,7 +26,7 @@
d_path = d.path
rb_path = rb.path
- cmd = ["dtrace", "-q", "-s", d_path, "-c", "#{EnvUtil.rubybin} -I#{INCLUDE} #{rb_path}"]
+ cmd = ["dtrace", "-b", "8m", "-q", "-s", d_path, "-c", "#{EnvUtil.rubybin} -I#{INCLUDE} #{rb_path}"]
if sudo = @@sudo
[RbConfig::CONFIG["LIBPATHENV"], "RUBY", "RUBYOPT"].each do |name|
if name and val = ENV[name]
Actions
Like0
Like0