dumping ground for random patches and texts
 help / color / mirror / Atom feed
From: EW <e@80x24.org>
To: spew@80x24.org
Subject: [WIP 4/3] test/dtrace: enable Tracepoint for function calls
Date: Tue, 5 Jun 2018 03:37:05 +0000	[thread overview]
Message-ID: <20180605033704.GA32537@ailurophile> (raw)
In-Reply-To: <20180605032921.32337-1-e@80x24.org>

[ruby-core:85965]
---
 test/dtrace/test_function_entry.rb     | 5 +++--
 test/dtrace/test_singleton_function.rb | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/dtrace/test_function_entry.rb b/test/dtrace/test_function_entry.rb
index fc07ccc455..2fac424fe4 100644
--- a/test/dtrace/test_function_entry.rb
+++ b/test/dtrace/test_function_entry.rb
@@ -18,7 +18,7 @@ def test_function_entry
 	}
 
 	assert_equal 10, foo_calls.length
-	line = '2'
+	line = '3'
 	foo_calls.each { |f| assert_equal line, f[3] }
 	foo_calls.each { |f| assert_equal rb_file, f[2] }
       }
@@ -39,7 +39,7 @@ def test_function_return
 	}
 
 	assert_equal 10, foo_calls.length
-	line = '2'
+	line = '3'
 	foo_calls.each { |f| assert_equal line, f[3] }
 	foo_calls.each { |f| assert_equal rb_file, f[2] }
       }
@@ -77,6 +77,7 @@ def baz
     private
     def ruby_program
       <<-eoruby
+      TracePoint.new{}.enable
       class Foo
 	def foo; end
       end
diff --git a/test/dtrace/test_singleton_function.rb b/test/dtrace/test_singleton_function.rb
index 3698a02c93..a896b91975 100644
--- a/test/dtrace/test_singleton_function.rb
+++ b/test/dtrace/test_singleton_function.rb
@@ -18,7 +18,7 @@ def test_entry
 	}
 
 	assert_equal 10, foo_calls.length
-	line = '2'
+	line = '3'
 	foo_calls.each { |f| assert_equal line, f[3] }
 	foo_calls.each { |f| assert_equal rb_file, f[2] }
       }
@@ -38,7 +38,7 @@ def test_exit
 	}
 
 	assert_equal 10, foo_calls.length
-	line = '2'
+	line = '3'
 	foo_calls.each { |f| assert_equal line, f[3] }
 	foo_calls.each { |f| assert_equal rb_file, f[2] }
       }
@@ -46,6 +46,7 @@ def test_exit
 
     def ruby_program
       <<-eoruby
+      TracePoint.new{}.enable
       class Foo
 	def self.foo; end
       end
-- 
EW


      parent reply	other threads:[~2018-06-05  3:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05  3:29 [WIP 1/3] test/dtrace/helper: fix check for miniruby Eric Wong
2018-06-05  3:29 ` [WIP 2/3] test/dtrace/test_array_create.rb: check line number Eric Wong
2018-06-05  3:29 ` [WIP 3/3] test/dtrace/test_method_cache.rb: avoid spewing too much Eric Wong
2018-06-05  3:37 ` EW [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180605033704.GA32537@ailurophile \
    --to=e@80x24.org \
    --cc=spew@80x24.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).