Skip to content

Commit ea5472c

Browse files
yizhanglinuxkawasaki
authored andcommitted
throtl/{002,003,007}, zbd/014: use _get_page_size to get PAGE_SIZE
Commit 8eca9fa ("common/rc, scsi/011, zbd/010: introduce _page_size_equals() helper") introduced the helper bash function _get_page_size(). Replace "getconf PAGE_SIZE" with the helper to cut dependency to the getconf tool. Link: #243 Signed-off-by: Yi Zhang <[email protected]> [Shin'ichiro: removed getconf command check in zbd/014] Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent 1d68a36 commit ea5472c

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

tests/throtl/002

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test() {
2121
local io_size_kb block_size
2222
local iops=256
2323

24-
page_size=$(getconf PAGE_SIZE)
24+
page_size=$(_get_page_size)
2525

2626
if ! _set_up_throtl --sector_size "${page_size}"; then
2727
return 1;

tests/throtl/003

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test() {
1818
echo "Running ${TEST_NAME}"
1919

2020
local page_size
21-
page_size=$(getconf PAGE_SIZE)
21+
page_size=$(_get_page_size)
2222

2323
if ! _set_up_throtl --sector_size "${page_size}"; then
2424
return 1;

tests/throtl/007

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test() {
1919
echo "Running ${TEST_NAME}"
2020

2121
local page_size
22-
page_size=$(getconf PAGE_SIZE)
22+
page_size=$(_get_page_size)
2323

2424
if ! _set_up_throtl --sector_size "${page_size}"; then
2525
return 1;

tests/zbd/014

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ requires() {
2323
_have_driver f2fs
2424
_have_driver null_blk
2525
_have_program fscrypt
26-
_have_program getconf
2726
_have_program mkfs.f2fs
2827
for o in BLK_INLINE_ENCRYPTION_FALLBACK FS_ENCRYPTION_INLINE_CRYPT; do
2928
if ! _check_kernel_option "$o"; then
@@ -112,7 +111,7 @@ run_test() {
112111
local bio_max_vecs=256
113112

114113
local page_size
115-
page_size=$(getconf PAGE_SIZE)
114+
page_size=$(_get_page_size)
116115

117116
# In bytes.
118117
local max_inl_encr_bio_size=$((bio_max_vecs * page_size))

0 commit comments

Comments
 (0)