Fix value returned by H5Pget_fapl_ros3_block_caching() (#6602)

When called on a FAPL without ROS3 VFD block caching parameters
set on it, the H5Pget_fapl_ros3_block_caching() function previously
returned the VFD's default page buffer size value instead of its
default I/O block cache size value.
This commit is contained in:
jhendersonHDF
2026-08-14 15:39:01 -05:00
committed by GitHub
parent 9dc6cd2f1f
commit f8f0379c7c
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -1188,6 +1188,16 @@ test_ros3_block_caching_apis(void)
if (H5Pset_fapl_ros3_token(fapl_id, s3_test_aws_session_token) < 0)
TEST_ERROR;
/* Test settings on FAPL without ROS3 VFD block caching set yet */
if (H5Pget_fapl_ros3_block_caching(fapl_id, &block_size, &block_cache_size, &lock_superblock) < 0)
TEST_ERROR;
if (block_size != HDF5_ROS3_VFD_DEFAULT_BLOCK_SIZE)
TEST_ERROR;
if (block_cache_size != HDF5_ROS3_VFD_DEFAULT_BLOCK_CACHE_SIZE)
TEST_ERROR;
if (!lock_superblock)
TEST_ERROR;
/* Set block size to 0 - should disable block caching */
if (H5Pset_fapl_ros3_block_caching(fapl_id, 0, HDF5_ROS3_VFD_DEFAULT_BLOCK_CACHE_SIZE, true) < 0)
TEST_ERROR;