-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: derek-pryor 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 |
/hold |
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) |
There was a problem hiding this comment.
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
@jsafrane Updated the return value |
/retest |
@derek-pryor: The following tests failed, say
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. |
The test failures are caused by the tests not expecting any rounding for size specified as I tested it with |
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?: