linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] Introduce structure for shell tests
@ 2024-12-20 22:03 vmolnaro
  2024-12-20 22:03 ` [PATCH 01/10] perf test perftool_testsuite: Add missing description vmolnaro
                   ` (10 more replies)
  0 siblings, 11 replies; 43+ messages in thread
From: vmolnaro @ 2024-12-20 22:03 UTC (permalink / raw)
  To: linux-perf-users, acme, acme, namhyung, mpetlan; +Cc: irogers

From: Veronika Molnarova <vmolnaro@redhat.com>

Hello,

Sending the third patchset from perftool-testsuite upstreaming effort,
which also contains new possibilities for shell tests, such as a two-level
structured test hierarchy, a setup file for the test suite and ability to
store logs.

The patches do not add any new test cases but instead provide the needed
environment that was temporarily replaced by the perftool test drivers.

We wanted to provide the possibility to have a shell test consisting 
of multiple subtests, as is already done for the C tests. The logical 
structuring of the test cases was a part of the perftool test suite,
and we saw this as an opportunity to introduce a structured approach for 
the perf shell tests.

A directory in the shell directory will be represented as a test suite 
if it contains at least one executable shell test. In case of two and 
more tests, the subtests are are visibly differentiated from the test 
suite by having a subtest index. All deeper levels of subdirectories 
are still searched for tests but do not create additional levels of 
hierarchy.

Some test suites require setup to be done before they are run, such 
recording samples or setting up test probes. This can be done by 
adding a "setup.sh" executable file in the test suite directory, which 
will be run before all of the tests. If the setup fails, all of 
the tests are skipped, as it is assumed that the setup is required 
for their execution. The setup file also gives us the possibility to 
name the test suite. If there is no setup file, the name is derived 
from the name of the directory.

Lastly, we wanted to provide a way to store the test logs after execution 
for debugging purposes, if necessary. The test logs for perftool tests 
are stored in a '/tmp/perf_test_*' temporary directory. By default,
these logs are cleared after the test finishes. However, if the env
variable PERFTEST_KEEP_LOGS is set to "y", the test logs are retained
for debugging.

For now, all of the perftool tests are marked as exclusive, preventing 
from running parallel. This may change in the future if we ensure that 
they will not interfere with other tests being run simultaneously.

Thoughts and ideas are welcome.

Thanks and regards,

Veronika

Michael Petlan (1):
  perf testsuite: Fix perf-report tests installation

Veronika Molnarova (9):
  perf test perftool_testsuite: Add missing description
  perf test perftool_testsuite: Return correct value for skipping
  perf test perftool_testsuite: Use absolute paths
  perf tests: Create a structure for shell tests
  perf test: Provide setup for the shell test suite
  perftool-testsuite: Add empty setup for base_probe
  perf test: Introduce storing logs for shell tests
  perf test: Format log directories for shell tests
  perf test: Remove perftool drivers

 tools/perf/Makefile.perf                      |   3 +-
 tools/perf/tests/builtin-test.c               | 151 +++++++++-
 tools/perf/tests/shell/base_probe/setup.sh    |  13 +
 .../base_probe/test_adding_blacklisted.sh     |  17 +-
 .../shell/base_probe/test_adding_kernel.sh    |  57 ++--
 .../perf/tests/shell/base_probe/test_basic.sh |  23 +-
 .../shell/base_probe/test_invalid_options.sh  |  15 +-
 .../shell/base_probe/test_line_semantics.sh   |  11 +-
 tools/perf/tests/shell/base_report/setup.sh   |   8 +-
 .../tests/shell/base_report/test_basic.sh     |  49 ++--
 tools/perf/tests/shell/common/init.sh         |   6 +-
 .../tests/shell/perftool-testsuite_probe.sh   |  23 --
 .../tests/shell/perftool-testsuite_report.sh  |  23 --
 tools/perf/tests/tests-scripts.c              | 258 +++++++++++++++---
 tools/perf/tests/tests-scripts.h              |  15 +
 tools/perf/tests/tests.h                      |   8 +-
 16 files changed, 489 insertions(+), 191 deletions(-)
 create mode 100755 tools/perf/tests/shell/base_probe/setup.sh
 delete mode 100755 tools/perf/tests/shell/perftool-testsuite_probe.sh
 delete mode 100755 tools/perf/tests/shell/perftool-testsuite_report.sh

-- 
2.43.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2025-08-21 11:16 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 22:03 [PATCH 00/10] Introduce structure for shell tests vmolnaro
2024-12-20 22:03 ` [PATCH 01/10] perf test perftool_testsuite: Add missing description vmolnaro
2024-12-20 22:03 ` [PATCH 02/10] perf test perftool_testsuite: Return correct value for skipping vmolnaro
2024-12-20 22:03 ` [PATCH 03/10] perf test perftool_testsuite: Use absolute paths vmolnaro
2024-12-20 22:03 ` [PATCH 04/10] perf tests: Create a structure for shell tests vmolnaro
2024-12-20 22:03 ` [PATCH 05/10] perf testsuite: Fix perf-report tests installation vmolnaro
2024-12-20 22:03 ` [PATCH 06/10] perf test: Provide setup for the shell test suite vmolnaro
2024-12-20 22:03 ` [PATCH 07/10] perftool-testsuite: Add empty setup for base_probe vmolnaro
2024-12-20 22:03 ` [PATCH 08/10] perf test: Introduce storing logs for shell tests vmolnaro
2024-12-20 22:03 ` [PATCH 09/10] perf test: Format log directories " vmolnaro
2024-12-20 22:03 ` [PATCH 10/10] perf test: Remove perftool drivers vmolnaro
2025-01-13 15:24 ` [PATCH 00/10] Introduce structure for shell tests Arnaldo Carvalho de Melo
2025-01-13 18:25   ` [PATCH v2 " vmolnaro
2025-07-21 13:26     ` [PATCH v3 0/7] " Jakub Brnak
2025-07-21 13:26       ` [PATCH v3 1/7] perf test perftool_testsuite: Use absolute paths Jakub Brnak
2025-07-26  6:00         ` Namhyung Kim
2025-08-21 11:01           ` Jakub Brnak
2025-07-21 13:26       ` [PATCH v3 2/7] perf tests: Create a structure for shell tests Jakub Brnak
2025-07-21 19:39         ` Ian Rogers
2025-07-26  6:03         ` Namhyung Kim
2025-08-21 11:15           ` Jakub Brnak
2025-07-21 13:26       ` [PATCH v3 3/7] perf test: Provide setup for the shell test suite Jakub Brnak
2025-07-26  6:07         ` Namhyung Kim
2025-08-04 14:39           ` Michael Petlan
2025-07-21 13:26       ` [PATCH v3 4/7] perftool-testsuite: Add empty setup for base_probe Jakub Brnak
2025-07-21 13:26       ` [PATCH v3 5/7] perf test: Introduce storing logs for shell tests Jakub Brnak
2025-07-21 19:43         ` Ian Rogers
2025-07-26  6:17         ` Namhyung Kim
2025-07-21 13:26       ` [PATCH v3 6/7] perf test: Format log directories " Jakub Brnak
2025-07-26  6:21         ` Namhyung Kim
2025-07-21 13:26       ` [PATCH v3 7/7] perf test: Remove perftool drivers Jakub Brnak
2025-07-21 19:46         ` Ian Rogers
2025-07-31 12:54       ` [PATCH v3 0/7] Introduce structure for shell tests tejas05
2025-01-13 18:25   ` [PATCH v2 01/10] perf test perftool_testsuite: Add missing description vmolnaro
2025-01-13 18:25   ` [PATCH v2 02/10] perf test perftool_testsuite: Return correct value for skipping vmolnaro
2025-01-13 18:25   ` [PATCH v2 03/10] perf test perftool_testsuite: Use absolute paths vmolnaro
2025-01-13 18:25   ` [PATCH v2 04/10] perf tests: Create a structure for shell tests vmolnaro
2025-01-13 18:26   ` [PATCH v2 05/10] perf testsuite: Fix perf-report tests installation vmolnaro
2025-01-13 18:26   ` [PATCH v2 06/10] perf test: Provide setup for the shell test suite vmolnaro
2025-01-13 18:26   ` [PATCH v2 07/10] perftool-testsuite: Add empty setup for base_probe vmolnaro
2025-01-13 18:26   ` [PATCH v2 08/10] perf test: Introduce storing logs for shell tests vmolnaro
2025-01-13 18:26   ` [PATCH v2 09/10] perf test: Format log directories " vmolnaro
2025-01-13 18:26   ` [PATCH v2 10/10] perf test: Remove perftool drivers vmolnaro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).