Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Version Check to Reserved Core Freqency Tuning Test. Fix and move CompareOCPVersionWithCurrent() #51

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

josclark42
Copy link
Collaborator

  • This PR adds an OCP version check to the Reserved Core Freqency Tuning test, ensuring it only runs on OCP 4.16 or greater.

  • CompareOCPVersionWithCurrent() was moved from tests/system-tests/internal/platform/platform.go to tests/internal/cluster/config.go so it could be imported into tests/cnf/ran/tests

  • tests/system-tests/vcore/internal/vcorecommon/cgroup-operator.go was updated to reflect the new location of CompareOCPVersionWithCurrent()

  • Finally, a bug was found and fixed in CompareOCPVersionWithCurrent(). Previously, in the case where isGreater=true and the check failed, the LessThan function would still run and the function would return true erroneously. Essentially the function was testing for both greater than and less than at the same time. I added an if !greater block around the final check to fix this.

@josclark42
Copy link
Collaborator Author

@klaskosk @yliu127 Would you please review? Also, please let me know who on the system-tests side should be added as a reviewer as this PR affects their tests.

tests/cnf/ran/powermanagement/tests/cpufreq.go Outdated Show resolved Hide resolved
tests/internal/cluster/config.go Outdated Show resolved Hide resolved
tests/internal/cluster/config.go Outdated Show resolved Hide resolved
@josclark42
Copy link
Collaborator Author

@yliu127 @klaskosk I updated this PR based on the changes Kristen made in the ZTP PR to RanConfig. This makes version checks much simpler. I also added a check to the helper to create the performanceProfile if it does not exist which should fix the panic when the test is run in CI.

Copy link
Collaborator

@klaskosk klaskosk left a comment

Choose a reason for hiding this comment

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

/lgtm

@yliu127 yliu127 merged commit 966fae6 into openshift-kni:main Jul 4, 2024
1 check 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.

3 participants