From Fedora Project Wiki

(double grrrr)
(various cleanups)
Line 6: Line 6:
 
#* [http://git.fedorahosted.org/git/?p=abrt.git;a=blob_plain;f=examples/oops1.test;h=e4f02d26c11cf613c522d577486ed9dfc597b1b7;hb=HEAD oops1.test]
 
#* [http://git.fedorahosted.org/git/?p=abrt.git;a=blob_plain;f=examples/oops1.test;h=e4f02d26c11cf613c522d577486ed9dfc597b1b7;hb=HEAD oops1.test]
 
#* [http://git.fedorahosted.org/git/?p=abrt.git;a=blob_plain;f=examples/not_oops3.test;hb=HEAD not_oops3.test]
 
#* [http://git.fedorahosted.org/git/?p=abrt.git;a=blob_plain;f=examples/not_oops3.test;hb=HEAD not_oops3.test]
# Test that stand-alone detector tool works properly; Do as a root for both files:
+
# For each file, run the following command: {{command|su -c 'abrt-dump-oops -d -o (filename)'}}
#: $ abrt-dump-oops -d -o oops1.test
+
# Both times, pen abrt-gui and check if a crash report was created
#: abrt-dump-oops: Found oopses: 1
+
# Make sure {{filename|/etc/abrt/abrt_event.conf}} contains <tt>EVENT=post-create analyzer=Kerneloops  abrt-action-analyze-oops</tt> and <tt>EVENT=report_kerneloops.org analyzer=Kerneloops  abrt-action-kerneloops</tt>, and {{filename|/etc/abrt/abrt.conf}} contains <tt>abrt-dump-oops = abrt-dump-oops -drw /var/log/messages</tt>. If you have to change anything, restart abrtd: {{command|su -c 'systemctl restart abrtd.service'}}
#:
+
# Append {{filename|oops1.test}} to {{filename|/var/log/messages}} with the command {{command|su -c 'cat oops1.test >> /var/log/messages'}}
#: Version: 2.6.27.9-159.fc10.i686 #1
+
# Observe whether a crash notification appears
#: BUG: unable to handle kernel NULL pointer dereference at 00000000
 
#: ...
 
#: EIP: [<f88dec25>] radeon_cp_init_ring_buffer+0x90/0x302 [radeon] SS:ESP 0068:f0a0cf08
 
#: abrt-dump-oops: Creating dump directories
 
# Open abrt-gui and check that dump directory was created
 
# And now test if ABRT's scanning of /var/log/messages works, you'll need root privs for this
 
# Make sure {{filename|/etc/abrt/abrt_event.conf}} contains <tt>EVENT=post-create analyzer=Kerneloops  abrt-action-analyze-oops</tt> and <tt>EVENT=report_kerneloops.org analyzer=Kerneloops  abrt-action-kerneloops</tt>. And <tt>/etc/abrt/abrt.conf</tt> contains <tt>abrt-dump-oops = abrt-dump-oops -drw /var/log/messages</tt>. If changed anything, restart abrtd: <tt>service abrtd restart</tt>.
 
# Concatenate {{filename|oops1.test}} to {{filename|/var/log/messages}} e.g.:<pre>cat oops1.test >> /var/log/messages</pre>
 
# If you are logged as a root: Wait for abrt-applet (make sure it's running) and notification to emerge to show the notification about the detected kerneloops. Otherwise open abrt-gui as a root instead.
 
 
 
 
|results=
 
|results=
# After running {{command|abrt-dump-oops}} on {{filename|oops1.test}} crash should be created and visible via abrt-gui and in the terminal.
+
# After running {{command|abrt-dump-oops}} on {{filename|oops1.test}} a crash report should be created and visible via abrt-gui and in the terminal
# Running {{command|abrt-dump-oops}} on {{filename|not_oops3.test}} should not create crash case.
+
# Running {{command|abrt-dump-oops}} on {{filename|not_oops3.test}} should not create a crash report
# ABRT should automatically detect OOPS in {{filename|/var/log/messages}} and visible via abrt-gui.
+
# ABRT should catch kernel oops appearing in {{filename|/var/log/messages}} and create a crash report, and notify you via the notification area
  
 
Now restart '''rsyslog''' service so writing to {{filename|/var/log/messages}} works correctly again.
 
Now restart '''rsyslog''' service so writing to {{filename|/var/log/messages}} works correctly again.

Revision as of 16:58, 29 March 2011

Description

This test case tests the functionality of the ABRT kerneloops feature. We will check that the abrt-dump-oops works and provides correct amount of crashes detected.


How to test

Note.png
Syslog
This test abuses syslog a bit - don't forget to restart it at the end of the test case.
  1. Download files:
  2. For each file, run the following command: su -c 'abrt-dump-oops -d -o (filename)'
  3. Both times, pen abrt-gui and check if a crash report was created
  4. Make sure /etc/abrt/abrt_event.conf contains EVENT=post-create analyzer=Kerneloops abrt-action-analyze-oops and EVENT=report_kerneloops.org analyzer=Kerneloops abrt-action-kerneloops, and /etc/abrt/abrt.conf contains abrt-dump-oops = abrt-dump-oops -drw /var/log/messages. If you have to change anything, restart abrtd: su -c 'systemctl restart abrtd.service'
  5. Append oops1.test to /var/log/messages with the command su -c 'cat oops1.test >> /var/log/messages'
  6. Observe whether a crash notification appears

Expected Results

  1. After running abrt-dump-oops on oops1.test a crash report should be created and visible via abrt-gui and in the terminal
  2. Running abrt-dump-oops on not_oops3.test should not create a crash report
  3. ABRT should catch kernel oops appearing in /var/log/messages and create a crash report, and notify you via the notification area

Now restart rsyslog service so writing to /var/log/messages works correctly again.