Skip to content

Commit

Permalink
[GR-50893] Add spec for SIGQUIT and SIGALRM showing stacktraces
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Jan 8, 2024
1 parent 0594181 commit c5a458b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/truffle/tools_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@
end
end

describe "SIGQUIT" do
it "shows Java stacktraces" do
code = 'Process.kill :SIGQUIT, Process.pid; sleep 1'
out = ruby_exe(code)
out.should.include?("Full thread dump")
out.should.include?("RubyLauncher.runRubyMain")
end
end

describe "SIGALRM" do
it "shows Ruby backtraces" do
code = 'Process.kill :SIGALRM, Process.pid; sleep 1'
out = ruby_exe(code, args: "2>&1")
out.should.include?("All Thread and Fiber backtraces:")
out.should.include?(":in `show_backtraces'")
end
end

describe "--coverage" do
before :each do
@file = tmp("main.rb")
Expand Down

0 comments on commit c5a458b

Please sign in to comment.