Skip to content

common/rc: introduce _page_size_equals helper to skip incompatible tests#239

Closed
yizhanglinux wants to merge 1 commit intolinux-blktests:masterfrom
yizhanglinux:skip-scsi-011-zbd-010-whith-nonsupported-page-size
Closed

common/rc: introduce _page_size_equals helper to skip incompatible tests#239
yizhanglinux wants to merge 1 commit intolinux-blktests:masterfrom
yizhanglinux:skip-scsi-011-zbd-010-whith-nonsupported-page-size

Conversation

@yizhanglinux
Copy link
Copy Markdown
Contributor

@yizhanglinux yizhanglinux commented Mar 31, 2026

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: #234
Suggested-by: Bart Van Assche [email protected]

@yizhanglinux
Copy link
Copy Markdown
Contributor Author

Here is the test results on ppc64le:

# ./check scsi/011 zbd/010
scsi/011 (test data lifetime propagation)                    [not run]
    This test requires 4096 bytes page size, but system has 65536 bytes
zbd/010 (test gap zone support with F2FS)                    [not run]
    This test requires 4096 bytes page size, but system has 65536 bytes

Comment thread common/rc Outdated
Comment thread common/rc Outdated
@yizhanglinux yizhanglinux force-pushed the skip-scsi-011-zbd-010-whith-nonsupported-page-size branch from 27dbdcf to 8841832 Compare March 31, 2026 15:51
@yizhanglinux
Copy link
Copy Markdown
Contributor Author

@bvanassche Thanks for your review, just updated.

@yizhanglinux yizhanglinux changed the title common/rc: introduce _have_page_size helper to skip incompatible tests common/rc: introduce _page_size_equals helper to skip incompatible tests Mar 31, 2026
Comment thread common/rc Outdated
local page_size

page_shift=$(_get_kernel_option PAGE_SHIFT)
page_size=$(( 1 << page_shift ))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These two statements can be simplified into echo $((1<< page_shift)) and the local variable page_size can be left out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated. :)

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]>
@yizhanglinux yizhanglinux force-pushed the skip-scsi-011-zbd-010-whith-nonsupported-page-size branch from 8841832 to b3dd06b Compare March 31, 2026 16:08
@bvanassche
Copy link
Copy Markdown
Contributor

Looks good to me. Not sure what Shin'ichiro thinks.

@kawasaki
Copy link
Copy Markdown
Collaborator

kawasaki commented Apr 7, 2026

I took the liberty to amend the commit message and then cherry-picked the change as 8eca9fa. Thanks!

Per our discussion in the issue #234, this PR covers the part "2) should skip 64KiB page size" only. The left work should be covered by another patch post or PR. Let me close this PR.

@kawasaki kawasaki closed this Apr 7, 2026
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.

blktests scsi/011 zbd/010 failed on ppc64le

3 participants