From Fedora Project Wiki

Revision as of 16:03, 16 March 2011 by Vda (talk | contribs)


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

How to test

  1. Ensure the package is installed: su -c 'yum install abrt-addon-python'
  2. Find a python .py file which is part of an official Fedora package. For example, /usr/bin/pydoc which is provided by the Package-x-generic-16.pngpython package. Other files you might use for experiments: /usr/bin/pygtk-demo, /usr/bin/yum, /usr/bin/fetch_file
  3. Make a back-up of the file: su -c 'cp -a /usr/bin/pydoc /usr/bin/'
  4. Edit the file to contain some invalid Python code. For example, add "'11' + 11" or "0/0" line near the top.
  5. Execute the modified file.
  6. Revert the modified python file: su -c 'cp -a /usr/bin/ /usr/bin/pydoc'

Expected Results

  1. A python traceback should be generated at the command line:
    Traceback (most recent call last):
    File "/usr/bin/pydoc", line 3, in <module>
  2. 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
  3. The ABRT plugin should not cause any unintended behaviour in python scripts when installed