From Fedora Project Wiki
(Created page with "{{QA/Test_Case |description=This test case tests the functionality of the ABRT Ruby exception handler. |setup=Install rubygem-abrt package |actions= # run rubygem-abrt self t...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{QA/Test_Case | {{QA/Test_Case | ||
|description=This test case tests the functionality of the ABRT Ruby exception handler. | |description=This test case tests the functionality of the ABRT Ruby exception handler. | ||
|setup=Install rubygem-abrt | |setup=Install rubygem-abrt and will-crash packages | ||
|actions= | |actions= | ||
<ol> | |||
<li> | |||
run rubygem-abrt self test | |||
<pre> | <pre> | ||
RUBYOPT='-rabrt' ruby | RUBYOPT='-rabrt' ruby $(rpm -ql rubygem-abrt | grep abrt.rb) | ||
</pre> | </pre> | ||
</li> | |||
<li> | |||
check the logs | |||
<pre> | <pre> | ||
su -c 'grep rbhook /var/log/messages' | su -c 'grep rbhook /var/log/messages' | ||
</pre> | </pre> | ||
</li> | |||
<li> | |||
run {{command|will_ruby_raise}} | |||
<pre> | |||
RUBYOPT='-rabrt' will_ruby_raise | |||
</pre> | |||
</li> | |||
</ol> | |||
|results= | |results= | ||
<ol> | |||
<li> | |||
Step #1 completes with an output similar to the following one | |||
<pre> | <pre> | ||
/usr/share/gems/gems/abrt-0.0.3/lib/abrt.rb:13:in `<top (required)>': can't modify frozen Array (RuntimeError) | /usr/share/gems/gems/abrt-0.0.3/lib/abrt.rb:13:in `<top (required)>': can't modify frozen Array (RuntimeError) | ||
Line 19: | Line 33: | ||
from /usr/share/rubygems/rubygems/custom_require.rb:35:in `require' | from /usr/share/rubygems/rubygems/custom_require.rb:35:in `require' | ||
</pre> | </pre> | ||
</li> | |||
<li> | |||
Step #2 the output should be similar to the following | |||
<pre> | <pre> | ||
Sep 19 15:37:10 dhcp-25-122 abrt-server[6608]: Saved problem directory of pid 6606 to '/var/spool/abrt/rbhook-2012-09-19-15:37:10-6606' | Sep 19 15:37:10 dhcp-25-122 abrt-server[6608]: Saved problem directory of pid 6606 to '/var/spool/abrt/rbhook-2012-09-19-15:37:10-6606' | ||
Line 25: | Line 41: | ||
Sep 19 15:37:17 dhcp-25-122 abrtd: New problem directory /var/spool/abrt/rbhook-2012-09-19-15:37:10-6606, processing | Sep 19 15:37:17 dhcp-25-122 abrtd: New problem directory /var/spool/abrt/rbhook-2012-09-19-15:37:10-6606, processing | ||
</pre> | </pre> | ||
</li> | |||
<li> | |||
Crash for will-crash package was recorded | |||
</li> | |||
</ol> | |||
}} | }} | ||
[[Category:Package_abrt_test_cases]] | [[Category:Package_abrt_test_cases]] |
Revision as of 14:58, 19 September 2012
Description
This test case tests the functionality of the ABRT Ruby exception handler.
Setup
Install rubygem-abrt and will-crash packages
How to test
-
run rubygem-abrt self test
RUBYOPT='-rabrt' ruby $(rpm -ql rubygem-abrt | grep abrt.rb)
-
check the logs
su -c 'grep rbhook /var/log/messages'
-
run
will_ruby_raise
RUBYOPT='-rabrt' will_ruby_raise
Expected Results
-
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'
-
Step #2 the output should be similar to the following
Sep 19 15:37:10 dhcp-25-122 abrt-server[6608]: Saved problem directory of pid 6606 to '/var/spool/abrt/rbhook-2012-09-19-15:37:10-6606' Sep 19 15:37:10 dhcp-25-122 abrtd: Directory 'rbhook-2012-09-19-15:37:10-6606' creation detected Sep 19 15:37:17 dhcp-25-122 abrtd: New problem directory /var/spool/abrt/rbhook-2012-09-19-15:37:10-6606, processing
- Crash for will-crash package was recorded