Bug 478498 - hts-5.3-12 profiler test shows errors in passing test
hts-5.3-12 profiler test shows errors in passing test
Status: CLOSED ERRATA
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Test Suite (tests) (Show other bugs)
5.3
All Linux
low Severity medium
: ---
: ---
Assigned To: Rob Landry
Lawrence Lim
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-30 21:30 EST by Yan Tian
Modified: 2014-03-25 20:56 EDT (History)
5 users (show)

See Also:
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
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-27 12:35:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Yan Tian 2008-12-30 21:30:06 EST
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 02:46:45 EST
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 10:31:22 EST
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 00:10:57 EST
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 16:22:31 EDT
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 14:12:39 EDT
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 04:48:52 EDT
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 06:34:57 EDT
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 12:35:45 EDT
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.