Commit [46da03]  Maximize  Restore  History

Fix ocount/operf tests when cpu type 'timer' is detected

If running the full testsuite (i.e., 'runtest --tool=oprofile'), the
oprofile-opcontrol runs before the operf tests. However, the exit proc
does not run until we're completely finished, so opcontrol_exit will
not have been called to do the deinit. Some newer processor models
are not supported by opcontrol except in timer mode, so running
opcontrol results in /dev/oprofile/cpu_type being set to 'timer' by
the oprofile kernel module. If operf/ocount are run in such a situation,
they detect the "timer" mode and exit with a message telling the user
to run 'opcontrol --deinit'. This causes the ocount and operf tests
to fail when we attempt to get the operf or ocount version.

The change made with this patch is to try to run 'opcontrol deinit'
(assuming we are root user) if the initial attempt to get the tool version
failed; then we'll try again to get the version for the ocount or operf tool.
If we're not user, we'll print a big message asking the user to
try 'opcontrol --deinit'.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

Maynard Johnson Maynard Johnson 2014-02-13

changed testsuite/lib/ocount_util.exp
changed testsuite/lib/operf_util.exp
changed testsuite/oprofile-ocount/ocount-run.exp
testsuite/lib/ocount_util.exp Diff Switch to side-by-side view
Loading...
testsuite/lib/operf_util.exp Diff Switch to side-by-side view
Loading...
testsuite/oprofile-ocount/ocount-run.exp Diff Switch to side-by-side view
Loading...

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks