diff options
Diffstat (limited to 'test/dtrace/helper.rb')
-rw-r--r-- | test/dtrace/helper.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/dtrace/helper.rb b/test/dtrace/helper.rb index ef691b5e32..2aea3d9d08 100644 --- a/test/dtrace/helper.rb +++ b/test/dtrace/helper.rb @@ -1,3 +1,4 @@ +# -*- coding: us-ascii -*- require 'minitest/autorun' require 'tempfile' @@ -5,10 +6,6 @@ module DTrace class TestCase < MiniTest::Unit::TestCase INCLUDE = File.expand_path(File.join(File.dirname(__FILE__), '..')) - def setup - skip "must be setuid 0 to run dtrace tests" unless Process.euid == 0 - end - def trap_probe d_program, ruby_program d = Tempfile.new('probe.d') d.write d_program @@ -30,4 +27,4 @@ module DTrace yield(d_path, rb_path, probes) end end -end +end if Process.euid == 0 and (`dtrace -V` rescue false) |