Skip to content

add lkp helper for Intel LKP - #6314

Open
Sumitupadhyay1 wants to merge 1 commit into
avocado-framework:masterfrom
Sumitupadhyay1:lkp_benchmark
Open

add lkp helper for Intel LKP#6314
Sumitupadhyay1 wants to merge 1 commit into
avocado-framework:masterfrom
Sumitupadhyay1:lkp_benchmark

Conversation

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor

Add framework-independent Intel LKP helper utilities
Add a set of framework-independent utilities that simplify working with Intel LKP locally, including helpers to:

  • Clone and install lkp-tests
  • Split and install benchmark jobs
  • Run LKP microbenchmarks locally
  • Discover benchmark result artifacts
  • Archive outputs generated during benchmark runs

@mr-avocado mr-avocado Bot moved this to Review Requested in Default project Jul 3, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a new utility module avocado/utils/lkp.py to drive Intel LKP (lkp-tests) microbenchmarks. The feedback highlights several critical issues: potential localization failures in the tolerant apt installer script, incorrect execution of chained commands under sudo when using shell execution, missing sudo support in install_job for dependency installation, potential OSError exceptions when sorting files by modification time, and a failure in archive_results if the destination path exists as a file or symlink instead of a directory.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread avocado/utils/lkp.py
Comment thread avocado/utils/lkp.py
Comment thread avocado/utils/lkp.py Outdated
Comment thread avocado/utils/lkp.py Outdated
Comment thread avocado/utils/lkp.py
Comment thread avocado/utils/lkp.py Outdated
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 114 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.34%. Comparing base (834457a) to head (12386ea).

Files with missing lines Patch % Lines
avocado/utils/lkp.py 0.00% 114 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6314      +/-   ##
==========================================
- Coverage   71.69%   71.34%   -0.36%     
==========================================
  Files         206      207       +1     
  Lines       23480    23594     +114     
==========================================
- Hits        16834    16833       -1     
- Misses       6646     6761     +115     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add framework-independent helpers to clone, install, split/install a job,
and run lkp-tests microbenchmarks locally, plus helpers to locate and
archive the result artifacts a run produces.

Signed-off-by: Sumit Kumar <sumitkum@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@pevogam

pevogam commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Hi @Sumitupadhyay1, this pull requests seems to narrowly specialized to me to be merged into the generic avocado.utils.

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

this pull requests seems to narrowly specialized to me to be merged into the generic avocado.utils.

Thanks @pevogam. avocado.utils already includes several single-tool/subsystem wrappers (e.g. nvme.py, multipath.py, softwareraid.py, pmem.py, iso9660.py, cloudinit.py, podman.py, gdb.py), so lkp.py follows an established pattern.
It's a small, framework-independent wrapper built only on existing utils (git, process) — clone/install/split/run/locate+archive results. It holds no test logic (no package policy, no assertions, no avocado.Test coupling); that stays in the consuming test. It's already used by multiple avocado-misc-tests (see #3218), with more LKP microbenchmarks to follow, so centralizing it avoids each test re-implementing the same steps.
If the worry is that LKP is a third-party harness rather than a system facility, I'm happy to move it under a dedicated namespace like avocado.utils.benchmark.lkp, or ship it as a shared lib in avocado-misc-tests instead. Let me know your preference.

@pevogam

pevogam commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Hmmm I see. We could always ask for the opinions of more people here. In the meantime I would still recommend that if you strongly believe this PR is contributable that you push a pull request to avocado-framework/aautils as well.

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

Hmmm I see. We could always ask for the opinions of more people here. In the meantime, I would still recommend that if you strongly believed this PR is contributable that you push a pull request to avocado-framework/aautils as well.

Thank. I'd also be open to contributing this additionally to avocado-framework/aautils.

My main question is about the intended usage model: how and when are tests expected to consume this functionality from aautils? Right now, we are using utils from avocado only. Can you help with the documentation for tests consuming these utils from aautils ?

@pevogam

pevogam commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

The simple answer is: always. The avocado core is no longer meant to contain any but the most substantial utilities and the "batteries" are essentially all meant to be moved there. As such merging pull request like this one will only introduce technical debt due to the need of future migration.

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

The simple answer is: always. The avocado core is no longer meant to contain any but the most substantial utilities and the "batteries" are essentially all meant to be moved there. As such merging pull request like this one will only introduce technical debt due to the need of future migration.

Thanks for the clarification. That makes sense, and I'm happy to move lkp.py to aautils to avoid future migration work.
Could you also let me know the appropriate location/package in aautils where this should go? The project structure is a bit different, and I'd like to place it in the right location.

@pevogam

pevogam commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

I think you know best the specific use cases for this utility and thus can fit it in a proper category there best.

@Sumitupadhyay1

Copy link
Copy Markdown
Contributor Author

I think you know best the specific use cases for this utility and thus can fit it in a proper category there best.

As discussed, I've opened a Pull Request to aautils as well:
avocado-framework/aautils#107

Please help me to get it reviewed and merged.

@pevogam

pevogam commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Reviewed and merged, I suggest that we keep this new functionality there instead of having to introduce it and right after that deprecate it here. Are you ok with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review Requested

Development

Successfully merging this pull request may close these issues.

2 participants