common/rc: introduce _page_size_equals helper to skip incompatible tests#239
Closed
yizhanglinux wants to merge 1 commit intolinux-blktests:masterfrom
Closed
Conversation
Contributor
Author
|
Here is the test results on ppc64le: |
bvanassche
suggested changes
Mar 31, 2026
27dbdcf to
8841832
Compare
Contributor
Author
|
@bvanassche Thanks for your review, just updated. |
bvanassche
reviewed
Mar 31, 2026
| local page_size | ||
|
|
||
| page_shift=$(_get_kernel_option PAGE_SHIFT) | ||
| page_size=$(( 1 << page_shift )) |
Contributor
There was a problem hiding this comment.
These two statements can be simplified into echo $((1<< page_shift)) and the local variable page_size can be left out.
Introduce a new helper function `_get_page_size` to get system page size, and `_page_size_equals()` to check the whether system page size equal one value. Update `scsi/011` and `zbd/010` to use this helper and gracefully skip the tests if the page size is not 4096 bytes. This prevents test failures on non-4K page architectures. Fixes: linux-blktests#234 Suggested-by: Bart Van Assche <[email protected]> Signed-off-by: Yi Zhang <[email protected]>
8841832 to
b3dd06b
Compare
Contributor
|
Looks good to me. Not sure what Shin'ichiro thinks. |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a new helper function
_get_page_sizeto get system page size, and_page_size_equals()to check the whether system page size equal one value.Update
scsi/011andzbd/010to use this helper and gracefully skip thetests if the page size is not 4096 bytes. This prevents test failures on non-4K
page architectures.
Fixes: #234
Suggested-by: Bart Van Assche [email protected]