From Fedora Project Wiki

(convert to new category system)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{admon/warning|This test is outdated|ABRT will ignore crashes of python scripts which are not part of the distribution.}}
{{QA/Test_Case
{{QA/Test_Case
|description=This test case tests the functionality of the [[Features/ABRT|ABRT]] together with [[Features/EasierPythonDebugging|EasierPythonDebugging]].
|description=This test case tests the functionality of the [[Features/ABRT|ABRT]] together with [[Features/EasierPythonDebugging|EasierPythonDebugging]].
|actions=
|actions=
# Run the following python script that abuse the <code>ctypes</code> module in such a way as to cause <code>/usr/bin/python</code> to segfault/abort.
# Run the following python script that abuse the <code>ctypes</code> module in such a way as to cause <code>/usr/bin/python</code> to segfault/abort.
## First, cause a ''segfault''
## First, cause a ''segfault'' (triggering a core dump)
##: <pre>
##: <pre>
##: python -c "import ctypes; ctypes.string_at(0xffffffff)"
##: python -c "import ctypes; ctypes.string_at(0xffffffff)"
##: Segmentation fault (core dumped)</pre>
##: Segmentation fault (core dumped)</pre>
## Next, cause a ''core dump''
## Next, cause an ''assertion failure'' (triggering a core dump)
##: <pre>
##: <pre>
##: python -c "import ctypes; ctypes.string_at(0x0)"
##: python -c "import ctypes; ctypes.string_at(0x0)"
Line 15: Line 17:
# Finally, repeat the steps for {{command|python3-debuginfo}}
# Finally, repeat the steps for {{command|python3-debuginfo}}
|results=
|results=
# In each case, there should be meaningful information at the Python level, as well as at the C level in the bactrace.
# In each case, the C-level backtrace in the ABRT report ought to contain details on the Python objects that were present in the C stack frames.  For example, it ought to be possible to see repr()-style printings of the Python objects, rather than just hexadecimal addresses.
#* please see [[Features/EasierPythonDebugging#How_To_Test|EasierPythonDebuggingTests]] for more information.
#* please see [[Features/EasierPythonDebugging#How_To_Test|EasierPythonDebuggingTests]] for more information.
# Note that this does not work well on x86_64
}}
}}
[[Category:Package_abrt_test_cases]]
[[Category:Package_abrt_test_cases]]

Latest revision as of 19:32, 22 September 2011

Warning.png
This test is outdated
ABRT will ignore crashes of python scripts which are not part of the distribution.


Description

This test case tests the functionality of the ABRT together with EasierPythonDebugging.


How to test

  1. Run the following python script that abuse the ctypes module in such a way as to cause /usr/bin/python to segfault/abort.
    1. First, cause a segfault (triggering a core dump)
      python -c "import ctypes; ctypes.string_at(0xffffffff)"
      Segmentation fault (core dumped)
    2. Next, cause an assertion failure (triggering a core dump)
      python -c "import ctypes; ctypes.string_at(0x0)"
      python: Objects/stringobject.c:115: PyString_FromString: Assertion `str != ((void *)0)' failed.
      Aborted (core dumped)
  2. Next, repeat all of the above for python3
  3. Finally, repeat the steps for python3-debuginfo

Expected Results

  1. In each case, the C-level backtrace in the ABRT report ought to contain details on the Python objects that were present in the C stack frames. For example, it ought to be possible to see repr()-style printings of the Python objects, rather than just hexadecimal addresses.
  2. Note that this does not work well on x86_64