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
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.
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.
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.
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. ^^^^
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...
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. ^^^^ ......
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
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