From Fedora Project Wiki

No edit summary
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>
# First, confirm in {{filename|/etc/abrt/plugins/Python.conf}} that the '''Python''' addon is enabled. The conf file should contain this line: <pre>Enabled = Yes</pre>
# 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>
# 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>
# Restart service <pre>service abrtd restart</pre>
# Restart service <pre>service abrtd restart</pre>
Line 14: Line 14:
# Python traceback should be generated
# 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
# ABRT catches it, check the report via ''abrt-gui'' whether the trace in report window is the same as in terminal
# The python is run with every python script, so any bug in the hook may have bad consequences for all python app. So please pay attention to any weird behaviour of python scripts
after abrt's pyhook is installed.
}}
}}
[[Category:ABRT_Test_Cases]]
[[Category:ABRT_Test_Cases]]

Revision as of 14:03, 31 March 2010

Description

Check that the abrt handles Python exceptions.


How to test

  1. First, confirm in /etc/abrt/plugins/Python.conf that the Python addon is enabled. The conf file should contain this line:
    Enabled = Yes
  2. Next, ensure that /etc/abrt/abrt.conf has at least one reporter defined for the Python addon. For example,
    Python = Logger, Mailx
  3. Restart service
    service abrtd restart
  4. 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 the smolt package. First, save a back-up of the file:
    cp /usr/share/doc/smolt-1.?/lite2my.py /tmp/
  5. Now, edit the file /usr/share/doc/smolt-1.?/lite2my.py to contain some invalid Python code. For example,
    #!/usr/bin/python
    "11" + 11
  6. Next, execute the modified file using python. For example, in terminal type:
    python /usr/share/doc/smolt-1.?/lite2my.py
  7. Revert the modified python file
    cp /tmp/lite2my.py /usr/share/doc/smolt-1.?/lite2my.py

Expected Results

  1. Python traceback should be generated
  2. ABRT catches it, check the report via abrt-gui whether the trace in report window is the same as in terminal
  3. The python is run with every python script, so any bug in the hook may have bad consequences for all python app. So please pay attention to any weird behaviour of python scripts

after abrt's pyhook is installed.