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

WIP: PPC: unit: test sortTopology for expected output #1217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shajmakh
Copy link
Contributor

The node topology contains several slices that later on are sorted and used to determine whether two nodes are equal. Add a unit test to verify this sorting is done as expected.

@openshift-ci openshift-ci bot requested a review from MarSik November 14, 2024 13:33
Copy link
Contributor

openshift-ci bot commented Nov 14, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shajmakh
Once this PR has been reviewed and has the lgtm label, please assign ffromani for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Cores: []*cpu.ProcessorCore{
{
ID: 0,
LogicalProcessors: []int{2, 0, 1},
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we have 3 logical processors?

Copy link
Contributor Author

@shajmakh shajmakh Nov 14, 2024

Choose a reason for hiding this comment

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

I picked random values for the test. I can adjust the input if needed if we want it as much to resemble as much as possible an actual computer

Copy link
Contributor

Choose a reason for hiding this comment

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

got it. 3 logical processor is unheard, I'd stick to 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, done

Copy link
Contributor

@ffromani ffromani left a comment

Choose a reason for hiding this comment

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

We can accept tests for private functions in this case

The node topology contains several slices that later on are sorted and
used to determine whether two nodes are equal. Add a unit test to verify
this sorting is done as expected.

Signed-off-by: Shereen Haj <[email protected]>
Copy link
Contributor

openshift-ci bot commented Nov 18, 2024

@shajmakh: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-hypershift a0114e4 link true /test e2e-hypershift

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 21, 2024
@shajmakh shajmakh changed the title PPC: unit: test sortTopology for expected output WIP: PPC: unit: test sortTopology for expected output Nov 21, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants