From: Chandan Rajendra Date: Mon, 21 Dec 2015 07:01:46 +0000 (+1100) Subject: filter: filter xfs_io's output in units of page size X-Git-Tag: v2022.05.01~2728 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3b845a54e5b518b2a4c0d357272818e14aad882d;p=xfstests-dev.git filter: filter xfs_io's output in units of page size The helpers introduced in this commit will be used to make btrfs tests that assume 4k as the page size to work on non-4k page-sized systems as well. Signed-off-by: Chandan Rajendra Reviewed-by: Filipe Manana Signed-off-by: Dave Chinner --- diff --git a/common/filter b/common/filter index 05f2fab3..1be377c0 100644 --- a/common/filter +++ b/common/filter @@ -261,6 +261,14 @@ _filter_xfs_io_blocks_modified() _filter_xfs_io_units_modified "Block" $BLOCK_SIZE } +_filter_xfs_io_pages_modified() +{ + PAGE_SIZE=$(get_page_size) + + _filter_xfs_io_units_modified "Page" $PAGE_SIZE +} + + _filter_test_dir() { sed -e "s,$TEST_DEV,TEST_DEV,g" -e "s,$TEST_DIR,TEST_DIR,g" diff --git a/common/rc b/common/rc index c825229a..4164d9e1 100644 --- a/common/rc +++ b/common/rc @@ -3212,6 +3212,12 @@ get_block_size() echo `stat -f -c %S $1` } +get_page_size() +{ + echo $(getconf PAGE_SIZE) +} + + init_rc ################################################################################