From Fedora Project Wiki

 
Line 38: Line 38:
 
Step #2 the output should be similar to the following
 
Step #2 the output should be similar to the following
 
<pre>
 
<pre>
Apr 10 13:58:47 localhost abrt[14423]: detected unhandled Ruby exception in '/bin/will_ruby_raise'
+
Apr 10 13:58:47 localhost abrt[14423]: detected unhandled Ruby exception in '/usr/share/rubygems/rubygems/core_ext/kernel_require.rb'
 
</pre>
 
</pre>
 
</li>
 
</li>

Latest revision as of 07:19, 14 April 2015

Description

This test case tests the functionality of the ABRT Ruby exception handler.

Setup

Install rubygem-abrt and will-crash packages

How to test

  1. run rubygem-abrt self test
    RUBYOPT='-rabrt' ruby $(rpm -ql rubygem-abrt | grep abrt.rb)
    
  2. check the logs
    su -c 'journalctl | grep Ruby'
    
  3. run will_ruby_raise
    RUBYOPT='-rabrt' will_ruby_raise
    

Expected Results

  1. Step #1 completes with an output similar to the following one
    /usr/share/gems/gems/abrt-0.0.3/lib/abrt.rb:13:in `<top (required)>': can't modify frozen Array (RuntimeError)
            from /usr/share/rubygems/rubygems/custom_require.rb:60:in `require'
            from /usr/share/rubygems/rubygems/custom_require.rb:60:in `rescue in require'
            from /usr/share/rubygems/rubygems/custom_require.rb:35:in `require'
    

    Notification is raised and the crash is listed in gnome-abrt.

  2. Step #2 the output should be similar to the following
    Apr 10 13:58:47 localhost abrt[14423]: detected unhandled Ruby exception in '/usr/share/rubygems/rubygems/core_ext/kernel_require.rb'
    
  3. Crash for will-crash package was recorded. Notification is raised and the crash is listed in gnome-abrt.