8000 test_rubyoptions.rb: remove core · eagletmt/ruby@053b5d0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 053b5d0

Browse files
committed
test_rubyoptions.rb: remove core
* test/ruby/test_rubyoptions.rb (test_segv_loaded_features): run SEGV test in a temproray directory so that core files may not be left, not to confuse chkbuild. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 69dbf68 commit 053b5d0

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

test/ruby/test_rubyoptions.rb

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -545,14 +545,19 @@ def test_segv_loaded_features
545545
opts = SEGVTest::ExecOptions.dup
546546

547547
bug7402 = '[ruby-core:49573]'
548-
status = assert_in_out_err(['-e', 'class Bogus; def to_str; exit true; end; end',
549-
'-e', '$".clear',
550-
'-e', '$".unshift Bogus.new',
551-
'-e', '(p $"; abort) unless $".size == 1',
552-
'-e', 'Process.kill :SEGV, $$'],
553-
"", [], /#<Bogus:/,
554-
nil,
555-
opts)
548+
549+
status = Dir.mktmpdir("segv_test") do |tmpdir|
550+
assert_in_out_err(['-e', 'class Bogus; def to_str; exit true; end; end',
551+
'-e', '$".clear',
552+
'-e', '$".unshift Bogus.new',
553+
'-e', '(p $"; abort) unless $".size == 1',
554+
'-e', 'Process.kill :SEGV, $$',
555+
'-C', tmpdir,
556+
],
557+
"", [], /#<Bogus:/,
558+
nil,
559+
opts)
560+
end
556561
assert_not_predicate(status, :success?, "segv but success #{bug7402}")
557562
end
558563

0 commit comments

Comments
 (0)
0