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...') |
(Updated instructions) |
||
Line 2: | Line 2: | ||
|description=Check that the ''abrt'' handles Python exceptions. | |description=Check that the ''abrt'' handles Python exceptions. | ||
|actions= | |actions= | ||
# First, confirm in {{filename|/etc/abrt/abrt.conf}} that the '''Python''' addon is enabled. For example, <pre>EnabledPlugins = Python</pre> | |||
Restart service <pre>service | # Next, ensure that {{filename|/etc/abrt/abrt.conf}} has at least one reporter defined for the '''Python''' addon. For example, <pre>Python = Logger, Mailx</pre> | ||
Find | # Restart service <pre>service abrtd restart</pre> | ||
# Find a python {{filename|.py}} file in system originally installed via RPM. For this test, we will choose {{filename|/usr/share/doc/smolt-1.?/lite2my.py}} which is provided by the {{package|smolt}} package. First, save a back-up of the file: <pre>cp /usr/share/doc/smolt-1.?/lite2my.py /tmp/</pre> | |||
"11" + 11</pre> | # Now, edit the file {{filename|/usr/share/doc/smolt-1.?/lite2my.py}} to contain some invalid Python code. For example, | ||
#: <pre>#!/usr/bin/python | |||
#: "11" + 11</pre> | |||
# Next, execute the modified file using python. For example, in terminal type: <pre>python /usr/share/doc/smolt-1.?/lite2my.py</pre> | |||
# Revert the modified python file <pre>cp /tmp/lite2my.py /usr/share/doc/smolt-1.?/lite2my.py</pre> | |||
|results= | |results= | ||
# Python traceback should be generated | # Python traceback should be generated |
Revision as of 00:43, 3 November 2009
Description
Check that the abrt handles Python exceptions.
How to test
- First, confirm in
/etc/abrt/abrt.conf
that the Python addon is enabled. For example,EnabledPlugins = Python
- Next, ensure that
/etc/abrt/abrt.conf
has at least one reporter defined for the Python addon. For example,Python = Logger, Mailx
- Restart service
service abrtd restart
- Find a python
.py
file in system originally installed via RPM. For this test, we will choose/usr/share/doc/smolt-1.?/lite2my.py
which is provided by thesmolt
package. First, save a back-up of the file:cp /usr/share/doc/smolt-1.?/lite2my.py /tmp/
- Now, edit the file
/usr/share/doc/smolt-1.?/lite2my.py
to contain some invalid Python code. For example,#!/usr/bin/python
- "11" + 11
- Next, execute the modified file using python. For example, in terminal type:
python /usr/share/doc/smolt-1.?/lite2my.py
- Revert the modified python file
cp /tmp/lite2my.py /usr/share/doc/smolt-1.?/lite2my.py
Expected Results
- Python traceback should be generated
- ABRT catches it, check the report via abrt-gui whether the trace in report window is the same as in terminal