oprofile-tests Log


Commit Date  
[921995] by Maynard Johnson Maynard Johnson

Make new XML tests run on oprofile 1.0 or higher

The schema validation being done in the newly-added XML tests
fails when run against a version of oprofile that does not have
the recent schema fixes. This patch checks the oprofile version
and skips the XML tests if the version is 0.9.9 or lower.
Additionally, a change was made so that XML tests would only be
run once. Also made a few indentation corrections.

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

2014-06-23 18:53:39 Tree
[75ec9c] by Maynard Johnson Maynard Johnson

Add testcases to ensure XML instance docs are valid

The following simple tests using xmllint have been incorporated into oprofile-tests:

1)
opreport --symbols --callgraph --xml --outputfile=out.xml
xmllint --noout --schema <oprof-install-dir>/share/doc/oprofile/opreport.xsd out.xml

2)
opreport --symbols --debug-ifo --xml --outputfile=out.xml
(profile done with multiple events)
xmllint --noout --schema <oprof-install-dir>/share/doc/oprofile/opreport.xsd out.xml

3)
ophelp --xml > out.xml
xmllint --noout --schema <oprof-install-dir>/share/doc/oprofile/ophelp.xsd out.xml

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

2014-05-30 18:48:07 Tree
[51a0cb] by Maynard Johnson Maynard Johnson

Add 'opcontrol --deinit' at the beginning of operf/ocount tests

On some platforms and some versions of oprofile, having the oprofile
kernel module loaded when trying to run operf can cause problems
(e.g., the kernel module may report cpu type as "timer"). So this
change simply ensures the kernel module is unloaded before starting
operf and ocount tests.

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

2014-03-24 15:10:36 Tree
[1b7455] by Maynard Johnson Maynard Johnson

Detect vmlinux file with no symbols

Some platforms include a /boot/vmlinux-`uname -r` file that has
no symbols. The oprofile testsuite currently assumes that such
a file does have symbols and will fail horribly if it finds such
a stripped file. This patch makes the testsuite more robust by
doing some basic checking of the file for validity.

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

2014-02-18 19:12:21 Tree
[00511d] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

OProfile, testsuite fix for kallsyms test

Kallsyms support was added in version 1.0. The kallsyms test is not
valid on earlier versions of oprofile. This patch ensures the test
oprofile-kallsyms-readable_run_tests only runs on oprofile versions
1.0 and higher

Signed-off-by: Carl Love <carll@us.ibm.com>

2014-02-17 15:22:37 Tree
[b7e77a] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

Ocount, fix run time parameter

The units for the --time-interval was changed from units of seconds to
units of milliseconds in version 1.0. This patch sets the --time-interval
appropriately for version 1.0 and for previous versions.

Signed-off-by: Carl Love <carll@us.ibm.com>

2014-02-17 15:21:08 Tree
[6b8f99] by William Cohen William Cohen

Add operf testing support for ARMv8

Signed-off-by: William Cohen <wcohen@redhat.com>

2014-02-13 20:33:04 Tree
[46da03] by Maynard Johnson Maynard Johnson

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>

2014-02-13 00:07:51 Tree
[ff956b] by Maynard Johnson Maynard Johnson

Add support for IBM POWER8 processor

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

2014-02-12 19:34:13 Tree
[dc9651] by Carl E. Love Carl E. Love , pushed by Maynard Johnson Maynard Johnson

Testsuite, add tests for kallsyms, callgraph and debug info options

Add a test to verify that the kernel symbols were properly found in
/proc/kallsyms if the vmlinux file was not used.

Add test to verify /proc/kallsyms can be read.

Add test to verify the output format when the --debug-info and --symbols
options are used with opreport.

Add test to verify the --callgraph option at least produces some results.

The do_test procedure in oprofile-single_process-run.exp is moved to
lib/operf_util.exp and renamed do_single_process_test since it is now used
by tests in oprofile-operf-run.exp and oprofile-single_process-run.exp.

The do_test procedure in oprofile-operf-run.exp is also moved to
lib/operf_util.exp and renamed do_system-wide_test to keep the organization
of the test files similar.

Signed-off-by: Carl E. Love <carll@us.ibm.com>

2014-01-08 22:46:30 Tree
[967103] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

OProfile testsuite: Fix event name check in proc get_event_count

The recent patch to fix OProfile bug 253

"ocount does not display user specified unit mask, kerne and user values"

changed the output format when collecting in user or kernel mode only.
This change broke the testsuite function that extracted the count for a
given symbol because the expected symbol failed to match the symbol with
the user and kernel modes appended. This patch fixes the issue by spliting
the symbol from the output on colons and then checking the string before the
colon.

Signed-off-by: Carl Love <cel@us.ibm.com>

2013-12-11 15:11:47 Tree
[5855d1] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

oprofile-tests: Fix error message "Do not know how to handle version {1.0.0git}"

This patch fixes the message "Do not know how to handle version {1.0.0git}".
The current code requires that each new major version be added to the
case statement for versions greater then 0.5. Apparently, versions prior
to 0.5 were not supported by the testsuite for some now unkown reason. This
patch creates a specific case to handle the pre 0.5 versions, the 0.5 version
and all newer versions are handled by the default case. The case for the
pre 0.5 version of profile will simply print a message saying the version
is not supported. The case for version 0.5 is unchanged. The default
will handle all newer versions so this issue doesn't have to be continually
fixed with each major version change.

Signed-off-by: Carl Love <cel@us.ibm.com>

2013-10-08 21:18:46 Tree
[f8a53f] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

Add test for the ocount tool

The patch adds support for two additional testsuites for testing the ocount
tool. The first testsuite runs a series of tests on the ocount tool. The
tests include:

- each event generates non-zero counts
- counting for each event for an interval of n seconds, 2*n and 4*n scale as
expected
- the sum of the counts for each event in user mode only, kernel mode
only match counting in user and kernel mode
- the output using the brief output format is verified

The above tests are run when the tool "oprofile" or "oprofile-ocount" are run.

The second testsuite includes the additional test:

- counting cycles for an interval of n seconds matches n*proc_frequency

This testsuite is only run when the tool "cycle-check-ocount" is specified.
The testsuite checks the event count against the reported CPU frequency which
may or may not be the actual operating CPU frequency. The reported frequency
and the actual frequency may differ if the CPU is running in the Intel "turbo"
mode or at a lower frequency for thermal management. The user may need to
manually verify any test failures based on the actual operating CPU frequency
not the reported CPU frequency.

Signed-off-by: Carl Love <cel@us.ibm.com>

2013-08-16 18:39:23 Tree
[f9d2e3] by Andi Kleen Andi Kleen , pushed by William Cohen William Cohen

Adjust the Intel Sandy Bridge event counts to allow use with Intel Haswell

The minimum event counts for Intel Haswell are just slightly higher
than the ones allowed by Intel Sandy Bridge and cause the tests to
fail without this adjustment in the event counts.

Signed-off-by: William Cohen <wcohen@redhat.com>

2013-07-25 21:40:57 Tree
[1cac98] by William Cohen William Cohen

Allow opcontrol tests to identify Intel Ivy Bridge and Sandy Bridge processors

For all the Intel processors that provide architected events reading
/dev/oprofile/cpu_type just returns i386/arch_perfmon. To get a more
exact list of events available the opcontrol tests need to examine
model number in /proc/cpuinfo. This patch adds recognition of Intel
Ivy Bridge and Intel Sandy Bridge processors.

Signed-off-by: William Cohen <wcohen@redhat.com>

2013-07-25 19:38:40 Tree
[82901d] by William Cohen William Cohen

Recognize the Intel Haswell processors for testing

Signed-off-by: William Cohen <wcohen@redhat.com>

2013-07-25 19:35:11 Tree
[778dbf] by William Cohen William Cohen

Factor out common code for processor name/events from opcontrol and operf tests

Want to avoid having two different places for the mapping of names to events.
This combines the code code for operf and opcontrol tests together.

Signed-off-by: William Cohen <wcohen@redhat.com>

2013-07-25 19:07:30 Tree
[36ab63] by William Cohen William Cohen

For operf tests purposes Intel Ivybridge and Intel Sandybridge are the same

The Intel Ivybridge is very similar to the Intel Sandybridge. The
testsuite was missing a definition for Ivybridge. Rather than making
yet another definition make the Intel Ivybridge use the Intel
Sandybridge definition.

Signed-off-by: William Cohen <wcohen@redhat.com>

2013-07-25 17:12:54 Tree
[656acf] by William Cohen William Cohen

Correct the specified processor type for ARM Cortex processors in the operf test

The ARM Cortex A5, Cortex A7, and Cortex A15 operf tests used an
undefined arm_cortex cpu type which has not been defined in the tests.
These architectures all include the common armv7 events and they can
safely use arm7 cpu type.

Signed-off-by: William Cohen <wcohen@redhat.com>

2013-07-25 14:03:36 Tree
[e53cd7] by Maynard Johnson Maynard Johnson

Adjust events for IBM POWER7 processor

The POWER7+ processor (which has the same events as POWER7)
has a much larger cache than POWER7. When running the
testsuite on POWER7+, the PM_BR_PRED_CCACHE event was not
being seen at all. I removed this event from the list of
events to monitor for since cache-related events are not
easy to deterministically predict for unknown processor
types. I also adjusted down the number of certain other
POWER7 events to help ensure the testing would "see" some
samples for those events.

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

2013-03-05 17:36:31 Tree
[cbab12] by Maynard Johnson Maynard Johnson

Fix tcl workload symbol checking

Intermittently, the operf system-wide and operf single-process
tests fail after running the tcl workload (which executes a dd
command) and attempting to find the string "/bin/dd" in the
opreport output. The reason for this is two-fold:
- operf will profile child processes that a parent process will
fork/exec, but will terminate the profiling once the parent
process exits.
- The testsuite/workloads/tcl_src/workload.tcl script execs
the dd command as the last statement in the script and then
exits.

Considering the two facts stated above, it's clear that profiling
of the dd command may or may not occur, depending on timing.
Once the parent tcl process exits, operf will detect the parent
exiting and will shutdown profiling. Some samples may have been
collected for the dd command before this shutdown occurs, but maybe
not.

To avoid this timing issue, this patch simply changes the symbol
we check for in the tcl profile output from "/bin/dd" to "libtcl".

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

2012-10-18 18:47:35 Tree
[e2a4ff] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

OProfile testsuite, add single process profiling functionality

This patch adds another test to the suite of tests. The test runs each of
the workloads with operf in single process mode. The test verifies that
samples were collected for each run. The test checks to make sure the
symbols were found for the first event group, just as is done in the
oprofile-operf test. The testsuite can be run as root or as a regular user.

Signed-off-by: Carl Love <cel@us.ibm.com>

2012-10-18 12:43:35 Tree
[485655] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

OProfile testsuite, Add symbol checking functionality

This patch adds additional testing and workload capability. The
patch adds the capability to easily add a new workload specification
and a list of symbols that should be present in the OProfile report.
The testsuite runs each of the specified workloads with each of the
event lists currently specified. The output from opreport is
checked to verify the workload symbols are found.

Signed-off-by: Carl Love <cel@us.ibm.com>

2012-10-09 14:24:07 Tree
[533c95] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

Oprofile testsuite, fix proc op_daemon_delete_any_samples, it doesn't work correctly

The op_daemon_delete_any_samples procedure is not correctly deleting
samples. This patch replaces the body of the procedure with the
"opcontrol --reset" call to remove the existing samples. The patch
also moves the function to lib/op_util.exp so it can be called by
the operf testsuite as well. A call to op_daemon_delete_any_samples was
added to the operf test main routine to make sure any opcontrol samples are
deleted so opreport will not pickup any samples from a previous opcontrol
run.

Signed-off-by: Carl Love <cel@us.ibm.com>

2012-10-05 19:43:25 Tree
[63fb4a] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

OProfile testsuite, fix perf kill command

The operf user tool expects to get a kill -SIGINT signal. However
the SIGINT signal can not be sent from a script, it must come from
the command line. Hence the pkill -P command was used to kill the
parent and children processes. A bug was found in that the pkill
command kills operf without letting it completely finish the data
processing and exit cleanly. This issue actually was found when
testing a patch that is currently under development to check for
specific symbols. The kill -INT signal can be sent from the script
and is properly caught by operf. When operf catches the INT signal
it shuts down cleanly rather then exiting immediatly. This patch
fixes the current kill command to make sure operf exits cleanly.

Signed-off-by: Carl Love <cel@us.ibm.com>

2012-09-28 14:13:30 Tree
Older >