From Fedora Project Wiki
(proof) |
(use * not ? for the path) |
||
Line 6: | Line 6: | ||
# Next, ensure that {{filename|/etc/abrt/abrt.conf}} has at least one reporter defined for the '''Python''' addon. For example, <tt>Python = Logger, Mailx</tt> | # Next, ensure that {{filename|/etc/abrt/abrt.conf}} has at least one reporter defined for the '''Python''' addon. For example, <tt>Python = Logger, Mailx</tt> | ||
# Restart ABRT with the command {{command|su -c 'service abrtd restart'}} | # Restart ABRT with the command {{command|su -c 'service abrtd restart'}} | ||
# Find a python {{filename|.py}} file which is part of an official Fedora package. For example, {{filename|/usr/share/doc/smolt-1. | # Find a python {{filename|.py}} file which is part of an official Fedora package. For example, {{filename|/usr/share/doc/smolt-1.*/lite2my.py}} which is provided by the {{package|smolt}} package. First, save a back-up of the file: {{command|cp /usr/share/doc/smolt-1.*/lite2my.py /tmp/}} | ||
# Now, edit the file {{filename|/usr/share/doc/smolt-1.?/lite2my.py}} to contain some invalid Python code. For example, | # Now, edit the file {{filename|/usr/share/doc/smolt-1.?/lite2my.py}} to contain some invalid Python code. For example, | ||
#: <pre>#!/usr/bin/python | #: <pre>#!/usr/bin/python | ||
#: "11" + 11</pre> | #: "11" + 11</pre> | ||
# Next, execute the modified file using python. For example, in terminal type: {{command|python /usr/share/doc/smolt-1. | # Next, execute the modified file using python. For example, in terminal type: {{command|python /usr/share/doc/smolt-1.*/lite2my.py}} | ||
# Revert the modified python file: {{command|cp /tmp/lite2my.py /usr/share/doc/smolt-1. | # Revert the modified python file: {{command|cp /tmp/lite2my.py /usr/share/doc/smolt-1.*/lite2my.py}} | ||
|results= | |results= | ||
# Python traceback should be generated | # Python traceback should be generated |
Revision as of 21:28, 1 April 2010
Description
This test case tests the functionality of the ABRT Python exception handler.
How to test
- Ensure the package is installed:
su -c 'yum install abrt-addon-python'
- Confirm in
/etc/abrt/plugins/Python.conf
that the Python addon is enabled. The conf file should contain this line: Enabled = Yes - Next, ensure that
/etc/abrt/abrt.conf
has at least one reporter defined for the Python addon. For example, Python = Logger, Mailx - Restart ABRT with the command
su -c 'service abrtd restart'
- Find a python
.py
file which is part of an official Fedora package. For example,/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 should catch the traceback, and if you inspect the report via
abrt-gui
, the trace in report window should be the same as in the terminal where you executed the command - The ABRT plugin should not cause any unintended behaviour in python scripts when installed