<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/tool/lib/test/unit.rb, branch v3_0_4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 5086c25f6015558877f85c3f1c014780b08fd3ce,3ff0a0b40c2e1fbdad2286f1dafe837f822d0e0d: [Backport #16936]</title>
<updated>2021-12-24T05:41:08+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2021-12-24T05:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1d29740c1b101db4bd8fc2d05f929a9e37471a0f'/>
<id>1d29740c1b101db4bd8fc2d05f929a9e37471a0f</id>
<content type='text'>
	Properly exclude test cases.

	Lets consider the following scenario:

	~~~
	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):001:0&gt; p suite
	OpenSSL::TestEC
	=&gt; OpenSSL::TestEC

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):002:0&gt; p all_test_methods
	["test_ECPrivateKey", "test_ECPrivateKey_encrypted", "test_PUBKEY", "test_check_key", "test_derive_key", "test_dh_compute_key", "test_dsa_sign_asn1_FIPS186_3", "test_ec_group", "test_ec_key", "test_ec_point", "test_ec_point_add", "test_ec_point_mul", "test_generate", "test_marshal", "test_sign_verify", "test_sign_verify_raw"]
	=&gt;
	["test_ECPrivateKey",
	 "test_ECPrivateKey_encrypted",
	 "test_PUBKEY",
	 "test_check_key",
	 "test_derive_key",
	 "test_dh_compute_key",
	 "test_dsa_sign_asn1_FIPS186_3",
	 "test_ec_group",
	 "test_ec_key",
	 "test_ec_point",
	 "test_ec_point_add",
	 "test_ec_point_mul",
	 "test_generate",
	 "test_marshal",
	 "test_sign_verify",
	 "test_sign_verify_raw"]

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):003:0&gt; p filter
	/\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/
	=&gt; /\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):004:0&gt; method = "test_check_key"
	=&gt; "test_check_key"
	~~~

	The intention here is to exclude the `test_check_key` test case.
	Unfortunately this does not work as expected, because the negative filter
	is never checked:

	~~~
	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):005:0&gt; filter === method
	=&gt; true

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):006:0&gt; filter === "#{suite}##{method}"
	=&gt; false

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):007:0&gt; filter === method || filter === "#{suite}##{method}"
	=&gt; true
	~~~

	Therefore always filter against the fully qualified method name
	`#{suite}##{method}`, which should provide the expected result.

	However, if plain string filter is used, keep checking also only the
	method name.

	This resolves [Bug #16936].
	---
	 tool/lib/test/unit.rb | 12 +++++++++---
	 1 file changed, 9 insertions(+), 3 deletions(-)

	Filter method names only if filtering method name only

	If sole `filter` option doesn't seem including test case name,
	match with method name only.
	And if the filter is a Regexp or String, it never matches method
	name symbols.
	---
	 tool/lib/test/unit.rb | 15 ++++++---------
	 1 file changed, 6 insertions(+), 9 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Properly exclude test cases.

	Lets consider the following scenario:

	~~~
	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):001:0&gt; p suite
	OpenSSL::TestEC
	=&gt; OpenSSL::TestEC

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):002:0&gt; p all_test_methods
	["test_ECPrivateKey", "test_ECPrivateKey_encrypted", "test_PUBKEY", "test_check_key", "test_derive_key", "test_dh_compute_key", "test_dsa_sign_asn1_FIPS186_3", "test_ec_group", "test_ec_key", "test_ec_point", "test_ec_point_add", "test_ec_point_mul", "test_generate", "test_marshal", "test_sign_verify", "test_sign_verify_raw"]
	=&gt;
	["test_ECPrivateKey",
	 "test_ECPrivateKey_encrypted",
	 "test_PUBKEY",
	 "test_check_key",
	 "test_derive_key",
	 "test_dh_compute_key",
	 "test_dsa_sign_asn1_FIPS186_3",
	 "test_ec_group",
	 "test_ec_key",
	 "test_ec_point",
	 "test_ec_point_add",
	 "test_ec_point_mul",
	 "test_generate",
	 "test_marshal",
	 "test_sign_verify",
	 "test_sign_verify_raw"]

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):003:0&gt; p filter
	/\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/
	=&gt; /\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):004:0&gt; method = "test_check_key"
	=&gt; "test_check_key"
	~~~

	The intention here is to exclude the `test_check_key` test case.
	Unfortunately this does not work as expected, because the negative filter
	is never checked:

	~~~
	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):005:0&gt; filter === method
	=&gt; true

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):006:0&gt; filter === "#{suite}##{method}"
	=&gt; false

	irb(#&lt;Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8&gt;):007:0&gt; filter === method || filter === "#{suite}##{method}"
	=&gt; true
	~~~

	Therefore always filter against the fully qualified method name
	`#{suite}##{method}`, which should provide the expected result.

	However, if plain string filter is used, keep checking also only the
	method name.

	This resolves [Bug #16936].
	---
	 tool/lib/test/unit.rb | 12 +++++++++---
	 1 file changed, 9 insertions(+), 3 deletions(-)

	Filter method names only if filtering method name only

	If sole `filter` option doesn't seem including test case name,
	match with method name only.
	And if the filter is a Regexp or String, it never matches method
	name symbols.
	---
	 tool/lib/test/unit.rb | 15 ++++++---------
	 1 file changed, 6 insertions(+), 9 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>Debug the command used for gdb dump</title>
<updated>2020-12-14T07:35:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-14T07:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aacd2295d0f2c982641229e159ff179462d83a36'/>
<id>aacd2295d0f2c982641229e159ff179462d83a36</id>
<content type='text'>
It's not working
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3288206. I'm
debugging why.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not working
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3288206. I'm
debugging why.
</pre>
</div>
</content>
</entry>
<entry>
<title>Dump a backtrace with gdb</title>
<updated>2020-12-13T02:46:24+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-13T02:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=246d7e4f1d92851356d459f424cbc3491135d1ac'/>
<id>246d7e4f1d92851356d459f424cbc3491135d1ac</id>
<content type='text'>
Because Ruby often fails to dump a C backtrace.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because Ruby often fails to dump a C backtrace.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid leaving too many core files in /tmp</title>
<updated>2020-12-04T05:33:35+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-04T05:33:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f1757a88a4c8e2a50481de020787b37d926463df'/>
<id>f1757a88a4c8e2a50481de020787b37d926463df</id>
<content type='text'>
for CIs like ci.rvm.jp.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for CIs like ci.rvm.jp.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not require time and fileutils by default</title>
<updated>2020-12-04T05:24:36+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-04T05:24:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=30fba5f37d9058cc7e4d852ff211313f13ded3a1'/>
<id>30fba5f37d9058cc7e4d852ff211313f13ded3a1</id>
<content type='text'>
I have no idea what I'm doing, but the previous commit caused lots of CI
failures like https://github.com/ruby/ruby/runs/1496949568 and this
place is the most suspicious.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I have no idea what I'm doing, but the previous commit caused lots of CI
failures like https://github.com/ruby/ruby/runs/1496949568 and this
place is the most suspicious.
</pre>
</div>
</content>
</entry>
<entry>
<title>Save a core file on a worker crash</title>
<updated>2020-12-04T05:01:25+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-04T05:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=067f45ecd379ea44f294084c8f342c69f735c018'/>
<id>067f45ecd379ea44f294084c8f342c69f735c018</id>
<content type='text'>
CI failures like
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3280458 doesn't
provide any useful information, and it doesn't leave a core file in a CI
environment because a test like `Process.kill(:TRAP, $$)` overwrites in
a next run very quickly.

Thus I'd like to keep core files in /tmp.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CI failures like
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3280458 doesn't
provide any useful information, and it doesn't leave a core file in a CI
environment because a test like `Process.kill(:TRAP, $$)` overwrites in
a next run very quickly.

Thus I'd like to keep core files in /tmp.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Report a full_message on a worker crash"</title>
<updated>2020-12-04T04:55:36+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-04T04:55:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0734a6cd59e6fb1d59180ee73113709ec238b045'/>
<id>0734a6cd59e6fb1d59180ee73113709ec238b045</id>
<content type='text'>
This reverts commit 00f046ef57f9da7f5248f9ef9d55702ddc407bf1.
It was not helpful for an issue I was debugging.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 00f046ef57f9da7f5248f9ef9d55702ddc407bf1.
It was not helpful for an issue I was debugging.
</pre>
</div>
</content>
</entry>
<entry>
<title>tune parallel test</title>
<updated>2020-12-01T00:39:09+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2020-11-30T16:27:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e79f1941b29738d95b42f8cb5bdb159e7138cf49'/>
<id>e79f1941b29738d95b42f8cb5bdb159e7138cf49</id>
<content type='text'>
This patch contains the fowllowing hacks:

(1) Add "--timetable-data=FILE" option for test-all
    This option enables to dump timeline event
    contains worker, suite, and start/end time.
(2) remove TestJIT in test_jit_debug.rb on parallel test.
    it is duplicated test.
(3) move test_jit.rb and test_jit_debug.rb at first
    because these two tests are bottleneck of parallel tests.

On my environment, `make test-all TESTS=-j12` reduced the total time
190 seconds -&gt; 140 seconds.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch contains the fowllowing hacks:

(1) Add "--timetable-data=FILE" option for test-all
    This option enables to dump timeline event
    contains worker, suite, and start/end time.
(2) remove TestJIT in test_jit_debug.rb on parallel test.
    it is duplicated test.
(3) move test_jit.rb and test_jit_debug.rb at first
    because these two tests are bottleneck of parallel tests.

On my environment, `make test-all TESTS=-j12` reduced the total time
190 seconds -&gt; 140 seconds.
</pre>
</div>
</content>
</entry>
<entry>
<title>Report a full_message on a worker crash</title>
<updated>2020-11-25T04:36:39+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-11-25T04:36:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=00f046ef57f9da7f5248f9ef9d55702ddc407bf1'/>
<id>00f046ef57f9da7f5248f9ef9d55702ddc407bf1</id>
<content type='text'>
A worker crash happens very often, but we're not sure why.
I'd like to know a backtrace if it's available.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A worker crash happens very often, but we're not sure why.
I'd like to know a backtrace if it's available.
</pre>
</div>
</content>
</entry>
<entry>
<title>freeze dynamic regexp literals</title>
<updated>2020-10-26T16:45:57+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2020-10-20T06:16:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7ad56fd87b35abf4933e0146761df91e9ec9890a'/>
<id>7ad56fd87b35abf4933e0146761df91e9ec9890a</id>
<content type='text'>
Regexp literals are frozen, and also dynamically comppiled Regexp
literals (/#{expr}/) are frozen.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Regexp literals are frozen, and also dynamically comppiled Regexp
literals (/#{expr}/) are frozen.
</pre>
</div>
</content>
</entry>
</feed>
