Skip to content

[avocado-misc] Perf: Use the built perf binary [depends on https://github.com/avocado-framework/avocado/pull/6272]#3087

Merged
narasimhan-v merged 3 commits into
avocado-framework-tests:masterfrom
Sumitupadhyay1:Perf_test_integration
May 26, 2026
Merged

[avocado-misc] Perf: Use the built perf binary [depends on https://github.com/avocado-framework/avocado/pull/6272]#3087
narasimhan-v merged 3 commits into
avocado-framework-tests:masterfrom
Sumitupadhyay1:Perf_test_integration

Conversation

@Sumitupadhyay1

@Sumitupadhyay1 Sumitupadhyay1 commented Feb 16, 2026

Copy link
Copy Markdown
Contributor
  • Introduced support for specifying a custom perf binary path in misc tests.
  • Updated perf test scripts to call ensure_tool() from distro_packages
    for dependency handling when a custom binary path is provided.
  • Added corresponding .data/ YAML files for test configuration.
  • Integrated perf tests into the avocado-misc-tests CI pipeline
    to ensure consistency and reproducibility across environments.

Note:

@Sumitupadhyay1 Sumitupadhyay1 force-pushed the Perf_test_integration branch 4 times, most recently from 744bff9 to 105e34b Compare February 26, 2026 12:56
@narasimhan-v narasimhan-v self-assigned this Feb 26, 2026

@PraveenPenguin PraveenPenguin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@nasastry, could you please review this pull request.

@narasimhan-v narasimhan-v changed the title [avocado-misc] Perf: Use the built perf binary [avocado-misc] Perf: Use the built perf binary [depends on https://github.com/avocado-framework/avocado/pull/6272] Mar 5, 2026
@narasimhan-v

Copy link
Copy Markdown
Member

@PraveenPenguin can you please let us know if
we need to wait for @nasastry to review this one
or
can we merge this once the utils PR is merged ?

@narasimhan-v

Copy link
Copy Markdown
Member

@PraveenPenguin can you also please help with moving forward on avocado-framework/avocado#6272 ?
Thanks in advance

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@nasastry, could you please review this pull request and get it merged to the upstream.

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@nasastry, could you please review this pull request and let me know if any changes required.

1 similar comment
@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@nasastry, could you please review this pull request and let me know if any changes required.

@PraveenPenguin

Copy link
Copy Markdown
Member

@PraveenPenguin can you also please help with moving forward on avocado-framework/avocado#6272 ? Thanks in advance

sure @narasimhan-v

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@nasastry, could you please review this pull request.

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

Hi @PraveenPenguin, could you please help get this pull request merged? All checks have passed, there are no conflicts with the base branch, and the changes have already been approved. Merging this will allow us to proceed with avocado-framework/avocado#6272. Thanks for your support!

@nasastry nasastry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@disgoel

disgoel commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

install_distro_packages() returns False when packages are already installed. This causes ensure_tool() to raise RuntimeError. All tests CANCEL with "Failed to install packages for perf".

Raised PR to fix the issue avocado-framework/avocado#6298

[stdlog] 2026-04-15 11:29:22,142 avocado.utils.process process          L0662 INFO | Running 'rpm -q perf'
[stdlog] 2026-04-15 11:29:22,143 avocado.utils.process process          L0711 INFO | Command rpm -q perf running on a thread
[stdlog] 2026-04-15 11:29:22,193 avocado.utils.process process          L0475 DEBUG| [stdout] perf-6.12.0-211.7.1.el10_2.ppc64le
[stdlog] 2026-04-15 11:29:22,193 avocado.utils.process process          L0719 INFO | Command 'rpm -q perf' finished with 0 after 0.050102256s
[stdlog] 2026-04-15 11:29:22,193 avocado.test stacktrace       L0041 ERROR|
[stdlog] 2026-04-15 11:29:22,193 avocado.test stacktrace       L0043 ERROR| Reproduced traceback from: /usr/local/lib/python3.12/site-packages/avocado_framework-112.0-py3.12.egg/avocado/core/test.py:591
[stdlog] 2026-04-15 11:29:22,194 avocado.test stacktrace       L0050 ERROR| Traceback (most recent call last):
[stdlog] 2026-04-15 11:29:22,194 avocado.test stacktrace       L0050 ERROR|   File "/home/avocado-misc-tests/perf/perf_basic.py", line 72, in setUp
[stdlog] 2026-04-15 11:29:22,194 avocado.test stacktrace       L0050 ERROR|     perf_version = ensure_tool("perf", custom_path=perf_path, distro_pkg_map=distro_pkg_map)
[stdlog] 2026-04-15 11:29:22,194 avocado.test stacktrace       L0050 ERROR|                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stdlog] 2026-04-15 11:29:22,195 avocado.test stacktrace       L0050 ERROR|   File "/usr/local/lib/python3.12/site-packages/avocado_framework-112.0-py3.12.egg/avocado/utils/software_manager/distro_packages.py", line 100, in ensure_tool
[stdlog] 2026-04-15 11:29:22,195 avocado.test stacktrace       L0050 ERROR|     raise RuntimeError(f"Failed to install packages for {tool_name}")
[stdlog] 2026-04-15 11:29:22,195 avocado.test stacktrace       L0050 ERROR| RuntimeError: Failed to install packages for perf

@disgoel

disgoel commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Consider renaming YAML files to match their test names.

Comment thread perf/perf_script_bug.py Outdated
Comment thread perf/perfmon.py Outdated
@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

Consider renaming YAML files to match their test names.

@disgoel, Changes taken care. And test are working as expected. Could you please review and approve the same.

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

install_distro_packages() returns False when packages are already installed. This causes ensure_tool() to raise RuntimeError. All tests CANCEL with "Failed to install packages for perf".

Raised PR to fix the issue avocado-framework/avocado#6298

[stdlog] 2026-04-15 11:29:22,142 avocado.utils.process process          L0662 INFO | Running 'rpm -q perf'
[stdlog] 2026-04-15 11:29:22,143 avocado.utils.process process          L0711 INFO | Command rpm -q perf running on a thread
[stdlog] 2026-04-15 11:29:22,193 avocado.utils.process process          L0475 DEBUG| [stdout] perf-6.12.0-211.7.1.el10_2.ppc64le
[stdlog] 2026-04-15 11:29:22,193 avocado.utils.process process          L0719 INFO | Command 'rpm -q perf' finished with 0 after 0.050102256s
[stdlog] 2026-04-15 11:29:22,193 avocado.test stacktrace       L0041 ERROR|
[stdlog] 2026-04-15 11:29:22,193 avocado.test stacktrace       L0043 ERROR| Reproduced traceback from: /usr/local/lib/python3.12/site-packages/avocado_framework-112.0-py3.12.egg/avocado/core/test.py:591
[stdlog] 2026-04-15 11:29:22,194 avocado.test stacktrace       L0050 ERROR| Traceback (most recent call last):
[stdlog] 2026-04-15 11:29:22,194 avocado.test stacktrace       L0050 ERROR|   File "/home/avocado-misc-tests/perf/perf_basic.py", line 72, in setUp
[stdlog] 2026-04-15 11:29:22,194 avocado.test stacktrace       L0050 ERROR|     perf_version = ensure_tool("perf", custom_path=perf_path, distro_pkg_map=distro_pkg_map)
[stdlog] 2026-04-15 11:29:22,194 avocado.test stacktrace       L0050 ERROR|                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stdlog] 2026-04-15 11:29:22,195 avocado.test stacktrace       L0050 ERROR|   File "/usr/local/lib/python3.12/site-packages/avocado_framework-112.0-py3.12.egg/avocado/utils/software_manager/distro_packages.py", line 100, in ensure_tool
[stdlog] 2026-04-15 11:29:22,195 avocado.test stacktrace       L0050 ERROR|     raise RuntimeError(f"Failed to install packages for {tool_name}")
[stdlog] 2026-04-15 11:29:22,195 avocado.test stacktrace       L0050 ERROR| RuntimeError: Failed to install packages for perf

@disgoel, Changes taken care. And test are working as expected. Could you please review and approve the same.

Comment thread perf/perf_duplicate_probe.py.data/perf_duplicate.yaml
@narasimhan-v narasimhan-v requested a review from disgoel April 27, 2026 05:04
@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@disgoel, could you please review and approve this pull request. Merging this will allow us to proceed with avocado-framework/avocado#6272. Thanks for your support!

@disgoel

disgoel commented May 7, 2026

Copy link
Copy Markdown
Contributor

@disgoel, could you please review and approve this pull request. Merging this will allow us to proceed with avocado-framework/avocado#6272. Thanks for your support!

@Sumitupadhyay1 can you look at review comments for perf_script_bug.py & perfmon.py. Otherwise looks good.

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@disgoel, could you please review and approve this pull request. Merging this will allow us to proceed with avocado-framework/avocado#6272. Thanks for your support!

@Sumitupadhyay1 can you look at review comments for perf_script_bug.py & perfmon.py. Otherwise looks good.

@disgoel, Changes taken care. Could you please review and approve the same.

Comment thread perf/perfmon.py Outdated
Comment thread perf/perfmon.py Outdated
@Sumitupadhyay1 Sumitupadhyay1 force-pushed the Perf_test_integration branch from 00f8ec0 to 9273c70 Compare May 12, 2026 10:33
@narasimhan-v narasimhan-v requested a review from disgoel May 13, 2026 05:13
@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@disgoel, all the requested changes taken care. Could you please review and approve this pull request.

@PraveenPenguin

Copy link
Copy Markdown
Member

@Sumitupadhyay1 can you please squash in logical commits .. @disgoel please review

@Sumitupadhyay1 Sumitupadhyay1 force-pushed the Perf_test_integration branch from f074608 to 34998b1 Compare May 18, 2026 05:24
Sumitupadhyay1 and others added 2 commits May 18, 2026 10:55
- Introduced support for specifying a custom perf binary path.
- Updated perf test scripts to use ensure_tool() from distro_packages
  for handling dependent packages when a perf binary path is provided.
- Added corresponding .data/ YAML files for test configuration.

Signed-off-by: Sumit Kumar <sumitkum@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Rename .data YAML files to match test module names; set perf_bin to /tmp/perf.
- Restore perf_duplicate.yaml mux (run_type) for perf_duplicate_probe.
- perfmon: mux perf_bin without ensure_tool; install only build deps.
- perf_script_bug: align with ensure_tool and perf_script_bug.yaml naming.

Signed-off-by: Sumit Kumar <sumitkum@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Sumitupadhyay1 Sumitupadhyay1 force-pushed the Perf_test_integration branch from 34998b1 to 67aad1f Compare May 18, 2026 05:26
Comment thread perf/perfmon.py Outdated
Comment thread perf/perfmon.py Outdated
Address review feedback from @disgoel on PR avocado-framework-tests#3087:
- Remove the perf_bin mux block in setUp(); tests/validate uses
  system perf via PATH, so self.perf_bin was never consumed.
- Drop associated state (_mux_perf_bin, _saved_path) and PATH
  restore logic that only existed to support the dead block.
- Remove the unnecessary "libpfm4 build deps only" comment.
- Trim now-dead perf_bin entries from perfmon.py.data yaml(s).

Signed-off-by: Sumit Kumar <sumitkum@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Sumitupadhyay1 Sumitupadhyay1 requested a review from disgoel May 25, 2026 07:31

@disgoel disgoel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sumitupadhyay1 Thanks for addressing the review comments. LGTM

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

@nasastry, Could you please approve and merge this pull request.

@narasimhan-v

Copy link
Copy Markdown
Member

@PraveenPenguin Since the patch is approved, merging it.

@narasimhan-v narasimhan-v merged commit 3486174 into avocado-framework-tests:master May 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants