Bug 478498 - hts-5.3-12 profiler test shows errors in passing test
Summary: hts-5.3-12 profiler test shows errors in passing test
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Retired
Component: Test Suite (tests)
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Rob Landry
QA Contact: Lawrence Lim
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-31 02:30 UTC by Yan Tian
Modified: 2014-03-26 00:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: ====== "/bin/umount /dev/oprofile" has output on stderr Consequence: ============ profiler test fails Fix: ==== Updated Error to Warning and added the wrapper text Result: ======= profiler test passes
Clone Of:
Environment:
Last Closed: 2009-08-27 16:35:45 UTC
Embargoed:


Attachments (Terms of Use)
profiler output.log (378 bytes, text/x-log)
2008-12-31 02:30 UTC, Yan Tian
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1234 0 normal SHIPPED_LIVE new package: v7 2009-08-27 16:33:58 UTC

Description Yan Tian 2008-12-31 02:30:06 UTC
Created attachment 327987 [details]
profiler output.log

Description of problem:
profiler test running show error info as below, then pass finally.

Running ./profiler.py:
Linux image for 2.6.18-124.el5xen not found
/bin/sh: opcontrol: command not found
/bin/sh: opreport: command not found
Warning:
Error: "opcontrol --shutdown" has output on stderr
Verified data has beed removed
umount: /dev/oprofile: not found
Error:
Error: "/bin/umount /dev/oprofile" has output on stderr
...finished running ./profiler.py, exit code=1

Version-Release number of selected component (if applicable):
hts-5.3.12

How reproducible:
always

Steps to Reproduce:
1.hts plan
2.hts run --test profiler
3.cat /var/log/hts/runs/1/profiler/output.log
  
Actual results:
profiler test pass but show error

Expected results:
profiler test pass without error

Additional info:
attach /var/log/hts/runs/1/profiler/output.log

Comment 2 Vivian Bian 2009-01-19 07:46:45 UTC
when running the profiler test on the rhel4 i386 for the hts-5.3-12 there will be the error info like this:
# cat /var/log/hts/runs/8/profiler/output.log

Running ./profiler.py:
Linux image for 2.6.9-78.12.ELsmp not found
Daemon not running
opreport error: No sample file found: try running opcontrol --dump
or specify a session containing sample files

Warning:
Error: "opcontrol --shutdown" has output on stderr
Verified data has beed removed
No events given.
Using default event:
No events given.

Comment 3 Greg Nichols 2009-01-19 15:31:22 UTC
The test should pass (as it does).   The error is when the test tries to unmount the /dev/oprofile directory, which does not indicate test failure.   The bug is that the Error message should be a warning.

Comment 4 Yan Tian 2009-01-22 05:10:57 UTC
when running the profiler test on the rhel4 x86_64 for the hts-5.3-14 there will
be the error info like this:
# cat /var/log/hts/runs/21/profiler/output.log

Running ./profiler.py:
Linux image for 2.6.9-78.28.ELsmp not found
Daemon not running
opreport error: No sample file found: try running opcontrol --dump
or specify a session containing sample files

Warning:
Error: "opcontrol --shutdown" has output on stderr
Verified data has beed removed
Using default event: CPU_CLK_UNHALTED:10000:0:1:1
Daemon started.

Comment 5 Rob Landry 2009-06-10 20:22:31 UTC
Re: error vs. warning, another possible solution would be to add some wrapper text to the output something like:

==== START: Errors between theses lines may safely be ignored: ====


^^^^ END: Errors between these lines may safely be ignored. ^^^^

Comment 6 Rob Landry 2009-06-12 18:12:39 UTC
From what I see in resetOProfile there's no way for it to exit or return with a fail.  Updated Error to Warning as per comment #3 and and added the wrapper text as per comment #5.


Suggested patch:
----------------

--- profiler.py.orig	2009-06-12 13:58:11.000000000 -0400
+++ profiler.py	2009-06-12 14:07:32.000000000 -0400
@@ -80,6 +80,9 @@
         print "oprofile version: %s" % version
    
     def resetOProfile(self):
+        print "\n==== START: Errors during reset may be ignored. ===="
+        sys.stdout.flush()
+
         # start the daemon
         try:
             Command("opcontrol --shutdown").echo()
@@ -92,8 +95,8 @@
         try:
             command = Command("opreport")
             command.echo()
-            # the obove command should have error output
-            print "Error: opreport shouldn't report data after a reset"
+            # the above command should have error output
+            print "Warning: opreport shouldn't report data after a reset"
 
         except HTSCommandException, exception:
             # we expect an exception for error output
@@ -111,6 +114,9 @@
         if "oprofile" in command.output:
             print "Warning: oprofile module not removed on system reset"
             
+        print "^^^^ END: Errors during reset may be ignored. ^^^^\n"
+        sys.stdout.flush()
+
         return True
     
     def startOProfile(self):





Results in output:
------------------

Running ./profiler.py:
Linux image for 2.6.27.24-78.2.53.fc9.i686 not found

==== START: Errors during reset may be ignored. ====
Daemon not running
opreport error: No sample file found: try running opcontrol --dump
or specify a session containing sample files

Warning:
Error: "opcontrol --shutdown" has output on stderr
Verified data has beed removed
^^^^ END: Errors during reset may be ignored. ^^^^

Daemon started.
starting opcontrold
started
oprofile start: initializing...

Comment 9 Yan Tian 2009-08-13 08:48:52 UTC
Verified v7-1.0-14.el5 profiler test passed on RHEL5.4 Server x86_64 system and log file included following info:

......
==== START: Errors during reset may be ignored. ====
Daemon not running
opreport error: No sample file found: try running opcontrol --dump
or specify a session containing sample files

Warning:
"opcontrol --shutdown" has output on stderr
Verified data has beed removed
^^^^ END: Errors during reset may be ignored. ^^^^
......

Comment 12 YangKun 2009-08-21 10:34:57 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
Cause:
======
"/bin/umount /dev/oprofile" has output on stderr

Consequence:
============
profiler test fails

Fix:
====
Updated Error to Warning and added the wrapper
text

Result:
=======
profiler test passes

Comment 13 errata-xmlrpc 2009-08-27 16:35:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1234.html


Note You need to log in before you can comment on or make changes to this bug.