From Fedora Project Wiki

No edit summary
(rewrite (hope this is right, the original is shortened and unclear))
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description=
|description=
This is testing [[Features/ABRT|ABRT]] Actions and Reporters
This test case checks whether [[Features/ABRT|ABRT's]] actions and reporters function works correctly.
 
|actions=
|actions=
Edit config file ''/etc/abrt/abrt.conf'', where you should find lines:  
# Ensure the appropriate packages are installed with the command {{command|su -c 'yum install abrt-plugin-runapp abrt-plugin-mailx'}}
<pre>
# Edit the config file {{filename|/etc/abrt/abrt.conf}}, and change the ''ActionsAndReporters'' line to read:  
# list of actions and reporters which are activated immediately after a crash
#:<pre>
# occurs
#:ActionsAndReporters = RunApp("ls", "ls-output")
ActionsAndReporters =
#:</pre>
</pre>
# Set up an executable-specific report action in the ''AnalyzerActionsAndReporters'' section, such as:
 
#:<pre>
If you add here some reporter or action plugin, then it shout be run at crash time. So for example:
#: [ AnalyzerActionsAndReporters ]
<pre>ActionsAndReporters = RunApp("ls", "ls-output")</pre>
#: # all C/C++ crashes will be reported via Logger plugin
 
#: CCpp = Logger
Saves output from ''ls'' command to file called ''ls-output''. This file will be used in summary report. Try Reporter plugin Mailx(<subject>) or other.
#: # if gedit crashes, then an email will be send and Logger (from ''CCpp'' section) should be silent
 
#: CCpp:gedit = Mailx("[abrt] Gedit crashed")
Now let's go through second section. There is saved association among analyzers and actions and/or reporter plugins:
#:</pre>
<pre>
# Restart ABRT with the command {{command|su -c 'service abrtd restart'}}
[ AnalyzerActionsAndReporters ]
# Run the specified command (gedit in our example) and then kill it with the command {{command|kill -SIGSEGV (pid)}}
# all C/C++ crashes will be reported via Logger plugin
CCpp = Logger
# if bind crashes, then an email will be send and Logger (from ''CCpp'' section) should be silent
CCpp:bind = Mailx("[abrt] Bind crashed")
# all kernel crashers will be reporter via Logger
Kerneloops = KerneloopsReporter
</pre>
 
How to test this: try to change the analyzer - reporter association to something else and report some crash.
it should report somewhere else (Logger logs to /var/log/abrt-logger, Mailx sends email to the configured email address).
 
|results=
|results=
Verify that the command ''ls'' was run and it's output is in ''ls-output''.
# Verify that a directory listing appears in the file {{filename|ls-output}} '''FIXME: Where should this file be?'''
 
# Verify that the Mailx plugin was used to send a mail about the crash
}}
}}
[[Category:ABRT_Test_Cases]]
[[Category:ABRT_Test_Cases]]

Revision as of 05:08, 1 April 2010

Description

This test case checks whether ABRT's actions and reporters function works correctly.


How to test

  1. Ensure the appropriate packages are installed with the command su -c 'yum install abrt-plugin-runapp abrt-plugin-mailx'
  2. Edit the config file /etc/abrt/abrt.conf, and change the ActionsAndReporters line to read:
    ActionsAndReporters = RunApp("ls", "ls-output")
  3. Set up an executable-specific report action in the AnalyzerActionsAndReporters section, such as:
    [ AnalyzerActionsAndReporters ]
    # all C/C++ crashes will be reported via Logger plugin
    CCpp = Logger
    # if gedit crashes, then an email will be send and Logger (from ''CCpp'' section) should be silent
    CCpp:gedit = Mailx("[abrt] Gedit crashed")
  4. Restart ABRT with the command su -c 'service abrtd restart'
  5. Run the specified command (gedit in our example) and then kill it with the command kill -SIGSEGV (pid)

Expected Results

  1. Verify that a directory listing appears in the file ls-output FIXME: Where should this file be?
  2. Verify that the Mailx plugin was used to send a mail about the crash