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

Verify that tests correctly handle rounding on 4GiB boundaries #21

Closed

Conversation

derek-pryor
Copy link

What type of PR is this?
/kind bug

What this PR does / why we need it:
Verify that PR #199 addresses Issue #94128 by changing the GCP rounding to use a 4GiB aligned value. The GCP CSI driver is used because it contains a common method for rounding that is easy to modify for testing.

Which issue(s) this PR fixes:

Special notes for your reviewer:
This is a test PR and will not be merged. It is being used to run the test suites to verify that an existing fix works as expected.

Does this PR introduce a user-facing change?:

None

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 12, 2022
@openshift-ci openshift-ci bot requested review from dobsonj and jsafrane January 12, 2022 20:09
@openshift-ci
Copy link

openshift-ci bot commented Jan 12, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: derek-pryor
To complete the pull request process, please assign gnufied after the PR has been reviewed.
You can assign the PR to them by writing /assign @gnufied in a comment when ready.

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

@jsafrane
Copy link

/hold
this should not be merged

@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 Jan 14, 2022
re := bytes / (1024 * 1024 * 1024)
if (bytes % (1024 * 1024 * 1024)) != 0 {
// TEST: verify that rounding to 4GiB works correctly
re := bytes / (1024 * 1024 * 1024 * 4)

Choose a reason for hiding this comment

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

re is now nr. of 4 GiB chunks in bytes. When you return re below, you should return 4 * re to return nr. of GiB chunks and not 4GiB chunks.

This took me some time :-D

@derek-pryor
Copy link
Author

@jsafrane Updated the return value

@jsafrane
Copy link

/retest

@openshift-ci
Copy link

openshift-ci bot commented Jan 17, 2022

@derek-pryor: The following tests 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/test fd2ccaf link true /test test
ci/prow/e2e-gcp-csi fd2ccaf link true /test e2e-gcp-csi

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/test-infra repository. I understand the commands that are listed here.

@jsafrane
Copy link

The test failures are caused by the tests not expecting any rounding for size specified as SupportedSizeRange.Min in the test manifest.

I tested it with Min: 4GiB and it passed just fine.

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. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants