From Fedora Project Wiki

(proof)
Line 1: Line 1:
 
{{QA/Test_Case
 
{{QA/Test_Case
|description= This test case is designed to confirm that ''abrt'' can properly detect and diagnose application crashes from C/C++ programs.
+
|description= This test case is designed to confirm that [[Features/ABRT|ABRT]] can properly detect and diagnose application crashes from C/C++ programs.
 
|actions=
 
|actions=
# In {{filename|/etc/abrt/abrt.conf}}, ensure a reporting mechanism is configured for the ''CCpp'' plugin.  A sample configuration that uses the ''Logger'' reporting plugin is noted below <pre>CCpp = Logger</pre>
+
# In {{filename|/etc/abrt/abrt.conf}}, ensure a reporting mechanism is configured for the ''CCpp'' plugin.  A sample configuration that uses the ''Logger'' reporting plugin is noted below #:<pre>CCpp = Logger</pre>
# Restart the ''abrtd'' service <pre>service abrtd restart</pre>
+
# Restart the ''abrtd'' service with the command {{command|su -c 'service abrtd restart'}}
# Choose a C or C++ application to crash.  For this example, we will use the {{command|sleep}} command which is provided by {{package|coreutils}}.
+
# Choose a C or C++ application to crash.  For this example, we will use the {{command|sleep}} command which is provided by {{package|coreutils}}
# Run the application you wish to capture a crash.  If using the {{command|sleep}} command, open a terminal and run the command: <pre>sleep 5m</pre>
+
# Run the application you wish to capture a crash.  If using the {{command|sleep}} command, open a terminal and run the command: {{command|sleep 5m}}
# In another terminal, force an application crash by locating the process id, and using the {{command|kill}} command. For example, <pre>pkill -SIGSEGV sleep</pre>
+
# In another terminal, force an application crash by locating the process id, and using the {{command|kill}} command, or using {{command|pkill}} or {{command|killall}}. For example, {{command|pkill -SIGSEGV sleep}}
# A desktop notification should appear in notification area.
+
# A desktop notification should appear in notification area. Open {{command|abrt-gui}} by clicking on it
# Open {{command|abrt-gui}} by clicking on it.
+
# Pick the crash from the list, generate a crash report by pressing "Report" button, then choosing one of configured reporters (e.g. Logger, the simplest one). The prompt to choose a reporter plugin appears only if you have more than one configured
# Pick the crash from the list, generate a crash report by pressing "Report" button, then choosing one of configured reporters (e.g. Logger, the simplest one). The prompt to choose a reporter plugin appears only if you have more than one configured.
 
 
|results=
 
|results=
# The {{command|abrt}} application detects the failure by updating the desktop icon
+
# The {{command|abrt}} application should detect the failure by updating the desktop icon
# Clicking the icon, or running the command {{command|abrt-gui}} displays the recently failed application
+
# Clicking the icon, or running the command {{command|abrt-gui}} should display recently crashed applications
# Selecting the application from {{command|abrt-gui}} and reporting the failure generates a proper backtrace. Proper backtrace should have symbolic information, for example:
+
# Selecting the application from {{command|abrt-gui}} and reporting the failure should generate a proper backtrace. Proper backtrace should have symbolic information, for example:
<pre>
+
#:<pre>
Core was generated by `sleep 1260'.
+
#: Core was generated by `sleep 1260'.
Program terminated with signal 6, Aborted.
+
#: Program terminated with signal 6, Aborted.
#0  0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6
+
#: #0  0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6
 
+
#:
Thread 1 (Thread 8328):
+
#: Thread 1 (Thread 8328):
#0  0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6
+
#: #0  0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6
No symbol table info available.
+
#: No symbol table info available.
#1  0x00000000004037ab in rpl_nanosleep (requested_delay=0x7fff893f35c0,  
+
#: #1  0x00000000004037ab in rpl_nanosleep (requested_delay=0x7fff893f35c0,  
     remaining_delay=0x0) at nanosleep.c:69
+
#:     remaining_delay=0x0) at nanosleep.c:69
         r = -516
+
#:         r = -516
         delay = {tv_sec = 1260, tv_nsec = 0}
+
#:         delay = {tv_sec = 1260, tv_nsec = 0}
         t0 = {tv_sec = 29277, tv_nsec = 542118648}
+
#:         t0 = {tv_sec = 29277, tv_nsec = 542118648}
#2  0x000000000040321b in xnanosleep (seconds=<value optimized out>)
+
#: #2  0x000000000040321b in xnanosleep (seconds=<value optimized out>)
     at xnanosleep.c:112
+
#:     at xnanosleep.c:112
         overflow = false
+
#:         overflow = false
         ts_sleep = {tv_sec = 1260, tv_nsec = 0}
+
#:         ts_sleep = {tv_sec = 1260, tv_nsec = 0}
         __PRETTY_FUNCTION__ = "xnanosleep"
+
#:         __PRETTY_FUNCTION__ = "xnanosleep"
#3  0x000000000040176c in main (argc=2, argv=0x7fff893f3758) at sleep.c:147
+
#: #3  0x000000000040176c in main (argc=2, argv=0x7fff893f3758) at sleep.c:147
         i = 2
+
#:         i = 2
         seconds = 1260
+
#:         seconds = 1260
         ok = true
+
#:         ok = true
...
+
#: ...
</pre>
+
#:</pre>
 
}}
 
}}
 
[[Category:ABRT_Test_Cases]]
 
[[Category:ABRT_Test_Cases]]

Revision as of 06:15, 1 April 2010

Description

This test case is designed to confirm that ABRT can properly detect and diagnose application crashes from C/C++ programs.


How to test

  1. In /etc/abrt/abrt.conf, ensure a reporting mechanism is configured for the CCpp plugin. A sample configuration that uses the Logger reporting plugin is noted below #:
    CCpp = Logger
  2. Restart the abrtd service with the command su -c 'service abrtd restart'
  3. Choose a C or C++ application to crash. For this example, we will use the sleep command which is provided by Package-x-generic-16.pngcoreutils
  4. Run the application you wish to capture a crash. If using the sleep command, open a terminal and run the command: sleep 5m
  5. In another terminal, force an application crash by locating the process id, and using the kill command, or using pkill or killall. For example, pkill -SIGSEGV sleep
  6. A desktop notification should appear in notification area. Open abrt-gui by clicking on it
  7. Pick the crash from the list, generate a crash report by pressing "Report" button, then choosing one of configured reporters (e.g. Logger, the simplest one). The prompt to choose a reporter plugin appears only if you have more than one configured

Expected Results

  1. The abrt application should detect the failure by updating the desktop icon
  2. Clicking the icon, or running the command abrt-gui should display recently crashed applications
  3. Selecting the application from abrt-gui and reporting the failure should generate a proper backtrace. Proper backtrace should have symbolic information, for example:
    Core was generated by `sleep 1260'.
    Program terminated with signal 6, Aborted.
    #0 0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6
    Thread 1 (Thread 8328):
    #0 0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6
    No symbol table info available.
    #1 0x00000000004037ab in rpl_nanosleep (requested_delay=0x7fff893f35c0,
    remaining_delay=0x0) at nanosleep.c:69
    r = -516
    delay = {tv_sec = 1260, tv_nsec = 0}
    t0 = {tv_sec = 29277, tv_nsec = 542118648}
    #2 0x000000000040321b in xnanosleep (seconds=<value optimized out>)
    at xnanosleep.c:112
    overflow = false
    ts_sleep = {tv_sec = 1260, tv_nsec = 0}
    __PRETTY_FUNCTION__ = "xnanosleep"
    #3 0x000000000040176c in main (argc=2, argv=0x7fff893f3758) at sleep.c:147
    i = 2
    seconds = 1260
    ok = true
    ...