From Fedora Project Wiki

(Created page with '{{QA/Test_Case |description=Check that the ''abrt'' handles Python exceptions. |actions= Configure ''abrt.conf'' so '''Python''' addon is enabled. <pre>EnabledPlugins = Python</p...')
 
No edit summary
 
(17 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description=Check that the ''abrt'' handles Python exceptions.
|description=This test case tests the functionality of the ABRT Python exception handler.
|setup=Install will-crash
|actions=
|actions=
Configure ''abrt.conf'' so '''Python''' addon is enabled. <pre>EnabledPlugins = Python</pre> Having some reporter might be useful too <pre>Python = Logger, Mailx</pre>
# Ensure the package is installed: {{command|sudo dnf install abrt-addon-python}}
Restart service <pre>service abrt restart</pre>
# Generate an uncaught python exception: {{command|will_python_raise}}
Find some '''.py''' file in system originally installed via RPM; e.g. /usr/share/doc/smolt-1.?/lite2my.py from smolt package. <pre>cp /usr/share/doc/smolt-1.?/lite2my.py ~</pre>
# A python traceback should be generated at the command line:
Edit the file '''/usr/share/doc/smolt-1.?/lite2my.py''' to contain some invalid Python code<pre>#!/usr/bin/python
<pre>
"11" + 11</pre>
Will raise.
Run it in terminal like this <pre>python /usr/share/doc/smolt-1.?/lite2my.py</pre>
Traceback (most recent call last):
Get it back :) <pre>cp lite2my.py /usr/share/doc/smolt-1.?/lite2my.py</pre>
  File "/bin/will_python_raise", line 3, in <module>
    0/0
ZeroDivisionError: integer division or modulo by zero
</pre>
|results=
|results=
# Python traceback should be generated
# ABRT should catch the traceback, and if you inspect the report via {{command|gnome-abrt}}, the trace in report window should be the same as in the terminal where you executed the command
# ABRT catches it, check the report via ''abrt-gui'' whether the trace in report window is the same as in terminal
# The ABRT plugin should not cause any unintended behaviour in python scripts when installed
}}
}}
[[Category:ABRT_Test_Cases]]
[[Category:Package_abrt_test_cases]]

Latest revision as of 11:52, 10 April 2015

Description

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

Setup

Install will-crash

How to test

  1. Ensure the package is installed: sudo dnf install abrt-addon-python
  2. Generate an uncaught python exception: will_python_raise
  3. A python traceback should be generated at the command line:
Will raise.
Traceback (most recent call last):
  File "/bin/will_python_raise", line 3, in <module>
    0/0
ZeroDivisionError: integer division or modulo by zero

Expected Results

  1. ABRT should catch the traceback, and if you inspect the report via gnome-abrt, the trace in report window should be the same as in the terminal where you executed the command
  2. The ABRT plugin should not cause any unintended behaviour in python scripts when installed