Skip to content

Updated KVMCI Branch with master - #409

Open
PraveenPenguin wants to merge 26 commits into
KVMCIfrom
master
Open

PraveenPenguin wants to merge 26 commits into
KVMCIfrom
master

Conversation

@PraveenPenguin

Copy link
Copy Markdown
Collaborator

No description provided.

Anushree-Mathur and others added 26 commits June 4, 2026 14:42
Currently, bootstrap only supports major version package definitions.
This prevents handling packages that exist only in specific minor
versions of an OS.

This commit adds minor version support by:
- Tracking both major and full version identifiers
- Checking version-specific sections first (e.g., deps_<os><major>_<minor>)
- Falling back to major version sections if not found
- Applying same logic to environment-type packages (kvm, NV, pHyp)

Example config usage:
  [deps_rhel9_3]
  packages = version-specific-package

Signed-off-by: Anushree-Mathur <anushree.mathur@linux.ibm.com>
TX Queue size above 256 is not supported on power systems unless
you're using user agent. Hence, these tests are not valid for our
use cases.
Add optional resume_job_dir parameter to run_test() to support
resume mode. Defaults to None so all existing call sites are
unaffected.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Move the existing nrun/cmd build logic into an else branch to
prepare for resume_job_dir handling in the if branch.
No functional change to normal runs.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
When resume_job_dir is set, extract the job ID from the job dir
name and invoke 'avocado replay <job_id>'. Modern avocado replay
re-runs only the not-passed tests from the prior job automatically,
works for both host and guest suites without extra flags.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Add --resume flag to argparse. When set the wrapper uses the
existing outputdir to scan prior job results and resume from
where the run was interrupted.

Usage:
  python avocado-setup.py --run-suite host_a,host_b,host_c --resume

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
On --resume, scan all job-* subdirs in outputdir and build
suite_job_map mapping suite_name to its prior job dir path.

Host suites matched by test file basename in avocado test IDs.
Guest suites matched by suite shortname in VT test IDs.
Job dirs with no/unreadable results.json stored as __interrupted__
fallback (system crashed before results were written).

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
_suite_completed: returns True when a suite has a prior job dir
with a clean results.json (total > 0, interrupt == 0).

_suite_replay_dir: returns the prior job dir to replay for a suite,
or None when the suite never ran (no job dir) so it runs fresh.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
On --resume, for each suite in order:
  - completed (clean results.json)  -> skip with logged message
  - interrupted (no/partial results) -> avocado replay <job_id>
  - never ran (no job dir at all)   -> normal fresh run

Suites that never ran (e.g. system rebooted before they started)
receive None from _suite_replay_dir and run fully fresh.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Add --resume to the script help output block and add a new
argument details entry (item 20) explaining:
- What --resume does (scans results dir, classifies suites)
- The three states: completed/skip, interrupted/replay, never ran/fresh
- Usage examples with and without --output-dir
- Note that --run-suite must match the original run
- Works for both host and guest test suites

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Short 7-char hash suffix extracted from the job dir name is not unique
enough when multiple prior jobs share the same suffix — avocado raises
ValueError: 'hash is not unique enough'.

Switch to passing the full absolute path directly.  avocado's
get_job_results_dir() accepts a direct path when the directory exists
and contains an 'id' file, so no hash lookup is needed at all.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
…y cmd

Wire up replay_path (introduced in the previous commit) into both the
logger.info call and the avocado replay command string.

Add --resume so avocado skips tests that already PASS/SKIP in the source
job and only re-runs the remaining/interrupted tests — without it avocado
replays the entire job from scratch.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
The old two-line docstring did not explain the three decision cases or
why the __interrupted__ key is treated differently from a normal suite
match.  Replace it with an explicit numbered priority list so future
readers understand the logic without having to trace through the code.

No functional change — docstring only.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
…→ not in)

The previous condition:

    if '__interrupted__' in suite_job_map and suite_name in suite_job_map:

...required suite_name to already be present in suite_job_map, which is
the exact opposite of the intended logic.  The __interrupted__ dir should
be claimed by the suite that has NO own entry in suite_job_map — i.e. the
suite that was actively running when the process was killed and never
wrote results.json.

Fix: change 'suite_name in suite_job_map' to 'suite_name not in suite_job_map'.

Symptom fixed:
  avocado-setup.py --run-suite host_rasci --resume
  restarted hwinfo from test 01/12 instead of resuming from 07/12.

Signed-off-by: Praveen K Pandey <praveen@linux.ibm.com>
Keep the existing system-wide pip path as default.
Add --use-venv / AVOCADO_USE_VENV for a clean virtualenv
install that avoids distro package conflicts.

Signed-off-by: Srikanth Aithal <Srikanth.Aithal@amd.com>
enhance pasue and replay based on variant
Support optional isolated venv for Avocado bootstrap
Install aautils alongside avocado-framework during bootstrap so tests
that depend on autils helpers (e.g. LKP utilities for jitter and
stress-ng) work without a separate manual pip step.
aautils is a general-purpose Avocado utility library, not ELVES-specific,
so keep it in the upstream package list.

Signed-off-by: Sumit Kumar <sumitkum@amd.com>
env.conf: add aautils to framework base packages
Define SLES 16.1 specific packages in [deps_sles16_1] section. These packages are only available or required for SLES 16.1 and will not be installed on other SLES 16.x versions.

Signed-off-by: Anushree-Mathur <anushree.mathur@linux.ibm.com>
Currently, bootstrap only supports major version package definitions.
This prevents handling packages that exist only in specific minor
versions of an OS.

This commit adds documentation for the minor version support by:
- Explaining how the wrapper checks minor version-specific sections
  first (e.g., [deps_sles16_1]) before falling back to the major
  version section (e.g., [deps_sles16])
- Documenting the same fallback logic for environment-type packages
  (e.g., [deps_sles16_1_kvm] -> [deps_sles16_kvm])
- Providing a clear example config usage in config/wrapper/env.conf
- Highlighting that packages in [deps_sles16_1] are pre-requisite
  packages only for SLES 16.1 and will not affect other SLES 16.x
  versions

Signed-off-by: Anushree-Mathur <anushree.mathur@linux.ibm.com>
Support minor version-specific package dependencies!
docs: document minor version-specific package dependencies in README!
Add SLES 16.1 specific package dependencies!
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