Skip to content

Conversation

@geetanjalimanegslab
Copy link
Contributor

@geetanjalimanegslab geetanjalimanegslab commented Jul 29, 2025

Description

Added fix for issue: VerifyCPUUtilization failing when added in the middle of other tests

Fixes #1283

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 29, 2025

CodSpeed Performance Report

Merging #1294 will not alter performance

Comparing geetanjalimanegslab:issue_1283_fix_VerifyCPUUtilization (a7d3c5d) with main (cca76c4)

Summary

✅ 26 untouched benchmarks

self.result.is_failure(f"Device has reported agent crashes:\n * {agents}")


class VerifyCPUUtilization(AntaTest):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have separate test (i.e VerifyRunningProcesses) where we can verify the average runnable or uninterruptible processes.
So we can have two separate tests

  1. The existing VerifyCPUUtilization test focus only on CPU usage (with a deprecation warning to the new test).
  2. A new test, VerifyRunningProcesses, to handle the process

@carl-baillargeon could you please confirm?

Copy link
Contributor

@carl-baillargeon carl-baillargeon Jul 29, 2025

Choose a reason for hiding this comment

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

IMO the current test VerifyCPUUtilization is broken and leads to false positives so it's fine to modify its behavior so it's more robust.

@vitthalmagadum vitthalmagadum marked this pull request as ready for review July 29, 2025 09:18
@geetanjalimanegslab geetanjalimanegslab force-pushed the issue_1283_fix_VerifyCPUUtilization branch from 975c8c4 to 24823b9 Compare July 30, 2025 09:22
@sonarqubecloud
Copy link

Copy link
Contributor

@carl-baillargeon carl-baillargeon left a comment

Choose a reason for hiding this comment

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

Let's investigate more about the proper default values for the averages. It depends on the CPU count on EOS. Maybe fetch the CPU count first using lscpu or something and then check the averages.

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.

fix(anta.tests): VerifyCPUUtilization failing when added in the middle of other tests

3 participants